使用jaxb2 maven插件在Java文件中跳过Generated on ...

sse*_*ano 8 java jaxb jaxb2 maven-jaxb2-plugin

我想maven-jaxb2-plugin不要写'免责声明':

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 
Run Code Online (Sandbox Code Playgroud)

至少是时间戳.

谢谢.

你做.

Ser*_*nov 9

使用-no-header,如果你使用命令行源发生器或者header='false'如果您使用的蚂蚁.

在pom中,在配置中 <args><arg>-no-header</arg></args>


小智 8

只是补充一点,我使用Maven,对我有用的是:

<arguments>-no-header</arguments> 
Run Code Online (Sandbox Code Playgroud)


Dav*_*nni 5

使用“noGeneratedHeaderComments”示例:

            <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>  
Run Code Online (Sandbox Code Playgroud)