From 7eeb33d5e8967edf6ba8523f354e4d7e45ab929b Mon Sep 17 00:00:00 2001
From: Gintas Grigelionis
++<ant antfile="subproject/subbuild.xml" target="compile"/> <ant dir="subproject"/> @@ -343,66 +343,66 @@ targets so specified, in the order specified. <ant inheritAll="false" antfile="subproject/subbuild.xml"> <property name="output.type" value="html"/> </ant> -
These lines invoke the same build file:
-++<ant antfile="sub1/sub2/build.xml" /> <ant antfile="sub2/build.xml" dir="sub1" /> <ant antfile="build.xml" dir="sub1/sub2" /> -
The build file of the calling project defines some
<path>
elements like this:
++<path id="path1"> ... </path> <path id="path2"> ... </path> -
and the called build file (subbuild.xml
) also defines
a <path>
with the id path1
, but
path2
is not defined:
++<ant antfile="subbuild.xml" inheritrefs="true"/> -
will not override subbuild
's definition of
path1
, but make the parent's definition of
path2
available in the subbuild.
++<ant antfile="subbuild.xml"/> -
as well as
-++<ant antfile="subbuild.xml" inheritrefs="false"/> -
will neither override path1
nor copy
path2
.
++<ant antfile="subbuild.xml" inheritrefs="false"> <reference refid="path1"/> </ant> -
will override subbuild
's definition of
path1
.
++<ant antfile="subbuild.xml" inheritrefs="false"> <reference refid="path1" torefid="path2"/> </ant> -
will copy the parent's definition of path1
into the
new project using the id path2
.
since Ant 1.6.3.
++<target name="default"> <antcall target="doSomethingElse"> <param name="param1" value="value"/> @@ -183,14 +183,14 @@ targets so specified, in the order specified. <target name="doSomethingElse"> <echo message="param1=${param1}"/> </target> -
Will run the target 'doSomethingElse' and echo 'param1=value'.
-++<antcall ... > <reference refid="path1" torefid="path2"/> </antcall> -
will copy the parent's definition of path1
into the
new project using the id path2
.
<jvmarg>
attributes, for example:
href="../using.html#arg">Command line arguments.
++<antlr target="etc/java.g" outputdirectory="build/src"/> -
This invokes ANTLR on grammar file etc/java.g, writing the generated files to build/src. diff --git a/manual/Tasks/antstructure.html b/manual/Tasks/antstructure.html index 55810403a..3d525bb1b 100644 --- a/manual/Tasks/antstructure.html +++ b/manual/Tasks/antstructure.html @@ -68,9 +68,7 @@ element of this task - see the example below.
+-<antstructure output="project.dtd" /> -
<antstructure output="project.dtd"/>
Emitting your own structure instead of a DTD
diff --git a/manual/Tasks/antversion.html b/manual/Tasks/antversion.html index 3e9919f20..ee1bece88 100644 --- a/manual/Tasks/antversion.html +++ b/manual/Tasks/antversion.html @@ -60,34 +60,33 @@ Stores the Apache Ant version (when used as task) or checks for a specific Ant v -++<antversion property="antversion"/> -
Stores the current Ant version in the property antversion.
-++<antversion property="antversion" atleast="1.6"/> -
Stores the Ant version in the property antversion if the current Ant version is 1.6.0 or higher. Otherwise the property remains unset.
-++<antversion property="ant-is-exact-7" exactly="1.7.0"/> -
Sets the property ant-is-exact-7 if Ant 1.7.0 is running. Neither 1.6.5 nor 1.7.0 would match.
-++<condition property="Ant17isOnline"> <and> <antversion exactly="1.7.0"/> <http url="http://ant.apache.org"/> </and> </condition> -
Sets Ant17isOnline if Ant 1.7.0 is running and can get a non-error-response from the Ant homepage.
diff --git a/manual/Tasks/apply.html b/manual/Tasks/apply.html index dd42fe953..0ed887926 100644 --- a/manual/Tasks/apply.html +++ b/manual/Tasks/apply.html @@ -399,7 +399,7 @@ files for each sourcefile. of executions (with maxparallel > 0) and null will be used a source file just like it is in the case ofexec
.
++<apply executable="ls"> <arg value="-l"/> <fileset dir="/tmp"> @@ -409,25 +409,25 @@ files for each sourcefile. </fileset> <fileset refid="other.files"/> </apply> -
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
the command line.
++<apply executable="somecommand" parallel="false"> <arg value="arg1"/> <srcfile/> <arg value="arg2"/> <fileset dir="/tmp"/> </apply> -
invokes somecommand arg1 SOURCEFILENAME arg2
for each
file in /tmp
replacing SOURCEFILENAME with the absolute
filename of each file in turn. If parallel
had been set
to true, SOURCEFILENAME would be replaced with the absolute filenames
of all files separated by spaces.
++<apply executable="cc" dest="src/C" parallel="false"> <arg value="-c"/> <arg value="-o"/> @@ -436,13 +436,13 @@ of all files separated by spaces. <fileset dir="src/C" includes="*.c"/> <mapper type="glob" from="*.c" to="*.o"/> </apply> -
invokes cc -c -o TARGETFILE SOURCEFILE
for each
.c
file that is newer than the corresponding
.o
, replacing TARGETFILE with the absolute filename of
the .o
and SOURCEFILE with the absolute name of the
.c
file.
+ Applies the fictitious "processfile" executable to all files matching+<mapper id="out" type="glob" from="src${file.separator}*.file" to="dest${file.separator}*.out"/> @@ -454,7 +454,7 @@ the.o
and SOURCEFILE with the absolute name of the <outputmapper refid="out"/> </redirector> </apply> -
*.file
in the src
directory.
The out
<mapper>
has been set up to map
@@ -464,7 +464,7 @@ task. A reference to out
is then used as an
<outputmapper>
nested in a <redirector>
, which in turn is
nested beneath this <apply>
instance. This allows us to perform
dependency checking against output files--the target files in this case.
-+ Applies the "ls" executable to all directories in the PATH, effectively listing all executables that are available on the PATH. -+<apply executable="ls" parallel="true" force="true" dest="${basedir}" append="true" type="both"> <path> @@ -472,11 +472,11 @@ dependency checking against output files--the target files in this case. </path> <identitymapper/> </apply> -
+ Conversion of the command+<apply executable="jsmin" addsourcefile="false"> <!-- Collect the JS-files --> <fileset dir="src" includes="*.js"/> @@ -488,7 +488,7 @@ listing all executables that are available on the PATH. <outputmapper id="out" type="glob" from="*.js" to="dest/*.js"/> </redirector> </apply> -
jsmin < src/a.js > dest/a.js
but for
all files in the src-directory. Because the filename itself should not be passed
to the jsmin
program, the addsourcefile
is set to
diff --git a/manual/Tasks/attrib.html b/manual/Tasks/attrib.html
index 86200b83f..dc8d73479 100644
--- a/manual/Tasks/attrib.html
+++ b/manual/Tasks/attrib.html
@@ -136,21 +136,15 @@ directory tree), so you'll have to experiment a little.
+<attrib file="${dist}/run.bat" readonly="true" hidden="true"/>-
makes the "run.bat" file read-only and hidden.
- --<attrib readonly="false"> +<attrib readonly="false"> <fileset dir="${meta.inf}" includes="**/*.xml"/> </attrib>-
makes all ".xml" files below ${meta.inf}
readable.
-++<attrib readonly="true" archive="true"> <fileset dir="shared/sources1"> <exclude name="**/trial/**"/> @@ -158,7 +152,7 @@ directory tree), so you'll have to experiment a little. <fileset refid="other.shared.sources"/> </attrib>-
makes all files below shared/sources1
(except those below any
directory named trial) read-only and archived. In addition all files belonging
to a FileSet with id
other.shared.sources
get the
diff --git a/manual/Tasks/available.html b/manual/Tasks/available.html
index 3b0a9c751..57ba9cef4 100644
--- a/manual/Tasks/available.html
+++ b/manual/Tasks/available.html
@@ -115,41 +115,41 @@ href="../using.html#path">path-like structure and can also be set via a nest
href="../using.html#path">path-like structure and can also be set via a nested
<filepath>
element.
++<available classname="org.whatever.Myclass" property="Myclass.present"/> -
sets the Myclass.present
property to the value "true"
if the class org.whatever.Myclass
is found in Ant's classpath.
++<property name="jaxp.jar" value="./lib/jaxp11/jaxp.jar"/> <available file="${jaxp.jar}" property="jaxp.jar.present"/> -
sets the jaxp.jar.present
property to the value "true"
if the file ./lib/jaxp11/jaxp.jar
is found.
++<available file="/usr/local/lib" type="dir" property="local.lib.present"/> -
sets the local.lib.present
property to the value "true"
if the directory /usr/local/lib
is found.
++...in project ... <property name="jaxp.jar" value="./lib/jaxp11/jaxp.jar"/> <path id="jaxp" location="${jaxp.jar}"/> ...in target ... <available classname="javax.xml.transform.Transformer" classpathref="jaxp" property="jaxp11.present"/> -
sets the jaxp11.present
property to the value "true"
if the class javax.xml.transform.Transformer
is found in the classpath referenced by jaxp
(in this case, ./lib/jaxp11/jaxp.jar
).
++<available property="have.extras" resource="extratasks.properties"> <classpath> <pathelement location="/usr/local/ant/extra.jar" /> </classpath> </available> -
sets the have.extras
property to the value "true"
if the resource-file extratasks.properties
is found.
+ will set+<basename property="jar.filename" file="${lib.jarfile}"/> -
jar.filename
to
myjar.jar
, if lib.jarfile
is defined as either a
full-path filename (eg., /usr/local/lib/myjar.jar
),
a relative-path filename (eg., lib/myjar.jar
),
or a simple filename (eg., myjar.jar
).
-+ will set+<basename property="cmdname" file="D:/usr/local/foo.exe" suffix=".exe"/> -
cmdname
to foo
.
-+ will set+<property environment="env"/> <basename property="temp.dirname" file="${env.TEMP}"/> -
temp.dirname
to the last directory element of
the path defined for the TEMP
environment variable.
diff --git a/manual/Tasks/bindtargets.html b/manual/Tasks/bindtargets.html
index fdf679f12..538d538de 100644
--- a/manual/Tasks/bindtargets.html
+++ b/manual/Tasks/bindtargets.html
@@ -44,12 +44,10 @@ target dependencies but only in your context.
target which will be the bridge between the target to bind and the extension
point. For instance:
-+<bindtargets targets="jar,javadoc" extensionPoint="dist" />
<bindtargets targets="jar,javadoc" extensionPoint="dist" />is quite equivalent to: -
-<target name="bind-to-dist" depends="jar,javadoc" extensionOf="dist" />
-This task basically avoid the creation of a target. -
+<target name="bind-to-dist" depends="jar,javadoc" extensionOf="dist" />+
This task basically avoid the creation of a target.
The bindtargets task may only be used as a top-level task. This means that it may not be used in a target. This is making the target dependency graph static @@ -84,9 +82,9 @@ and predictable as soon as every build file is loaded.
+-<bindtargets targets="build-jar,build-src-jar" extensionPoint="dist" /> -
+<bindtargets targets="build-jar,build-src-jar" extensionPoint="dist"/> +