Author: xavier
Date: Fri Mar 30 09:10:39 2007
New Revision: 524152

URL: http://svn.apache.org/viewvc?view=rev&rev=524152
Log:
improve release process: clean everything before releasing, and use a clean 
local ivy home to avoid ivy cache side effects

Modified:
    incubator/ivy/core/trunk/build-release.xml
    incubator/ivy/core/trunk/build.xml
    incubator/ivy/core/trunk/src/example/go-ivy/build.xml
    incubator/ivy/core/trunk/src/example/multi-project/build.xml

Modified: incubator/ivy/core/trunk/build-release.xml
URL: 
http://svn.apache.org/viewvc/incubator/ivy/core/trunk/build-release.xml?view=diff&rev=524152&r1=524151&r2=524152
==============================================================================
--- incubator/ivy/core/trunk/build-release.xml (original)
+++ incubator/ivy/core/trunk/build-release.xml Fri Mar 30 09:10:39 2007
@@ -133,7 +133,7 @@
                <input message="please enter status: 
(integration,milestone,release)" addproperty="status"/>
        </target>
        
-       <target name="snapshot" depends="clean, snapshot-version, 
coverage-report, snapshot-src, snapshot-bin" description="used for nightly and 
integration builds"/>
+       <target name="snapshot" depends="localivy, clean-ivy-home, init-ivy, 
clean-all, snapshot-version, coverage-report, snapshot-src, snapshot-bin" 
description="used for nightly and integration builds"/>
        <target name="release" depends="release-version, snapshot" 
description="make a new release of Ivy"/>
 
        <!-- 

Modified: incubator/ivy/core/trunk/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/ivy/core/trunk/build.xml?view=diff&rev=524152&r1=524151&r2=524152
==============================================================================
--- incubator/ivy/core/trunk/build.xml (original)
+++ incubator/ivy/core/trunk/build.xml Fri Mar 30 09:10:39 2007
@@ -27,17 +27,29 @@
                be built. This section will download Ivy from
                internet and use it for ivy tasks of this build.
          ================================================================= -->
-       <condition property="ivy.home" value="${env.IVY_HOME}">
-               <isset property="env.IVY_HOME" />
-       </condition>
-       <property name="ivy.home" value="${user.home}/.ivy" />
-       <property name="ivy.jar.dir" value="${ivy.home}/jars" />
-       <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
        
        <property name="final.name" value="ivy.jar" />
        <property name="final.core.name" value="ivy-core.jar" />
        
-       <target name="download-ivy" unless="offline">
+       <target name="init-ivy-user-home" unless="ivy.use.local.home">
+               <condition property="ivy.home" value="${env.IVY_HOME}">
+                       <isset property="env.IVY_HOME" />
+               </condition>
+               <property name="ivy.home" value="${user.home}/.ivy" />
+       </target>
+       
+       <target name="init-ivy-local-home" if="ivy.use.local.home">
+               <property name="ivy.home" value="${basedir}/.ivy" />
+       </target>
+       
+       <target name="init-ivy-jar">
+               <property name="ivy.jar.dir" value="${ivy.home}/jars" />
+               <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
+       </target>
+       
+       <target name="init-ivy-home" depends="init-ivy-user-home, 
init-ivy-local-home, init-ivy-jar" />
+
+       <target name="download-ivy" depends="init-ivy-home" unless="offline">
        <mkdir dir="${ivy.jar.dir}"/>
                <!-- download Ivy from web site so that it can be used even 
without any special installation -->
                <!-- use a non standard location during migration to apache -->
@@ -45,7 +57,7 @@
                 dest="${ivy.jar.file}" usetimestamp="true"/>
        </target>
        
-       <target name="check-ivy-available">
+       <target name="check-ivy-available" depends="init-ivy-home">
        <path id="ivy.lib.path">
            <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
        </path>
@@ -108,8 +120,18 @@
        <delete dir="${lib.dir}"/>
        </target>
        
