You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@ant.apache.org by bo...@apache.org on 2011/01/27 16:04:10 UTC
svn commit: r1064144 - in /ant/antlibs/common/trunk: ivy.xml m2.xml
Author: bodewig
Date: Thu Jan 27 15:04:09 2011
New Revision: 1064144
URL: http://svn.apache.org/viewvc?rev=1064144&view=rev
Log:
when creating default ivy.xml/POM files, only overwrite existing files if anything relevant has changed
Modified:
ant/antlibs/common/trunk/ivy.xml
ant/antlibs/common/trunk/m2.xml
Modified: ant/antlibs/common/trunk/ivy.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/common/trunk/ivy.xml?rev=1064144&r1=1064143&r2=1064144&view=diff
==============================================================================
--- ant/antlibs/common/trunk/ivy.xml (original)
+++ ant/antlibs/common/trunk/ivy.xml Thu Jan 27 15:04:09 2011
@@ -38,6 +38,23 @@
<!--look for a template Ivy file -->
<property name="project.ivy.xml" location="project-template.ivy.xml"/>
<available property="project.has-ivy.xml?" file="${project.ivy.xml}"/>
+ <condition property="generate-default-ivy.xml?">
+ <and>
+ <not>
+ <isset property="project.has-ivy.xml?"/>
+ </not>
+ <not>
+ <uptodate targetfile="${target.ivy.xml}">
+ <srcresources>
+ <file file="${common.basedir}/build.xml"/>
+ <file file="${common.basedir}/ivy.xml"/>
+ <file file="version.properties"/>
+ <file file="${target.jar}"/>
+ </srcresources>
+ </uptodate>
+ </not>
+ </and>
+ </condition>
</target>
@@ -54,7 +71,7 @@
<!-- inline creation of a zero dependency ivy.xml.
We don't even declare a dependency on ant!
-->
- <target name="make-ivy.xml" depends="ivy-init" unless="project.has-ivy.xml?">
+ <target name="make-ivy.xml" depends="ivy-init" if="generate-default-ivy.xml?">
<echo message="Creating ivy.xml ${target.ivy.xml}" level="verbose"/>
<echo file="${target.ivy.xml}"><![CDATA[
<ivy-module version="2.0">
Modified: ant/antlibs/common/trunk/m2.xml
URL: http://svn.apache.org/viewvc/ant/antlibs/common/trunk/m2.xml?rev=1064144&r1=1064143&r2=1064144&view=diff
==============================================================================
--- ant/antlibs/common/trunk/m2.xml (original)
+++ ant/antlibs/common/trunk/m2.xml Thu Jan 27 15:04:09 2011
@@ -35,6 +35,23 @@
<!--look for a template pom -->
<property name="project.pom" location="project-template.pom"/>
<available property="project.haspom?" file="${project.pom}"/>
+ <condition property="generate-default-pom?">
+ <and>
+ <not>
+ <isset property="project.haspom?"/>
+ </not>
+ <not>
+ <uptodate targetfile="${target.pom}">
+ <srcresources>
+ <file file="${common.basedir}/build.xml"/>
+ <file file="${common.basedir}/m2.xml"/>
+ <file file="version.properties"/>
+ <file file="${target.jar}"/>
+ </srcresources>
+ </uptodate>
+ </not>
+ </and>
+ </condition>
</target>
@@ -51,7 +68,7 @@
<!-- inline creation of a zero dependency pom.
We don't even declare a dependency on ant!
-->
- <target name="m2-make-pom" depends="m2-init" unless="project.haspom?">
+ <target name="m2-make-pom" depends="m2-init" if="generate-default-pom?">
<echo message="Creating Pom ${target.pom}" level="verbose"/>
<echoxml file="${target.pom}">
<project>