This Bugzilla instance is a read-only archive of historic NetBeans bug reports. To report a bug in NetBeans please follow the project's instructions for reporting issues.

Bug 85084

Summary: [55cat] Values on "Exclude from WAR file" should affect ONLY the WAR file
Product: javaee Reporter: brviking <brviking>
Component: Web ProjectAssignee: David Konecny <dkonecny>
Status: REOPENED ---    
Severity: blocker CC: pjiricka
Priority: P2    
Version: 5.x   
Hardware: PC   
OS: Linux   
Issue Type: ENHANCEMENT Exception Reporter:

Description brviking 2006-09-16 18:56:16 UTC
[ BUILD # : 200609150000 ]
[ JDK VERSION : 1.6 ]

During development process, I use Tomcat embeded. In this time, I put config about Jdbc resources, mail resources and realm (authentication) inside the META-INF/context.xml.
But when I deploy the application, I don't wan't to distribute this file (because deployied apps already have their context config inherent to his own environment).
So, I put on the line "Excluve from WAR file" the following:
"**/*.java,**/*.form,**/context.xml".
After this, I can't run and/or debug the application on embeded Tomcat anymore. Clean/Build/Deploy, error message is:

Undeploying ...
OK - Undeployed application at context path /Baile
In-place deployment at /home/richter/projetos/Baile/build/web
/home/richter/projetos/Baile/build/web/META-INF/context.xml (No such file or directory)
/home/richter/projetos/Baile/nbproject/build-impl.xml:619: Deployment error:
The module has not been deployed.
See the server log for details.

But expected behavior is BUILD dir is not affected, only the WAR file!
Comment 1 Radko Najman 2006-09-19 15:46:47 UTC
It is the correct behaviour, it is designed by this way. In fact this filter
applies to the build task and then everything from build directory is packaged
into the WAR file. I agree that "Exclude From WAR File" description can be
confusing.
Comment 2 brviking 2006-09-19 15:52:05 UTC
So it's not invalid.
Is necessary to change the "behavior by design" to a more developer friend one.
During development, either Tomcat and Glassfish run over "build" directory.
During development, is desired the exclusions don't be applyied.
But the WAR file should not include exclusions.
In any case, even if you rename the option to "Exclude from build", the real
"Exclude from WAR ONLY" is still a desired feature.
I'm reopening the issue, and changing it from "Defect" to "Enhancement".
Comment 3 Radko Najman 2006-09-19 17:18:23 UTC
OK, I meant that it is invalid from the current design and functional point of
view. I agree with an enhancemnt. I think this enhancement is be valid for all
NetBeans projects, not only for web project.