Skip generated on ... in Java files using jaxb2 maven plugin

I want maven-jaxb2-plugin not to write a โ€œdisclaimerโ€:

 This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.2-hudson-jaxb-ri-2.2-63- See <a href="http://java.sun.com/xml/jaxb">http://java.sun.com/xml/jaxb</a> Any modifications to this file will be lost upon recompilation of the source schema. Generated on: 2011.08.01 at 09:20:43 AM CEST 

At least a timestamp.

Thanks.

Udo.

+7
source share
3 answers

Use -no-header if you use a command line source generator or header='false' if you use ant.

In pom, in the configuration <args><arg>-no-header</arg></args>

+8
source

Just add, I'm using Maven and what worked for me was:

 <arguments>-no-header</arguments> 
+8
source

use "noGeneratedHeaderComments" Example:

  <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>jaxb2-maven-plugin</artifactId> <version>2.1</version> <executions> <execution> <id>xjc</id> <goals> <goal>xjc</goal> </goals> </execution> </executions> <configuration> <outputDirectory>${project.basedir}/src/main/java</outputDirectory> <clearOutputDir>false</clearOutputDir> <sources> <source>${project.basedir}/src/main/resources/xsd</source> </sources> <noGeneratedHeaderComments>true</noGeneratedHeaderComments> </configuration> </plugin> 
+2
source

All Articles