0
是否有可能为exec阶段/目标使用maven-antrun-plugin。如何在阶段执行中使用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>
当然,如果有人知道周围$办法{} env.COMSPEC上会受到欢迎,以及窗户劈。
当然,我看着exec-maven-plugin插件。 “为阶段执行”是一个死亡赠与;-) 顺便说一句:我不运行一个可执行文件,但外部脚本文件。对于脚本,不仅脚本是依赖于操作系统的,而且调用本身以及Windows不支持shebang。 为此,我正在从exec-maven-plugin迁移。 – Martin 2010-12-06 10:29:12