Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Echoing out ant fileset to screen for Debugging

Tags:

java

ant

ivy

I have this:

    <ivy:buildlist reference="build-path">         <fileset dir="${root.dir}">             <include name="*/build.xml" />             <include name="controllers/*/build.xml" />         </fileset>     </ivy:buildlist>       <subant buildpathref="build-path">         <target name="jar.all" />         <target name="publish-local" />     </subant> 

I want to echo out everything that is in the "build-path" reference (for debugging some things).

I have tried:

<echo>${build-path}</echo> 

but it just echos that exact text "${build-path}"

like image 944
mainstringargs Avatar asked Oct 14 '10 14:10

mainstringargs


People also ask

How do I run Ant in debug mode?

To run Ant build in debug or verbose mode in command prompt, we can simply use the -d or -debug (for debug mode) and -verbose (for verbose mode). This gives us deep insight into any error we might be facing with the Ant build.

What is FileSet in Ant?

A FileSet is a group of files. These files can be found in a directory tree starting in a base directory and are matched by patterns taken from a number of PatternSets and Selectors. PatternSets can be specified as nested <patternset> elements.

What is Ant scripting?

Ant is a Java-based build tool created as part of the Apache open-source project. You can think of it as a Java version of make. Ant scripts have a structure and are written in XML. Similar to make, Ant targets can depend on other targets. For example, Ant is used in the context of plug-in development in the build.


1 Answers

You can use the documented (honest, it's in there somewhere...) toString helper:

<echo message="My build-path is ${toString:build-path}" /> 
like image 193
martin clayton Avatar answered Oct 06 '22 00:10

martin clayton