我是maven的新手.我想改变maven插件执行的顺序.
在我的pom.xml中,我有maven-assembly-plugin和maven-ant-plugin.我使用maven-assembly-plugin创建zip文件和maven-ant-plugin,用于将zip文件从目标复制到其他目录.当我运行pom.xml时,maven-ant-plugin被触发并查找zip文件,最后我收到错误,说找不到zip文件.在maven-ant-plugin需要运行之后,请先建议我如何运行maven-assembly-plugin,以便将zip文件复制到相应的目录.
我正在使用maven和java-9构建我的项目.我在我的pom.xml文件中添加了:
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-plugin.version}</version>
<configuration>
<source>${java.version}</source>
<target>${java.version}</target>
<compilerArgs>
<arg>--add-modules</arg>
<arg>java.xml.bind</arg>
</compilerArgs>
</configuration>
</plugin>
Run Code Online (Sandbox Code Playgroud)
但是,为了运行应用程序,我必须像这样运行它:
java -jar --add-modules java.xml.bind my-app.jar
Run Code Online (Sandbox Code Playgroud)
有没有办法构建应用程序,从命令行运行而不是--add-modules java.xml.bindjava命令行参数?
我需要在 Eclipse 中使用 swagger-codegen-plugin (for maven) 生成服务器存根代码。你能帮我怎么做吗?以及需要什么配置(在 pom.xml 中)。