【发布时间】:2011-03-05 05:18:13
【问题描述】:
我在我的 POM 中嵌入了以下代码:
<plugin name="test">
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-antrun-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<configuration>
<tasks>
<pathconvert targetos="unix" property="project.build.directory.portable">
<path location="${project.build.directory}"/>
</pathconvert>
</tasks>
</configuration>
<goals>
<goal>run</goal>
</goals>
</execution>
</executions>
</plugin>
然后我从run project 操作中引用${project.build.directory.portable},但它返回为null。在 Ant 块中执行 <echo> 会显示正确的值。我做错了什么?
【问题讨论】: