Author: maartenc
Date: Thu Jun 24 21:31:14 2010
New Revision: 957721

URL: http://svn.apache.org/viewvc?rev=957721&view=rev
Log:
Tutorial output generation is now part of standard "generate-doc" target.

Modified:
    ant/ivy/core/trunk/build-release.xml

Modified: ant/ivy/core/trunk/build-release.xml
URL: 
http://svn.apache.org/viewvc/ant/ivy/core/trunk/build-release.xml?rev=957721&r1=957720&r2=957721&view=diff
==============================================================================
--- ant/ivy/core/trunk/build-release.xml (original)
+++ ant/ivy/core/trunk/build-release.xml Thu Jun 24 21:31:14 2010
@@ -29,10 +29,19 @@
                <attribute name="failonerror" default="true" />
                <sequential>
                        <echo>Running @{antfile} @{target} > @{output}</echo>
+                       
+            <local name="antfile.dir" />
+            <dirname property="antfile.dir" file="@{antfile}" />
+                       
+                       <local name="antfile.name" />
+                       <basename property="antfile.name" file="@{antfile}" />
+
+                       <echo file="@{output}">[...@apache:${antfile.dir}]$ ant 
-f ${antfile.name} @{target}${line.separator}</echo>
                <java classname="org.apache.tools.ant.launch.Launcher"
                      fork="true"
                      failonerror="@{failonerror}"
-                       logerror="true"
+                         logerror="true"
+                         append="true"
                      output="@{output}">
                    <classpath>
                        <fileset 
file="${artifacts.build.dir}/jars/${final.name}" />
@@ -72,6 +81,7 @@
                
                <!-- go-ivy : not logged, but run in order to check if it still 
run -->
                <run-tutorial antfile="${tutorial.src.dir}/go-ivy/build.xml" 
output="${output.dir}/dummy.txt" />
+        <delete file="${output.dir}/dummy.txt" />
         <delete dir="${tutorial.build.dir}" />
         
         <!-- hello-ivy : Quick Start - start.html -->
@@ -105,14 +115,14 @@
         <pathconvert property="myrepository.content" 
pathsep="${line.separator}">
             <fileset 
dir="${tutorial.src.dir}/build-a-ivy-repository/myrepository/no-namespace" />
         </pathconvert>
-        <echo file="${output.dir}/myrepository-content.txt">$ find 
${tutorial.src.dir}/build-a-ivy-repository/myrepository/no-namespace -type f 
-print${line.separator}</echo>
+        <echo file="${output.dir}/myrepository-content.txt">[...@apache:/]$ 
find ${tutorial.src.dir}/build-a-ivy-repository/myrepository/no-namespace -type 
f -print${line.separator}</echo>
         <echo file="${output.dir}/myrepository-content.txt" 
append="true">${myrepository.content}</echo>
         <delete dir="${tutorial.build.dir}" />
         <run-tutorial 
antfile="${tutorial.src.dir}/build-a-ivy-repository/build.xml" 
target="maven2-deps" output="${output.dir}/install-deps.txt" 
failonerror="false" />
         <pathconvert property="myrepository.content.deps" 
pathsep="${line.separator}">
             <fileset 
dir="${tutorial.src.dir}/build-a-ivy-repository/myrepository/no-namespace/org.hibernate/hibernate"
 />
         </pathconvert>
-        <echo file="${output.dir}/myrepository-content-deps.txt">$ find 
${tutorial.src.dir}/build-a-ivy-repository/myrepository/no-namespace/org.hibernate/hibernate
 -type f -print${line.separator}</echo>
+        <echo 
file="${output.dir}/myrepository-content-deps.txt">[...@apache:/]$ find 
${tutorial.src.dir}/build-a-ivy-repository/myrepository/no-namespace/org.hibernate/hibernate
 -type f -print${line.separator}</echo>
         <echo file="${output.dir}/myrepository-content-deps.txt" 
append="true">${myrepository.content.deps}</echo>
         <delete dir="${tutorial.build.dir}" />
 
@@ -131,9 +141,7 @@
         <run-tutorial antfile="${tutorial.src.dir}/multi-project/build.xml" 
target="publish-all" 
output="${output.dir}/multi-project-general-publishall.txt" />
         <delete dir="${tutorial.build.dir}" />
 
-               <!-- Correct the location of the examples to original location 
-->
-               <delete file="${output.dir}/dummy.txt" />
-
+               <!-- Correct the location of the examples to a dummy '/ivy' 
location -->
                <pathconvert property="tutorial.root" dirsep="/">
                        <identitymapper/>
                        <path location="${tutorial.src.dir}"/>
