Author: gscokart
Date: Mon Nov  5 11:39:20 2007
New Revision: 592130

URL: http://svn.apache.org/viewvc?rev=592130&view=rev
Log:
synchronize doc/samples/build.xml with the src/example/go-ivy/build.xml (a 
refactoring to avoid this would be welcome)

Modified:
    incubator/ivy/core/trunk/build-tutorial.sh
    incubator/ivy/core/trunk/doc/samples/build.xml

Modified: incubator/ivy/core/trunk/build-tutorial.sh
URL: 
http://svn.apache.org/viewvc/incubator/ivy/core/trunk/build-tutorial.sh?rev=592130&r1=592129&r2=592130&view=diff
==============================================================================
--- incubator/ivy/core/trunk/build-tutorial.sh (original)
+++ incubator/ivy/core/trunk/build-tutorial.sh Mon Nov  5 11:39:20 2007
@@ -69,4 +69,7 @@
 run build/tmp.log                              
src/example/configurations/multi-projects/filter-framework/build.xml
 run build/tmp.log                              
src/example/configurations/multi-projects/myapp/build.xml clean
 run doc/tutorial/log/configurations-runcc.txt  
src/example/configurations/multi-projects/myapp/build.xml
-run doc/tutorial/log/configurations-runhm.txt  
src/example/configurations/multi-projects/myapp/build.xml run-hm
\ No newline at end of file
+run doc/tutorial/log/configurations-runhm.txt  
src/example/configurations/multi-projects/myapp/build.xml run-hm
+
+#Update samples
+cp src/example/go-ivy/build.xml doc/samples/build.xml

Modified: incubator/ivy/core/trunk/doc/samples/build.xml
URL: 
http://svn.apache.org/viewvc/incubator/ivy/core/trunk/doc/samples/build.xml?rev=592130&r1=592129&r2=592130&view=diff
==============================================================================
--- incubator/ivy/core/trunk/doc/samples/build.xml (original)
+++ incubator/ivy/core/trunk/doc/samples/build.xml Mon Nov  5 11:39:20 2007
@@ -16,7 +16,7 @@
    specific language governing permissions and limitations
    under the License.    
 -->
-<project name="go-ivy" default="go" xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
+<project name="go-ivy" default="go" xmlns:ivy="antlib:org.apache.ivy.ant">
     <!-- 
         this build file is a self contained project: it doesn't require 
anything else 
         that ant 1.6.2 or greater and java 1.4 or greater properly installed.
@@ -33,31 +33,34 @@
         After a successful build run "ant" again and you will see the build 
will be
         much faster.
         
-        More information can be found at http://incubator.apache.org/ivy
+        More information can be found at http://ant.apache.org/ivy/
         -->
        
        <!-- here is the version of ivy we will use. change this property to 
try a newer 
          version if you want -->
-       <property name="ivy.install.version" value="1.4.1"/>
-       <property name="ivy.jar.dir" value="${basedir}/ivy"/>
-       <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar"/>
+       <property name="ivy.install.version" value="2.0.0-alpha-2-incubating" />
+       <property name="ivy.jar.dir" value="${basedir}/ivy" />
+       <property name="ivy.jar.file" value="${ivy.jar.dir}/ivy.jar" />
 
-    <property name="build.dir" value="build"/>
-    <property name="src.dir" value="src"/>
+    <property name="build.dir" value="build" />
+    <property name="src.dir" value="src" />
     
     
+    <target name="download-ivy" unless="skip.download">
+       <mkdir dir="${ivy.jar.dir}"/>
+               <!-- download Ivy from web site so that it can be used even 
without any special installation -->
+               <echo message="installing ivy..."/>
+       <get 
src="http://people.apache.org/~xavier/ivy/${ivy.install.version}/ivy.jar";
+                dest="${ivy.jar.file}" usetimestamp="true"/>
+    </target>
+    
     <!-- ================================= 
           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
