need Ant syntax help

G

gk

Hi i have an entry in ant build.xml like this

<target name="all" depends="clean, init,compile_source, jar, ejbc,
war, ear, deploy" />

i dont want to deploy but want to execute all other target.

how do i run Ant ?
ant all -deploy // this does not work

can you please tell me the proper syntax for this ?

thank you
 
J

Juan Singh

gk said:
Hi i have an entry in ant build.xml like this

<target name="all" depends="clean, init,compile_source, jar, ejbc,
war, ear, deploy" />

i dont want to deploy but want to execute all other target.

how do i run Ant ?


can you please tell me the proper syntax for this ?

thank you

The answer depends upon what each ant task does. However, I would assume
that the task 'ear' should do what you want. You cannot create an .EAR
file unless your files are compiled and packed. Therefore, try the following

ant ear

Check what does 'ear' task depend upon in your build.xml file.

Regards.
 
H

heysc0tt

Hi i have an entry in ant build.xml like this

<target name="all" depends="clean, init,compile_source, jar, ejbc,
war, ear, deploy" />

i dont want to deploy but want to execute all other target.

how do i run Ant ?


can you please tell me the proper syntax for this ?

thank you

Without seeing how the rest of the targets are defined its hard to
give a good answer to this, but what you may want to do is setup each
task (if it is not already) to depend on the previous task that way
you can run it as far as you want to and it will do everything that it
needs to up to that point. (i.e. deploy depends on ear which depends
on war which depends on ejbc...) in that case running "ant ear" would
clean, compile and package the project without deploying it.) Then if
you wanted to run an "ant all" type command you could just run "ant
deploy" instead which would be more intuitive to a user. Or if you
wanted to keep the all task, you could just have it depend on the
deploy task which would in turn run all the other tasks.

Scott
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
474,156
Messages
2,570,878
Members
47,408
Latest member
AlenaRay88

Latest Threads

Top