相关疑难解决方法(0)

从Ant代码导出Maven属性

我在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 Code Online (Sandbox Code Playgroud)

然后我${project.build.directory.portable}run project动作中引用但它又回来了null.<echo>在Ant块中执行显示正确的值.我究竟做错了什么?

ant maven-2

5
推荐指数
2
解决办法
4490
查看次数

标签 统计

ant ×1

maven-2 ×1