@@ -142,48 +150,60 @@
             <identitymapper/>
             <path location="${tutorial.local-repo}"/>
         </pathconvert>
-               
+        <pathconvert property="ivy.jar.location" dirsep="/">
+            <identitymapper/>
+            <fileset file="${artifacts.build.dir}/jars/${final.name}" />
+        </pathconvert>
+
         <replace dir="${output.dir}" token="\" value="/" />
                <replace dir="${output.dir}" token="${tutorial.root}" 
value="/ivy" />
         <replace dir="${output.dir}" token="${tutorial.local}" 
value="/home/ivy/.ivy2/local" />
+        <replace dir="${output.dir}" token="${ivy.jar.location}" 
value="//home/ivy/ivy.jar" />
+               <replace dir="${output.dir}" token="-f build.xml " value="" />
+               
+               <copy todir="${doc.tmp.dir}/tutorial/log">
+                       <fileset dir="${output.dir}" />
+               </copy>
        </target>
        
-       <target name="generate-doc" depends="release-version">
-               <!-- copy documentation to temp dir to replace version tokens 
-->
-               <property name="doc.tmp.dir" value="${build.dir}/tempdoc" />
-               <mkdir dir="${doc.tmp.dir}" />
-               <copy todir="${doc.tmp.dir}" preservelastmodified="true" 
overwrite="true">
-                       <fileset dir="${doc.src.dir}" />
-                   <filterset>
-                     <filter token="version" value="${build.version}"/>
-                   </filterset>
-               </copy>         
-               
+       <target name="generate-doc-init" depends="release-version">
+        <!-- copy documentation to temp dir to replace version tokens -->
+        <property name="doc.tmp.dir" value="${build.dir}/tempdoc" />
+        <mkdir dir="${doc.tmp.dir}" />
+        <copy todir="${doc.tmp.dir}" preservelastmodified="true" 
overwrite="true">
+            <fileset dir="${doc.src.dir}" />
+            <filterset>
+              <filter token="version" value="${build.version}"/>
+            </filterset>
+        </copy>     
+       </target>
+       
+       <target name="generate-doc" depends="generate-doc-init, 
generate-tutorial-output">
         <copy todir="${doc.build.dir}">
-               <fileset dir="${doc.src.dir}" 
includes="images/**,style/**,samples/**,js/**,ivy.xsd" />
+            <fileset dir="${doc.src.dir}" 
includes="images/**,style/**,samples/**,js/**,ivy.xsd" />
         </copy>
 
-               <!-- requires java 6 jdk in path and Apache Ant 1.7 -->
+        <!-- requires java 6 jdk in path and Apache Ant 1.7 -->
         <taskdef uri="antlib:xooki" file="${doc.src.dir}/xooki/antlib.xml" />
         <xooki:generate destDir="${doc.build.dir}" checkUpToDate="true">
-                       <fileset dir="${doc.tmp.dir}">
-                           <include name="**/*.html"/>
-                           <exclude name="template.html"/>
-                           <exclude name="*Template.html"/>
-                           <exclude name="conflict-solving-algo.html"/>
-                           <exclude name="use.html"/>
-                           <exclude name="samples/**"/>
-                           <exclude name="js/**"/>
-                           <exclude name="reports/**"/>
-                           <exclude name="xooki/**"/>
-                       </fileset>
-               </xooki:generate>
-
-               <!-- generate print-friendly doc -->
-               <!-- modify the basedir because othwise xooki.js will not be 
found! --> 
-               <ant antfile="../build-release.xml" target="generate-print-doc" 
dir="doc" />
-    </target>
-       
+            <fileset dir="${doc.tmp.dir}">
+                <include name="**/*.html"/>
+                <exclude name="template.html"/>
+                <exclude name="*Template.html"/>
+                <exclude name="conflict-solving-algo.html"/>
+                <exclude name="use.html"/>
+                <exclude name="samples/**"/>
+                <exclude name="js/**"/>
+                <exclude name="reports/**"/>
+                <exclude name="xooki/**"/>
+            </fileset>
+        </xooki:generate>
+
+        <!-- generate print-friendly doc -->
+        <!-- modify the basedir because othwise xooki.js will not be found! 
--> 
+        <ant antfile="../build-release.xml" target="generate-print-doc" 
dir="doc" />
+       </target>
+               
        <target name="generate-print-doc">
         <!-- requires java 6 jdk in path and Apache Ant 1.7 -->
         <taskdef uri="antlib:xooki" file="${doc.src.dir}/xooki/antlib.xml" />


Reply via email to