在我的 linux 桌面(RHEL 5)上工作正常,下面的虚拟代码片段使用maven-3.0.4
并java 1.6.0_32
从bash
shell 运行。
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0
http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<artifactId>dummy</artifactId>
<groupId>com.dummy</groupId>
<version>1.0-SNAPSHOT</version>
<name>Dummy</name>
<url>http://www.dummy.com</url>
<build>
<plugins>
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.7</version>
<executions>
<execution>
<phase>generate-sources</phase>
<configuration>
<target>
<input addproperty="myprop" validargs="y,n" defaultvalue="y"/>
<echo message="${myprop}"/>
</target>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>