yeg*_*256 3 java ant maven-2 maven maven-antrun-plugin
当某个文件已存在时,如何禁用maven-antrun-plugin执行?:
[...]
<plugin>
<artifactId>maven-antrun-plugin</artifactId>
<version>1.6</version>
<executions>
<execution>
<phase>test</phase>
<goals>
<goal>run</goal>
</goals>
<configuration>
<target>
<!-- do something really complex in order to create file.txt -->
</target>
</configuration>
</execution>
</executions>
</build>
[...]
Run Code Online (Sandbox Code Playgroud)
执行需要一些时间,我不想每次都在file.txt
那里重复它.
检查独立Ant文件中是否存在该文件.例:
<target name="check-file">
<available file="foo.bar" property="fileExists" />
</target>
<target name="time-consuming" depends="check-file" unless="fileExists">
...
</target>
Run Code Online (Sandbox Code Playgroud)
归档时间: |
|
查看次数: |
2406 次 |
最近记录: |