[英]maven-jaxb2-plugin deletes classes right after build
I am trying to generate some classes with the maven-jaxb2 plugin
. 我正在尝试使用maven-jaxb2 plugin
生成一些类。 But a few seconds after every build the classes are deleted out of the target/generated-resources
folder (but they are still in the target/classes/...
folder) 但是在每次构建后几秒钟,这些类将从target/generated-resources
文件夹中删除(但它们仍在target/classes/...
文件夹中)
Here is the plugindefinition from my pom: 这是我pom的插件定义:
<plugin>
<groupId>org.jvnet.jaxb2.maven2</groupId>
<artifactId>maven-jaxb2-plugin</artifactId>
<version>0.8.1</version>
<executions>
<execution>
<goals>
<goal>generate</goal>
</goals>
</execution>
</executions>
<configuration>
<cleanPackageDirectories>true</cleanPackageDirectories>
<generatePackage>gen.name.integrationimpl.imdb.types</generatePackage>
<schemaDirectory>${basedir}/src/main/resources</schemaDirectory>
<args>
<param>-npa</param>
</args>
<removeOldOutput>true</removeOldOutput>
<includeSchemas>
<includeSchema>**/*.xsd</includeSchema>
</includeSchemas>
</configuration>
<dependencies>
<dependency>
<groupId>com.sun.xml.bind</groupId>
<artifactId>jaxb-impl</artifactId>
<version>2.2.5-b10</version>
</dependency>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.2.6</version>
</dependency>
<dependency>
<groupId>javax.activation</groupId>
<artifactId>activation</artifactId>
<version>1.1.1</version>
</dependency>
<dependency>
<groupId>javax.xml.stream</groupId>
<artifactId>stax-api</artifactId>
<version>1.0-2</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>add-resource</id>
<phase>generate-resources</phase>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>src/main/resources</directory>
<targetPath>resources-target</targetPath>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
my xsd should be right. 我的xsd应该是正确的。
I have no idea what is going wrong. 我不知道出了什么问题。 I did it a few times before, but had never this problem. 我之前做过几次,但是从来没有这个问题。
thanks for your help 谢谢你的帮助
for those who are interested in it: I solved it temporary by removing the 对于那些对此感兴趣的人:我暂时删除了
<removeOldOutput>true</removeOldOutput>
tag. 标签。
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.