简体   繁体   English

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

[英]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.

相关问题 org.codehaus.mojo:jaxb2-maven-plugin 2.0在哪里? - Where is org.codehaus.mojo:jaxb2-maven-plugin 2.0? 无法执行目标 org.codehaus.mojo:jaxb2-maven-plugin:1.6:xjc (default-cli) - Getting Failed to execute goal org.codehaus.mojo:jaxb2-maven-plugin:1.6:xjc (default-cli) jaxb2-maven-plugin将classpath添加到生成的源中 - jaxb2-maven-plugin add classpath to generated sources 无法使用codehaus.mojo jaxb2-maven-plugin创建Java类 - Unable to create java classes using codehaus.mojo jaxb2-maven-plugin Maven在命令行找不到org.codehaus.mojo:exec-maven-plugin - Maven can't find org.codehaus.mojo:exec-maven-plugin at command line 为什么我会遇到 org.codehaus.mojo:exec-maven-plugin:1.2.1:exec 错误? - Why am I running into org.codehaus.mojo:exec-maven-plugin:1.2.1:exec error? 是否可以使用org.codehaus.mojo:build-helper-maven-plugin将本机dll捆绑到war文件中? - Is it possible to use the org.codehaus.mojo:build-helper-maven-plugin to bundle native dlls into a war file? Java POM 插件问题(无法解析 mojo org.codehaus.mojo:exec-maven-plugin 的配置) - Java POM plugin issue (Unable to parse configuration of mojo org.codehaus.mojo:exec-maven-plugin) 无法通过以下Maven错误org.codehaus.mojo:license-maven-plugin:1.12:check-file-header构建Maven项目 - Failed to build maven project with following maven error org.codehaus.mojo:license-maven-plugin:1.12:check-file-header 我尝试运行我的Maven项目时遇到错误:无法执行目标org.codehaus.mojo:exec-maven-plugin:1.2.1:exec(default-cli) - I have an error when i trying to run my maven project: Failed execute goal org.codehaus.mojo:exec-maven-plugin:1.2.1:exec (default-cli)
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM