【发布时间】:2013-07-09 16:36:45
【问题描述】:
我想使用单个 pom.xml 在 maven 中运行多个命令提示符命令。我该怎么做?
例如:我有 2 个命令要执行。我正在使用exec-maven-plugin 执行第一个命令。
下面是执行第一个命令的 pom.xml 部分:
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.2.1</version>
<executions>
<execution>
<id>load files</id>
<phase>install</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>windchill</executable>
<arguments>
<argument>wt.load.LoadFileSet</argument>
<argument>-file</argument>
<argument>${basedir}/fileSet.xml</argument>
<argument>-UNATTENDED</argument>
<argument>-NOSERVERSTOP</argument>
<argument>-u</argument>
<argument>wcadmin</argument>
<argument>-p</argument>
<argument>wcadmin</argument>
</arguments>
</configuration>
</plugin>
为此构建成功。 是否可以像上面一样在同一个 pom.xml 中再执行一个命令?我无法做到这一点。所以有人请帮助如何在 pom.xml 中添加它
【问题讨论】: