• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Jeanne Boyarsky
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Rob Spoor
  • Devaka Cooray
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Frits Walraven
  • Tim Moores
Bartenders:
  • Mikalai Zaikin

is Ant the solution I'm looking for?

 
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Up until now, I've added pages and files to our intranet environment by simply using ftp to copy the new files. We do not update our application using a war file. I have to copy the various javascripts, css files, jsps, beans, java classes, and servlets to the correct locations and modify the web.xml file manually. This has become cumbersome, and as we need a way to move some of these web pages to other locations, impractical.

Can an Ant script do this for me? Can I integrate it within Netbeans? One build.xml won't work for me; I need multiple Ant scripts that will deploy various subsets of our web application. One script may only need to copy 3 files, another may need to copy 20 and add a half dozen servlets to the web.xml.

I wrote an Ant script once about six years ago, so I'm more or less starting from scratch on this. If Ant is not the right tool for the job, what is? Python or perl scripts or something else?
 
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Yes you can use Ant for this; I routinely use an Ant build to generate the war files. (I cannot imagine deploying a web app without a war file.)

There is even an Ant task specifically for building war files.

Not sure why you feel you need multiple scripts from what you described, but yes, an ant build can "call" other scripts.

Don't know about netbeans -- wouldn't touch it -- but Ant is easily used from IntelliJ. I cannot imagine that netbeans doesn't have similar capability.
 
J. Kevin Robbins
Bartender
Posts: 1810
28
jQuery Netbeans IDE Eclipse IDE Firefox Browser MySQL Database Chrome Linux
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Let me make sure I understand. The Ant script will build a small war file containing only the files I specify, not all the files in the application project, correct?

I can't deploy the entire project as I don't have control over everything and often don't even have the most recent source code. But yes, it all runs under one context. A recipe for disaster, no? But that's the world I live in.

How do you create multiple Ant files and then specify which one you want to run? Is a simple "right-click and run" all that's needed? I though Ant was tied to that build.xml file with only one per project.

I need to do some experimenting rather than ask you for a lesson in Ant. I'm off to google for Ant tutorials.
 
Bear Bibeault
Sheriff
Posts: 67746
173
Mac Mac OS X IntelliJ IDE jQuery TypeScript Java iOS
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

J. Kevin Robbins wrote:I'm off to google for Ant tutorials.



 
If you try to please everybody, your progress is limited by the noisiest fool. And this tiny ad:
a bit of art, as a gift, that will fit in a stocking
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic