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 162445

Summary: Missing API for excluding .jars from a .war
Product: javaee Reporter: Tim Lebedkov <lebedkov>
Component: Web ProjectAssignee: David Konecny <dkonecny>
Status: VERIFIED FIXED    
Severity: blocker CC: pjiricka, sustaining
Priority: P3    
Version: 6.x   
Hardware: All   
OS: All   
Issue Type: DEFECT Exception Reporter:

Description Tim Lebedkov 2009-04-11 11:27:28 UTC
I add a library to a web project using ProjectClassPathModifier.addLibraries.
There seems to be no way to disable packaging of the added library in a web project.
Comment 1 Petr Jiricka 2009-06-12 11:12:28 UTC
I recall we hit this before and it is addressed somehow - Davide?
Comment 2 David Konecny 2009-07-01 01:28:42 UTC
See web.project module. There is org.netbeans.modules.web.project.api.WebProjectLibrariesModifier which should do what
you need. WebProjectLibrariesModifier can be retrieved from project's lookup.
Comment 3 Tim Lebedkov 2009-07-04 11:45:32 UTC
Unfortunately I cannot use the module:

C:\Programme\NetBeans 6.5\harness\build.xml:98: The module org.netbeans.modules.gwt4nb is not a friend of 
C:\Programme\NetBeans 6.5\enterprise5\modules\org-netbeans-modules-web-project.jar
Comment 4 Tim Lebedkov 2009-07-04 19:51:54 UTC
Currently the following code is used (and the library added this way will be deployed):

                ProjectClassPathModifier.addLibraries(
                        new Library[] {libUser},
                        sourcesDir,
                        ClassPath.COMPILE);

isn't it a valid way to add a library without deploying it? There is also ClassPath.EXECUTE available. Isn't it a bug in ProjectClassPathModifier.addLibraries?
Comment 5 David Konecny 2009-07-05 23:56:56 UTC
If you have commit rights then add org.netbeans.modules.gwt4nb as friend of web.project or I can do it for you.
Comment 6 Tim Lebedkov 2009-07-06 07:57:11 UTC
Could you please add the module to the list?
The code name base is org.netbeans.modules.gwt4nb

What would be the best workaround for NB 6.7?
Comment 7 Petr Jiricka 2009-07-07 14:04:22 UTC
Here is the problem on the GWT module side: https://gwt4nb.dev.java.net/issues/show_bug.cgi?id=53
Comment 8 David Konecny 2009-07-07 23:02:51 UTC
Fixed in 3bb0be175af0. If you grab a build containing the fix (once available) and verify that it works then perhaps fix
could be included in 6.7 patch release.
Comment 9 David Konecny 2009-07-07 23:03:23 UTC
.
Comment 10 Jindrich Sedek 2009-07-08 09:30:08 UTC
reviewed by QE, the fixes is allowed to be transplanted into 6.7, reporter please verify the patch fixed your issue
Comment 11 Quality Engineering 2009-07-08 18:11:51 UTC
Integrated into 'main-golden', will be available in build *200907081400* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main-golden/rev/3bb0be175af0
User: David Konecny <dkonecny@netbeans.org>
Log: #162445 - adding new friend (org.netbeans.modules.gwt4nb)
Comment 12 pgebauer 2009-07-09 13:53:13 UTC
The fix has been ported into the release67_fixes repository.
http://hg.netbeans.org/release67_fixes/rev/383ce72ba15e
Comment 13 Jindrich Sedek 2009-07-20 11:12:30 UTC
reviewed in release67_fixes rep