views:

211

answers:

2

Hi guys - I'm using Netbeans IDE for developing the web applications and I've some JARs available in the application server which doesn't need to be with WAR but we needed them to compile and run locally. Is there an option in Netbeans to exclude the JAR file while building the WAR file?

Thanks

Santhosh

+1  A: 

Select the project in the Projects explorer window.

Pick the Project Properties item from the File menu (up in the menubar).

Select the word Libraries from the list on the lefthand side of the dialog that appears.

For each jar/library listed in the Compile-time Libraries list, uncheck those that do not need to be included in your war file.

Look down here ------------------------------------------------------------V don't you hate slow image hosts

vkraemer
Hi - I've tried that before I've posted here. It didn't work. I'm not sure the reason though. I'm using Netbeans 6.8. Any ideas??
Santhosh Reddy Mandadi
A: 

Hi guys - I found the problem myself. I've all the libraries under my lib folder and added them to the project class path. Since the build is copying the entire content in the project, my library is also copying even though I've unchecked the package check box against the library.

So, don't put the library in your lib folder if you want to exclude that in the WAR built.

Thanks

Santhosh

Santhosh Reddy Mandadi
I am glad to see that you discovered the problem and its resolution.
vkraemer