Win a copy of Mesos in Action this week in the Cloud/Virtualizaton forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

importing source with existing Ant

 
tai pe
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 2588
11
C++ Linux Netbeans IDE
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
It's nicely documented in NetBeans Online help.

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

Regards, Jan
 
tai pe
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 959
Eclipse IDE Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic