diff --git a/docs/index.html b/docs/index.html index de202c5cd..ea12f3b08 100644 --- a/docs/index.html +++ b/docs/index.html @@ -232,7 +232,7 @@ command. This example assumes you have set up your classpath to include

Writing a simple buildfile

The buildfile is written in XML. Each buildfile contains one project.

-

Each element of the buildfile can have an ID attribute and +

Each element of the buildfile can have an id attribute and can later be referred to by the value supplied to this. The value has to be unique.

Projects

@@ -511,7 +511,7 @@ that contain space characters, nested elements can be used.

\dir;\dir2;\dir3 on DOS based systems and /dir:/dir2:/dir3 on Unix like systems.

References

-

The ID attribute of the buildfile's elements can be +

The id attribute of the buildfile's elements can be used to refer to them. This can useful if you are going to replicate the same snippet of XML over and over again - using a <classpath> structure more than once for @@ -536,7 +536,7 @@ example.

could be rewritten as

 <rmic ...>
-  <classpath ID="project.class.path">
+  <classpath id="project.class.path">
     <pathelement location="lib/" />
     <pathelement path="${java.class.path}/" />
     <pathelement path="${additional.path}" />
@@ -664,7 +664,7 @@ They are:
 If you do not want these default excludes applied, you may disable them with the 
 defaultexcludes="no" attribute.

PatternSets

-

Patterns can be group to sets and later be referenced by their ID +

Patterns can be group to sets and later be referenced by their id attribute. They are defined via a patternset element - which can currently only appear nested into a FileSet or a directory based task that constitutes @@ -699,7 +699,7 @@ an implicit FileSet.

Examples:

-<patternset ID="non.test.sources" >
+<patternset id="non.test.sources" >
   <include name="**/*.java" />
   <exclude name="**/*Test*" />
 </patternset>
@@ -766,7 +766,7 @@ as PatternSet's attributes.

Examples:

 <fileset dir="${server.src}" >
-  <patternset ID="non.test.sources" >
+  <patternset id="non.test.sources" >
     <include name="**/*.java" />
     <exclude name="**/*Test*" />
   </patternset>
@@ -1047,7 +1047,7 @@ readable and executable for anyone on a UNIX system.

makes all files below shared/sources1 (except those below any directory named trial) writable for members of the same group on a UNIX system. In addition all files belonging to a FileSet -with ID other.shared.sources get the same +with id other.shared.sources get the same permissions.


Copydir

@@ -1587,7 +1587,7 @@ description in the section about exec

invokes ls -l, adding the absolute filenames of all files below /tmp not ending in .txt and all -files of the FileSet with ID other.files to +files of the FileSet with id other.files to the command line.


Filter

@@ -4351,8 +4351,10 @@ elements.

Description:

Execute a script in a BSF supported language. -

All items (tasks, targets, etc) of the running project are accessible -from the script. +

All items (tasks, targets, etc) of the running project are +accessible from the script, using either their name or +id attributes.

+

Scripts can do almost anything a task written in Java could do.

Parameters:

@@ -4373,9 +4375,81 @@ from the script.

Examples

-
-

None yet available

-
+
+<project name="squares" default="main" basedir=".">
+
+  <target name="setup">
+
+    <script language="javascript"> <![CDATA[
+
+      for (i=1; i<=10; i++) {
+        echo = squares.createTask("echo");
+        main.addTask(echo);
+        echo.setMessage(i*i);
+      }
+
+    ]]> </script>
+
+  </target>
+
+  <target name="main" depends="setup" />
+
+</project>
+
+

generates

+
+setup:
+
+main:
+1
+4
+9
+16
+25
+36
+49
+64
+81
+100
+
+BUILD SUCCESSFUL
+
+

Another example, using references by id.

+
+<project name="testscript" default="main">
+  <target name="sub">
+    <echo id="theEcho" />
+  </target>
+
+  <target name="sub1">
+    <script language="javascript"><![CDATA[
+      theEcho.setMessage("In sub1");
+      sub.execute();
+    ]]></script>
+  </target>
+
+  <target name="sub2">
+    <script language="javascript"><![CDATA[
+      theEcho.setMessage("In sub2");
+      sub.execute();
+    ]]></script>
+  </target>
+
+  <target name="main" depends="sub1,sub2" />
+</project>
+
+

generates

+
+sub1:
+In sub1
+
+sub2:
+In sub2
+
+main:
+
+BUILD SUCCESSFUL
+

VssGet

Description:

diff --git a/docs/junit.html b/docs/junit.html index 3165109d7..40aaec2c6 100644 --- a/docs/junit.html +++ b/docs/junit.html @@ -190,7 +190,7 @@ can be specified.

of nested <fileset> and <filesetref> (referring to a -<fileset> defined elsewhere via its ID +<fileset> defined elsewhere via its id attribute) elements. It then generates a test class name for each file that ends in .java or .class.