This week's book giveaway is in the Jobs Discussion forum.
We're giving away four copies of Java Interview Guide and have Anthony DePalma on-line!
See this thread for details.
The moose likes IDEs, Version Control and other tools and the fly likes importing source with existing Ant Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Engineering » IDEs, Version Control and other tools
Bookmark "importing source with existing Ant" Watch "importing source with existing Ant" New topic

importing source with existing Ant

tai pe

Joined: Aug 31, 2007
Posts: 2
I've just joined a new team and the development cycle is very bad. anytime we make a change to the java code we have to run the ant script (build.xml) stop sun app server, undeploy the ear from Sun app server, delete project files from app server, then redeploy the ear thats created by build.xml.

As you can see this is very very tedious and time consuming.

I now have dloaded netbeans 5.0 with Sun app server 8.2. I want to import my code to netbeans and we have an exisiting build.xml as ant script. however, when i select option impport and java source with existing ant script. Netbeans is asking me targets for build, clean, java doc etc. but i dont know where these targets are in our ant script. we currently run the ant script from command prompt like this
ant -Dsubsystem=<projectName> -DnoCodeCheck=y

can some one PLEASE tell me how to achieve this in Netbeans. i'd appreciate any help. i just want to pass those arguments and build the project so i can put it on the app server. THANKS!!
Jan Cumps

Joined: Dec 20, 2006
Posts: 2565

It's nicely documented in NetBeans Online help.

See also:

Regards, Jan

OCUP UML fundamental and ITIL foundation
tai pe

Joined: Aug 31, 2007
Posts: 2
thanks for that..i am atleast able to what i have 229 errors with all my import statements but atleast its building...

Now also i noticed that when i created new project with existing ant source..i ddi not have the option to select server. so now when i build the project (successfully, eventually) then i will still have to do the undeploy..deploy heroics manually on the server. anyway this can be done via Netbeans!?

Thanks again
Freddy Wong
Ranch Hand

Joined: Sep 11, 2006
Posts: 959

Unless your existing script provides a way to deploy/undeploy the apps into the app server, I guess there's no way to do it automatically.

What you can probably do is either to add some lines for deploying/undeploying the apps in your ant script or deploy/deploy your apps manually.

Hope this helps.

SCJP 5.0, SCWCD 1.4, SCBCD 1.3, SCDJWS 1.4
My Blog
I agree. Here's the link:
subject: importing source with existing Ant
It's not a secret anymore!