【发布时间】:2010-12-06 17:53:54
【问题描述】:
是否可以将 maven-antrun-plugin 用于执行阶段/目标。
目前我使用以下但不起作用:
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<id>exec</id>
<phase>exec</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target
name='Exec'
>
<exec
executable='${env.COMSPEC}'
osfamily='winnt'
>
<arg
value='/c'
></arg>
<arg
value='src\\main\\scripts\\Exec.cmd'
></arg>
</exec>
<exec
executable='src/main/scripts/Exec.command'
osfamily='unix'
></exec>
</target>
</configuration>
</execution>
</executions>
</plugin>
当然,如果有人知道如何绕过 Windows 上的 ${env.COMSPEC} hack,那也会受到欢迎。
【问题讨论】:
标签: maven