Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsWhite Papers
Discussion GroupsFirst AidDatabasesJavaBeansGUIJava 3DVirtual MachineCORBASecurityToolsGeneral
Java DirectoryOpen Source ProjectsSample Book ChaptersUser GroupsWeb Resources
Related Topics
Databases.NETMore Topics ...

Java Forum / General / February 2007

Tip: Looking for answers? Try searching our database.

need Ant syntax help

Thread view: 
gk - 01 Feb 2007 15:02 GMT
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
Juan Singh - 01 Feb 2007 15:07 GMT
> Hi i have an entry in ant build.xml  like this
>
[quoted text clipped - 10 lines]
>
> 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.
heysc0tt@gmail.com - 01 Feb 2007 16:44 GMT
> Hi i have an entry in ant build.xml  like this
>
[quoted text clipped - 10 lines]
>
> 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


Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.