Author: xavier
Date: Thu Jul  5 08:24:33 2007
New Revision: 553539

URL: http://svn.apache.org/viewvc?view=rev&rev=553539
Log:
use xooki antlib for doc generation

Modified:
    incubator/ivy/core/trunk/build-release.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=553539&r1=553538&r2=553539
==============================================================================
--- incubator/ivy/core/trunk/build-release.xml (original)
+++ incubator/ivy/core/trunk/build-release.xml Thu Jul  5 08:24:33 2007
@@ -16,55 +16,31 @@
    specific language governing permissions and limitations
    under the License.    
 -->
-<project name="IvyRelease" default="snapshot" 
xmlns:ivy="antlib:fr.jayasoft.ivy.ant">
+<project name="IvyRelease" default="snapshot" 
+               xmlns:ivy="antlib:fr.jayasoft.ivy.ant"
+               xmlns:xooki="antlib:xooki">
        <import file="build.xml"/>
+       
+       <taskdef uri="antlib:xooki" file="${doc.src.dir}/xooki/antlib.xml" />
 
        <target name="generate-doc">
-               <!-- requires java 6 jdk in path and Apache Ant 1.7 -->
         <copy todir="${doc.build.dir}">
                <fileset dir="${doc.src.dir}" 
includes="images/**,style/**,samples/**,js/**" />
         </copy>
-        <script language="javascript"><![CDATA[
-          importClass(java.io.File);
-        
-             fs = project.createDataType("fileset");
-             fs.setDir( new File(project.getProperty("doc.src.dir")) );
-             fs.setIncludes("**/*.html");
-             fs.setExcludes("template.html,"
-                                       +"*Template.html,"
-                                       +"conflict-solving-algo.html,"
-                                       +"doc/use.html,"
-                                       +"doc/reference.html,"
-                                               +"samples/**,"
-                                               +"js/**,"
-                                       +"reports/**,"
-                                       +"xooki/**,"
-                                       +"presentations/**,"
-                                       +"test/**");
-       
-             // Get the files (array) of that fileset
-             ds = fs.getDirectoryScanner(project);
-             srcFiles = ds.getIncludedFiles();
-       
-             // iterate over that array
-             for (i=0; i<srcFiles.length; i++) {
-       
-               // get the values via Java API
-               var file = new File(fs.getDir(project), srcFiles[i]);
-               
-                       var basedir = file.getParent();
-                       var filename = file.getName();
-                       var filepath = srcFiles[i].substring(0, 
srcFiles[i].lastIndexOf(project.getProperty("file.separator"))+1);
-        
-               exec = project.createTask("exec");
-               exec.setDir(new File(basedir));
-               exec.setExecutable("jrunscript");
-               
exec.createArg().setValue(project.getProperty("doc.src.dir")+"/xooki/xooki.js");
-               exec.createArg().setValue(filename);
-               
exec.createArg().setValue(project.getProperty("doc.build.dir")+"/"+filepath);
-               exec.perform();
-                 }
-        ]]></script>
+               <!-- requires java 6 jdk in path and Apache Ant 1.7 -->
+        <xooki:generate destDir="${doc.build.dir}" checkUpToDate="true">
+                       <fileset dir="${doc.src.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>
        </target>
 
        <target name="all-doc" depends="javadoc, generate-doc" />


Reply via email to