Netbeans web application - excluding JAR when building WAR

I use the Netbeans IDE to develop web applications, and I have some JAR servers available on the application server that do not have to be in the WAR (but we need to compile and run them locally).

Is there an option in Netbeans to exclude a JAR file when creating a WAR file?

+6
netbeans
source share
2 answers

I found the problem myself. I have all the libraries under my lib folder and added them to the project class path. Since the assembly copies all the content in the project, my library also copies, even if I unchecked the checkbox opposite the library.

So, do not put the library in your lib folder if you want to exclude it in the WAR.

thanks

Santhosh

+3
source share
  • Select a project in the project explorer window.
  • Select the "Project Properties" item in the "File" menu (up in the menu bar).
  • Select the word β€œLibraries” from the list on the left side of the dialog box that appears.
  • For each library / library listed in the Compile-Time Libraries list, uncheck those that do not have to be included in your war file.
+9
source share

All Articles