build-helper插件确实解决了这个问题。感谢@Joe的评论。
<plugin> <groupId>org.prehaus.mojo</groupId> <artifactId>build-helper-maven-plugin</artifactId> <executions> <execution> <phase>generate-sources</phase> <goals> <goal>add-source</goal> </goals> <configuration> <sources> <source>${project.build.directory}/generated-sources/wrappers</source> </sources> </configuration> </execution> </executions></plugin>


