gpt4 book ai didi

Maven-antrun 未定义 ant 目标 - 已跳过

转载 作者:行者123 更新时间:2023-12-01 23:17:53 25 4
gpt4 key购买 nike

我正在尝试通过 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>

我通过mvn antrun:run运行这个问题是我在父级和每个模块上得到“未定义 ant 目标 - 已跳过”。我需要它只在父级上运行并认为 <inherited>false</inherited>会有所帮助,但我没有。但为什么“没有定义 Ant 目标”?

最佳答案

  <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>

命令 : mvn antrun:run@ant-execute

关于Maven-antrun 未定义 ant 目标 - 已跳过,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/19001432/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com