+            if you already have ivy in your ant lib, you can simply remove this
             target and the dependency the 'go' target has on it
          ================================= -->
-    <target name="install-ivy" description="--&gt; install ivy">
-       <mkdir dir="${ivy.jar.dir}"/>
-               <!-- download Ivy from web site so that it can be used even 
without any special installation -->
-               <echo message="installing ivy..."/>
-       <get 
src="http://www.jayasoft.org/downloads/ivy/${ivy.install.version}/ivy-${ivy.install.version}.jar";
 dest="${ivy.jar.file}" usetimestamp="true"/>
-                
+    <target name="install-ivy" depends="download-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
@@ -65,22 +68,25 @@
        <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"/>
+       <taskdef resource="org/apache/ivy/ant/antlib.xml"
+                 uri="antlib:org.apache.ivy.ant" classpathref="ivy.lib.path"/>
     </target>    
        
        <!-- ================================= 
           target: go
                     Go ivy, go!
          ================================= -->
-    <target name="go" depends="install-ivy, generate-src" description="--&gt; 
resolve dependencies, compile and run the project">
+    <target name="go" depends="install-ivy, generate-src" 
+            description="--> resolve dependencies, compile and run the 
project">
                <echo message="using ivy to resolve commons-lang 2.1..."/>
         <!-- here comes the magic line: asks ivy to resolve a dependency on 
              commons-lang 2.1 and to build an ant path with it from its cache  
-->
-        <ivy:cachepath organisation="apache" module="commons-lang" 
revision="2.1" pathid="lib.path.id" inline="true"/>
+        <ivy:cachepath organisation="commons-lang" module="commons-lang" 
revision="2.1" 
+                       pathid="lib.path.id" inline="true"/>
         
                <echo message="compiling..."/>
-        <mkdir dir="${build.dir}"/>
-        <javac srcdir="${src.dir}" destdir="${build.dir}" 
classpathref="lib.path.id"/>
+        <mkdir dir="${build.dir}" />
+        <javac srcdir="${src.dir}" destdir="${build.dir}" 
classpathref="lib.path.id" />
         
                <echo>
 We are now ready to execute our simple program with its dependency on 
commons-lang.
@@ -88,8 +94,8 @@
                </echo>
         <java classname="example.Hello">
             <classpath>
-                <path refid="lib.path.id"/>
-                <path location="${build.dir}"/>
+                <path refid="lib.path.id" />
+                <path location="${build.dir}" />
             </classpath>
         </java>
     </target>
@@ -101,7 +107,7 @@
             present on your file system, and this target wouldn't be necessary.
          ================================= -->
     <target name="generate-src">
-        <mkdir dir="${src.dir}/example"/>
+        <mkdir dir="${src.dir}/example" />
         <echo file="${src.dir}/example/Hello.java">
 package example;
 
@@ -121,24 +127,25 @@
     <!-- ================================= 
           target: clean              
          ================================= -->
-    <target name="clean" description="--&gt; clean the project">
-        <delete includeemptydirs="true">
-            <fileset dir="${src.dir}"/>
-            <fileset dir="${build.dir}"/>
+    <target name="clean" description="--> clean the project">
+        <delete includeemptydirs="true" quiet="true">
+            <fileset dir="${src.dir}" />
+            <fileset dir="${build.dir}" />
        </delete>
     </target>
        
     <!-- ================================= 
           target: clean-ivy              
          ================================= -->
-       <target name="clean-ivy" description="--&gt; clean the ivy 
installation">
+       <target name="clean-ivy" description="--> clean the ivy installation">
                <delete dir="${ivy.jar.dir}"/>
        </target>
        
     <!-- ================================= 
           target: clean-cache              
          ================================= -->
-       <target name="clean-cache" description="--&gt; clean the ivy cache">
-               <delete dir="${user.home}/.ivy/cache"/>
+       <target name="clean-cache" depends="install-ivy" 
+                       description="--> clean the ivy cache">
+               <ivy:cleancache />
        </target>
 </project>


Reply via email to