我想在每个使用org.codehaus.mojo jaxb2-maven-plugin插件生成的JAXB生成的文件中添加单行注释

时间:2016-03-21 09:30:55

标签: java xsd jaxb xjc

我正在使用XJC从XSD生成JAXB类     org.codehaus.mojo     JAXB2 - Maven的插件     2.2

我想在每个生成的文件的顶部添加一行注释,实现此目的的最简单方法是什么?

1 个答案:

答案 0 :(得分:0)

                             com.google.code.maven-替代品 - 插件                 替代品                 1.5.2                                                               制备包                                                      更换                         
                    
                                 

                <basedir>${project.build.sourceDirectory}/com/deltarail/nexus/cis/map/jaxb/generated</basedir>

                <includes>                       
                    <include>*.java</include>                            
                </includes>      

                <replacements>
                    <replacement>
                        <token>// This file was generated by the JavaTM Architecture for XML Binding(JAXB) Reference Implementation, v2.2.11</token>
                        <value>// CSOFF: a.*</value>                          
                    </replacement>


                <replacement>
                        <token>public class</token>
                        <value>@SuppressWarnings("PMD")
public class</value>                          
                    </replacement>


                </replacements>
                <regex>false</regex>
            </configuration>
        </plugin>