ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Parag Doke <parag.d...@gmail.com>
Subject Re: Why is the java command not executing
Date Tue, 30 Aug 2011 06:17:16 GMT
Hello Venu.
That's right ... ant won't execute targets in the order they appear in
the build.xml file.
Here is the link to the manual:
http://ant.apache.org/manual/targets.html

Hope this helps,
Parag Doke
Save paper, save trees. Do not print emails/documents unless
absolutely necessary.



On Tue, Aug 30, 2011 at 9:25 AM, VR Venugopal Rao <venu@cmcltd.com> wrote:
> Hi Robert,
> Thanks for the clarification.
> Does it mean that ant execution does not go sequentially as per the targets
> specified in the build file?
> I mean I have given the following sequence:
> --init
> --compile depends on init
> --javdocs depends on compile
> --archive depends on compile
> --execute depends on archive
> --clean depends on execute
>
>
> Regards,
> Venu
>
>
>
> -----Original Message-----
> From: Echlin, Robert [mailto:Robert.Echlin@windriver.com]
> Sent: 29 August 2011 19:25
> To: Ant Users List
> Subject: RE: Why is the java command not executing
>
> Hi Venu,
> default target is archive
> archive depends on compile, so compile is run.
> compile depends on init, so init is run.
>
> That's all that is happening, so of course the execute doesn't happen..
>
> Make archive depends="compile, execute".
> Then it will do
> - init
> - compile
> - execute
> - archive
>
> Rob
>
>
>> -----Original Message-----
>> From: VR Venugopal Rao [mailto:venu@cmcltd.com]
>> Sent: Monday, August 29, 2011 2:38 AM
>> To: 'Ant Users List'
>> Subject: Why is the java command not executing
>>
>> Output:
>>
>> The Build is sucessfuly creating the jar file but not executing the
>> Java file.
>> Any idea why the java is not executing the file.
>> Regards,
>> Venu.
>>
>>
>>
>> <?xml version="1.0" encoding="UTF-8"?>
>> <!--                  packagenames="org.*, de.*, test.*, writer.*"  
 -->
>> <project name="structured" default="archive" > <target name="init">
>>       <mkdir dir="build/classes" />
>>       <mkdir dir="build/classes/docs" />
>>       <mkdir dir="dist" />
>>       </target>
>>
>>       <target name="compile" depends="init" >
>>               <javac srcdir="src"
>>               destdir="build/classes"/>
>>       </target>
>> <target name="javadocs" depends="compile" description="make the java
>> docs" >
>>       <javadoc author="true"
>>               destdir="build/classes/docs"
>>               packagenames="org.*"
>>               sourcepath="src"
>>               use="true"
>>               version="true"
>>               windowtitle="documentation"
>>               private="true">
>>               <classpath refid="compile.classpath"/>
>>       </javadoc>
>> </target>
>>
>> <target name="archive" depends="compile" >
>>       <jar destfile="dist/project.jar"
>>       basedir="build/classes" />
>> </target>
>>
>> <target name="execute" depends="compile">
>>       <java
>>       classname="org.example.antbook.lesson1.Main"
>>       classpath="build/classes">
>>       <arg value="a"/>
>>       <arg value="b"/>
>>       <arg file="."/>
>>       </java>
>>
>>       <java
>>               classname="org.example.antbook.lesson1.HelloWorld"
>>               classpath="build/classes">
>>       </java>
>> </target>
>> <target name="clean" depends="execute">
>>       <delete dir="build" />
>>       <delete dir="dist" />
>> </target>
>>
>>
>> </project>
>>
>>
>>
>> __________________________________________________________
>> ____________________
>>
>> DISCLAIMER
>>
>> The information contained in this e-mail message and/or attachments to
>> it may contain confidential or privileged information. If you are not
>> the intended recipient, any dissemination, use, review, distribution,
>> printing or copying of the information contained in this e-mail
>> message and/or attachments to it are strictly prohibited. If you have
>> received this communication in error, please notify us by reply e-mail
>> or directly to netsupport@cmcltd.com or telephone and immediately and
>> permanently delete the message and any attachments. Thank you.
>>
>> __________________________________________________________
>> ____________________
>>
>> This email has been scrubbed for your protection by SecureMX.
>> For more information visit http://securemx.in
>> __________________________________________________________
>> ___________________
>>
>> ---------------------------------------------------------------------
>> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
>> commands, e-mail: user-help@ant.apache.org
>
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org For additional
> commands, e-mail: user-help@ant.apache.org
>
>
>
> ______________________________________________________________________________
>
> DISCLAIMER
>
> The information contained in this e-mail message and/or attachments to it may
> contain confidential or privileged information. If you are not the intended
> recipient, any dissemination, use, review, distribution, printing or copying
> of the information contained in this e-mail message and/or attachments to it
> are strictly prohibited. If you have received this communication in error,
> please notify us by reply e-mail or directly to netsupport@cmcltd.com or
> telephone and immediately and permanently delete the message and any
> attachments. Thank you.
>
> ______________________________________________________________________________
>
> This email has been scrubbed for your protection by SecureMX.
> For more information visit http://securemx.in
> _____________________________________________________________________________
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: user-unsubscribe@ant.apache.org
> For additional commands, e-mail: user-help@ant.apache.org
>
>

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


Mime
View raw message