Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How do I create a WAR file using NetBeans' generated ant script?

I'm trying to configure an automated build process, and I need to get a WAR file to deploy to Tomcat. The project was created in Netbeans, which automatically generates an ant script. I think when I click "Clean and Build Project" from the menu it runs a series of ant targets and generates the WAR that I need. So does anyone know which ant targets Netbeans runs when you click "Clean and Build Project". My theory is that I can just run the same targets on my own. Does that make sense or is there a better way to do it? Thanks.

like image 839
Brian Avatar asked Jun 16 '26 18:06

Brian


1 Answers

You can run the 'dist' target to generate the war file that you can distribute to Tomcat. If you ant to do the equivalent of 'Clean and Build', you can run 'ant clean dist'.

like image 83
vkraemer Avatar answered Jun 21 '26 01:06

vkraemer



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!