ant-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Echlin, Robert" <Robert.Ech...@windriver.com>
Subject RE: Why is the java command not executing
Date Mon, 29 Aug 2011 13:55:24 GMT
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


Mime
View raw message