[英]Maven-site-plugin could not load generated sources (Jaxb)
I try to build my java Project with the maven:site plugin. 我尝试使用maven:site插件构建Java项目。 For that I use a Jenkins Server and configure the mvn goals: clean install site
为此,我使用Jenkins服务器并配置mvn目标:全新安装站点
My Pom has the following Plugins: 我的Pom具有以下插件:
...
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>3.5</version>
<configuration>
<goal>generate-sources</goal>
<generateReports>true</generateReports>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>2.10.3</version>
<configuration>
<show>private</show>
</configuration>
</plugin>
<plugin>
<artifactId>maven-checkstyle-plugin</artifactId>
<version>2.17</version>
<reportSets>
<reportSet>
<reports>
<report>checkstyle</report>
</reports>
</reportSet>
</reportSets>
<configuration>
<failsOnError>true</failsOnError>
<configLocation>checkstyle.xml</configLocation>
</configuration>
</plugin>
..
The Programm runs and the generated Classes are available. 程序将运行,并且生成的类可用。 But if i made a site-build i get the error that the generated package doesn't exist.
但是,如果我进行了站点构建,则会收到以下错误消息:生成的程序包不存在。
Thank you for your help 谢谢您的帮助
I used this in pom where jaxb is: 我在jaxb是的pom中使用了这个:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<execution>
<phase>generate-sources</phase>
<goals><goal>add-source</goal></goals>
<configuration>
<sources>
<source>target/generated-sources/jaxb/</source>
</sources>
</configuration>
</execution>
</executions>
</plugin>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.