der*_*itz 11 maven maven-antrun-plugin
我试图通过antrun插件复制我的maven多模块项目中的文件.该文件位于父项目的根目录中:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<inherited>false</inherited>
<executions>
<execution>
<inherited>false</inherited>
<id>copy</id>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target name="copy and rename file">
<copy file="${basedir}/portal-ext.properties" tofile="${liferay.auto.deploy.dir}/../portal-ext.properties" />
</target>
</configuration>
</execution>
</executions>
Run Code Online (Sandbox Code Playgroud)
我通过mvn antrun:run
问题运行这个问题是我在父级和每个模块上得到"没有定义蚂蚁目标 - 跳过".我需要它只在父母身上运行,思想<inherited>false</inherited>
会有所帮助,但我没有.但为什么"没有定义蚂蚁目标"?
小智 14
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<id>ant-execute</id>
<configuration>
<target>
<echo message="plugin classpath: " />
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
Run Code Online (Sandbox Code Playgroud)
antrun:run
只会考虑插件的配置,而不是特定执行的配置,因此会忽略您指定的执行.作为运行单个的Maven插件执行?陈述,你可以给你的执行一个id default-cli
来让它被拿起来.
但是,您配置的执行应该已经在常规构建生命周期中生效.
归档时间: |
|
查看次数: |
7591 次 |
最近记录: |