Readings : References, Articles and Tutorials
- Using Antlib props in Ant 1.8
- How can I do something like <property name="prop" value="${${anotherprop}}"/> (double expanding the property)?
Pattern to Specify Files and Directories
Notable Ant Tasks
- The Apache Ant Libraries Subproject
- Ant-Contrib Tasks
- Maven Ant Tasks
- WebLogic Server 9.0 Ant Tasks to configure and use a server domain
- WebLogic Server 11.1 Ant Tasks to configure and use a server domain
- WebLogic Server 11.1 Ant Tasks to deploy applications and modules :
wldeploy
- Ant tasks for markup conversion in Mylyn WikiText
- Antelope
Input
task- AntForm/AntMenu
AntForm provides an Ant task (see usage) for setting property values through a Swing-based form. - FMPP Ant task
- SvnAnt
an ant task that provides an interface to Subversion revision control system - TestNG Ant Task
Using Saxon in Ant XSLT Task
If you don't read the following article, you would do really lots of trial and error to use Saxon XSLT processor with XSLT task of Ant.
Listing members of fileset
or path-like structure
line by line
For eye-checking or reporting purpose, sometimes it is necessary to list members of fileset
each one in it's line.
You can do this using pathconvert
and echo
tasks.
The following is snippet used to list non-java files in source directories of Maven
projects (which are multi-module form).
You can also list path-like structure line by line using <pathconvert>
task.
Actually <pathconvert>
can also be applied to dirset
, filelist
, or propertyset
as well. For details, refer http://ant.apache.org/manual/Tasks/pathconvert.html
Including another path-like structure within a path-like structure
If you want include a path-like structure to another, you can use <path refid="...">
like this.
Note that you should not use <pathelement path="...">
. The value of path
attribute in pathelement
is expected to be string corresponding to path not id of path-like structure.
The following would cause error.
If you really want to use pathelement
all the way, you can use toString
function.
The following would work.
Note that ${java.class.path}
which can be evaluated from default system properties of Java is just string corresponding to classpath and maven.plugin.classpath
which is defined implicitly with maven-antrun-plugin
is id of path-like structure.
So, you should use them like the following.
Printing environment variables
To identify all the environment variables
and their values defined within the process the current Ant build is running, you can use
echo
task with environment
attribute.
The above property
task makes properties for all the environment variables in current process with the property names prefixed by 'env'.
1 comments:
Nice blog you have thanks for posting
Post a Comment