+       <target name="clean-ivy-cache" depends="init-ivy-home">
+       <delete dir="${ivy.home}/cache"/>
+       </target>
+       
+       <target name="clean-ivy-home" depends="init-ivy-home">
+       <delete dir="${ivy.home}"/>
+       </target>
+       
        <target name="clean-examples" description="clean all examples">
                <subant target="clean" failonerror="false">
+                       <!-- use current ivy jar dir for nested calls, to avoid 
downloading ivy several times -->
+                       <property name="ivy.jar.dir" value="${ivy.jar.dir}"/>
                <fileset dir="src/example" includes="**/build.xml"/>
         </subant>              
        </target>
@@ -126,6 +148,10 @@
        
        <target name="nojavadoc" description="use to skip javadoc">
                <property name="skip.javadoc" value="true"/>
+       </target>
+       
+       <target name="localivy" description="use a local ivy home">
+               <property name="ivy.use.local.home" value="true"/>
        </target>
        
        <target name="offline" depends="noresolve" description="use to indicate 
no internet connection is available">

Modified: incubator/ivy/core/trunk/src/example/go-ivy/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/example/go-ivy/build.xml?view=diff&rev=524152&r1=524151&r2=524152
==============================================================================
--- incubator/ivy/core/trunk/src/example/go-ivy/build.xml (original)
+++ incubator/ivy/core/trunk/src/example/go-ivy/build.xml Fri Mar 30 09:10:39 
2007
@@ -126,7 +126,7 @@
           target: clean              
          ================================= -->
     <target name="clean" description="--> clean the project">
-        <delete includeemptydirs="true">
+        <delete includeemptydirs="true" quiet="true">
             <fileset dir="${src.dir}" />
             <fileset dir="${build.dir}" />
        </delete>

Modified: incubator/ivy/core/trunk/src/example/multi-project/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/ivy/core/trunk/src/example/multi-project/build.xml?view=diff&rev=524152&r1=524151&r2=524152
==============================================================================
--- incubator/ivy/core/trunk/src/example/multi-project/build.xml (original)
+++ incubator/ivy/core/trunk/src/example/multi-project/build.xml Fri Mar 30 
09:10:39 2007
@@ -17,10 +17,36 @@
    under the License.    
 -->
 <project name="all" 
-         xmlns:ivy="antlib:org.apache.ivy.ant">
+         xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
          
+       <!-- here is the version of ivy we will use. change this property to 
try a newer 
+         version if you want -->
+       <property name="ivy.jar.dir" value="${user.home}/.ivy/jars" />
+       <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
+
+    <property name="build.dir" value="build" />
+    <property name="src.dir" value="src" />
+    
+    
+    <!-- ================================= 
+          target: install-ivy         
+            this target is not necessary if you put ivy.jar in your ant lib 
directory
+            if you already have ivy 1.4 in your ant lib, you can simply remove 
this
+            target and the dependency the 'go' target has on it
+         ================================= -->
+    <target name="install-ivy" description="--> install ivy">
+       <!-- try to load ivy here from local ivy dir, in case the user has not 
already dropped
+             it into ant's lib dir (note that the latter copy will always take 
precedence).
+             We will not fail as long as local lib dir exists (it may be 
empty) and
+             ivy is in at least one of ant's lib dir or the local lib dir. -->
+       <path id="ivy.lib.path">
+           <fileset dir="${ivy.jar.dir}" includes="*.jar"/>
+       </path>
+       <taskdef resource="fr/jayasoft/ivy/ant/antlib.xml"
+                 uri="antlib:fr.jayasoft.ivy.ant" classpathref="ivy.lib.path"/>
+    </target>    
          
-  <target name="buildlist"> 
+  <target name="buildlist" depends="install-ivy"> 
     <ivy:buildlist reference="build-path">
       <fileset dir="projects" includes="**/build.xml"/>
     </ivy:buildlist>


Reply via email to