[英]I want to add a single line comment in each JAXB generated file that have been generated using the org.codehaus.mojo jaxb2-maven-plugin plugin
I'm generating JAXB classes from an XSD using XJC org.codehaus.mojo jaxb2-maven-plugin 2.2 我正在使用XJC org.codehaus.mojo从XSD生成JAXB类jaxb2-maven-plugin 2.2
I want to add a single line comment at the top of each generated file, what is the easiest way to achieve this ? 我想在每个生成文件的顶部添加一行注释,最简单的方法是什么?
com.google.code.maven-replacer-plugin replacer 1.5.2 prepare-package replace com.google.code.maven-replacer-plugin替换器1.5.2 prepare-package替换
<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>
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.