Author: hibou
Date: Wed Mar 30 22:01:31 2011
New Revision: 1087102

URL: http://svn.apache.org/viewvc?rev=1087102&view=rev
Log:
Allow to change the folder where is xooki

Modified:
    ant/site/xooki/antlib.xml

Modified: ant/site/xooki/antlib.xml
URL: 
http://svn.apache.org/viewvc/ant/site/xooki/antlib.xml?rev=1087102&r1=1087101&r2=1087102&view=diff
==============================================================================
--- ant/site/xooki/antlib.xml (original)
+++ ant/site/xooki/antlib.xml Wed Mar 30 22:01:31 2011
@@ -20,11 +20,17 @@
     <scriptdef name="generate" language="javascript">
         <element name="fileset" type="fileset"/>
         <attribute name="destDir"/>
+        <attribute name="xookidir"/>
         <attribute name="checkUpToDate"/>
         <attribute name="printerFriendly"/>
         <![CDATA[
         importClass(java.io.File);
 
+        var xookidir = attributes.get("xookidir");
+        if (xookidir == null) {
+            xookidir = project.getProperty("basedir") + "/xooki";
+        }
+
         filesets = elements.get("fileset")
         for (j = 0; j < filesets.size(); j++) {
             fs = filesets.get(j);
@@ -62,7 +68,7 @@
                 exec.setDir(new File(basedir));
                 exec.setExecutable("jrunscript");
                 exec.setTaskName("generate");
-                exec.createArg().setValue(srcDir+"/xooki/xooki.js");
+                exec.createArg().setValue(xookidir + "/xooki.js");
                 exec.createArg().setValue(filename);
                 exec.createArg().setValue(attributes.get("destdir") + "/" + 
filepath);
                 if (attributes.get("printerfriendly") == "true") {


Reply via email to