我的项目运行具有以下命令完美的罚款:如何通过maven执行简单的蚂蚁通话?
C:\project\<project_name>\ant -lib ant\lib -buildfile applications/<sub-project-path>/ant/build.xml deploy
但是,如果我在POM包装这个命令无论是在Maven的antrun-插件或者exec-Maven的插件,我得到的各种路径的问题。
对于maven-antrun-plugin,似乎某些属性由于路径问题而无法加载。在exec-maven-plugin中,似乎蚂蚁目标从未正确传入。
有人可以请教如何我可以应用这在一个POM文件?非常感激。
这是我的exec POM:
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<phase>process-resources</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>ant</executable>
<workingDirectory>${basedir}</workingDirectory>
<arguments>
<argument>'-lib ant/lib'</argument>
<argument>'-buildfile $basedir/<project-path>/build.xml'</argument>
<argument>deploy</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
好的,我已经找到了这里的问题。显然在争论中,你不能传递空间。所以这个问题解决了。不过,我仍然很好奇如何在antrun-plugin中写这个。这是pom文件,它不知道如何解析路径。 –