This week's book giveaways are in the Java EE and JavaScript forums.
We're giving away four copies each of The Java EE 7 Tutorial Volume 1 or Volume 2(winners choice) and jQuery UI in Action and have the authors on-line!
See this thread and this one 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 The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript 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
Author

importing source with existing Ant

tai pe
Greenhorn

Joined: Aug 31, 2007
Posts: 2
Hello
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
Bartender

Joined: Dec 20, 2006
Posts: 2497
    
    8

It's nicely documented in NetBeans Online help.

See also:
http://wiki.netbeans.org/wiki/view/FaqAntParameters

Regards, Jan


OCUP UML fundamental and ITIL foundation
youtube channel
tai pe
Greenhorn

Joined: Aug 31, 2007
Posts: 2
thanks for that..i am atleast able to compile...so 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: http://aspose.com/file-tools
 
subject: importing source with existing Ant