简体   繁体   English

Maven站点插件无法加载生成的源(Jaxb)

[英]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.

相关问题 jaxb2-maven-plugin将classpath添加到生成的源中 - jaxb2-maven-plugin add classpath to generated sources 为什么 maven java 项目中存在`maven-site-plugin` - Why `maven-site-plugin` present in maven java project Maven站点插件: <body> 标签没有被继承 - maven-site-plugin: <body> tag is not being inherited 启动板抱怨缺少maven-site-plugin,但我根本不使用它 - launchpad complains about missing maven-site-plugin but I do not use it at all maven-site-plugin:配置哪个页面应为index.html - maven-site-plugin: Configure which page should be the index.html jaxb2-maven-plugin不从wsdl生成源代码 - jaxb2-maven-plugin not generating sources from wsdl jaxb2-maven-plugin:无法从WSDL生成源 - jaxb2-maven-plugin: Can't generate sources from WSDL 如果某些内容发生了变化,JAXB maven插件是否只能生成源代码? - Can JAXB maven plugin only generate sources if something has changed? 无法执行目标org.apache.maven.plugins:maven-site-plugin:3.7:site(default-cli):常量池中的无效字节标记:18 - Failed to execute goal org.apache.maven.plugins:maven-site-plugin:3.7:site (default-cli): Invalid byte tag in constant pool: 18 GWTP应用程序中生成源的Maven处理器插件顺序 - maven processor plugin order of generated sources in a gwtp app
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM