ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From ant-...@apache.org
Subject [Ant Wiki] Updated: AntNewbies
Date Sun, 25 Jul 2004 15:53:50 GMT
   Date: 2004-07-25T08:53:50
   Editor: ConorMacNeill <conor@apache.org>
   Wiki: Ant Wiki
   Page: AntNewbies
   URL: http://wiki.apache.org/ant/AntNewbies

   Answer plus a little formatting

Change Log:

------------------------------------------------------------------------------
@@ -50,7 +50,10 @@
 
 {{{
 <target name="buildSources">
-	<javac includes="**/*.java, *.java" srcdir="${dir.project.root}/src" destdir="${dir.build}"
verbose="true" fork="yes" executable="org.eclipse.jdt.internal.compiler.batch.Main">
+	<javac includes="**/*.java, *.java" 
+               srcdir="${dir.project.root}/src" destdir="${dir.build}" 
+               verbose="true" fork="yes" 
+               executable="org.eclipse.jdt.internal.compiler.batch.Main">
 		<classpath refid="classpath"/>
 	</javac>
 </target>
@@ -193,3 +196,16 @@
 }}}
 
 Is there any '''other''' way?
+
+'''Answer #4 '''
+
+You can't set task attributes in the text content of a tag. You must set them as xml attributes
of the tag. There is an example in the manual, which shows what it should look like - http://ant.apache.org/manual/CoreTasks/pack.html.
So for your example it would become
+
+{{{
+	<target name="bzip2">
+		<echo> BZipping ${in} to ${out} ... </echo>
+		<bzip2 src="${in}" destfile="${out}" />
+	</target>
+}}}
+
+The error message and the manual should have pointed you in the right direction here.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message