Netbeans web application - excluding the JAR while building the WAR
I'm using Netbeans IDE for developing a web applications, a开发者_开发百科nd I've some JARs available in the application server which don't need to be in the WAR (but we need them to compile and run locally).
Is there an option in Netbeans to exclude the JAR file while building the WAR file?
- 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.
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
精彩评论