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 195542 - Add related libraries in case of choosing server deployable library for RESFul WS
Summary: Add related libraries in case of choosing server deployable library for RESFu...
Status: RESOLVED FIXED
Alias: None
Product: webservices
Classification: Unclassified
Component: REST (show other bugs)
Version: 7.0
Hardware: PC Windows XP
: P2 normal (vote)
Assignee: Denis Anisimov
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-02-16 07:44 UTC by Denis Anisimov
Modified: 2011-02-18 10:34 UTC (History)
3 users (show)

See Also:
Issue Type: ENHANCEMENT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Denis Anisimov 2011-02-16 07:44:19 UTC
This is sceanrio for WL because its server plugin supports ServerLibraries.
1) Create Web project based on WL server
2) Create RESTful WS
Choose bundled Jersey server library on the last stage of the wizard.

As result project will have classpath under J2EE server node which contains
only Jersey implementation library.

There should be related to JAX-RS deployable libraries  :
jackson-core-asl-1.1.1.war
jackson-jaxrs-1.1.1.war
jackson-mapper-asl-1.1.1.war
jettison-1.1.war
rome-1.0.war
Comment 1 Denis Anisimov 2011-02-17 11:52:26 UTC
PetrH, please let me know why the following code doesn't work :

for (ServerLibrary serverLibrary : serverLibraries) {
    provider.getConfigSupport().configureLibrary(
            ServerLibraryDependency.minimalVersion(
                    serverLibrary.getName(),
                    serverLibrary.getSpecificationVersion(),
                    serverLibrary.getImplementationVersion()));
}
Preferences prefs = ProjectUtils.getPreferences(project,
        ProjectUtils.class, true);
prefs.put(BrokenServerLibrarySupport.OFFER_LIBRARY_DEPLOYMENT,
        Boolean.TRUE.toString());

The result of resolving server libraries problem is deploying ONLY ONE 
configured library .
All others are not deployed.

Is it a bug or some different API or flow should be used do resolving several libraries at time ?
I cannot fix this RFE because of this issue.

The change below is intermediate fix for this issue. There is a block of code
which should be removed when the described issue will be resolved.
changeset:   188884:a4412b5ffbf1
Comment 2 Petr Hejl 2011-02-17 14:38:06 UTC
(In reply to comment #1)
> PetrH, please let me know why the following code doesn't work :
> 
> for (ServerLibrary serverLibrary : serverLibraries) {
>     provider.getConfigSupport().configureLibrary(
>             ServerLibraryDependency.minimalVersion(
>                     serverLibrary.getName(),
>                     serverLibrary.getSpecificationVersion(),
>                     serverLibrary.getImplementationVersion()));
> }
> Preferences prefs = ProjectUtils.getPreferences(project,
>         ProjectUtils.class, true);
> prefs.put(BrokenServerLibrarySupport.OFFER_LIBRARY_DEPLOYMENT,
>         Boolean.TRUE.toString());
> 
> The result of resolving server libraries problem is deploying ONLY ONE 
> configured library .
> All others are not deployed.
> 
> Is it a bug or some different API or flow should be used do resolving several
> libraries at time ?
> I cannot fix this RFE because of this issue.

Should be fixed by this: a9d6a81a2f9b
Comment 3 Denis Anisimov 2011-02-17 16:07:13 UTC
(In reply to comment #2)

> 
> Should be fixed by this: a9d6a81a2f9b

Thanks.
Comment 4 Denis Anisimov 2011-02-17 16:16:10 UTC
changeset:   188926:4fd730563624
Comment 5 Quality Engineering 2011-02-18 10:34:27 UTC
Integrated into 'main-golden', will be available in build *201102180501* on http://bits.netbeans.org/dev/nightly/ (upload may still be in progress)
Changeset: http://hg.netbeans.org/main/rev/a4412b5ffbf1
User: Denis Anisimov <ads@netbeans.org>
Log: Intermediate fix for BZ#195542 -  Add related libraries in case of choosing server deployable library for RESFul WS and additional fix for BZ#195465 in maven.jaxws module.