Date: 2004-07-25T08:53:50
   Editor: ConorMacNeill <[EMAIL PROTECTED]>
   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: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to