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 168927 - jaxb-osgi.jar and webservices-osgi.jar added to the v3 library when creating a shared project
Summary: jaxb-osgi.jar and webservices-osgi.jar added to the v3 library when creating ...
Status: RESOLVED WONTFIX
Alias: None
Product: serverplugins
Classification: Unclassified
Component: GlassFish (show other bugs)
Version: 6.x
Hardware: All All
: P3 blocker (vote)
Assignee: Milan Kuchtiak
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-07-21 18:49 UTC by Petr Jiricka
Modified: 2009-08-13 16:02 UTC (History)
4 users (show)

See Also:
Issue Type: DEFECT
Exception Reporter:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Petr Jiricka 2009-07-21 18:49:43 UTC
1. Register GlassFish v3 promoted build
2. Create a new Web Project
3. While creating the project, check "Use Dedicated Folder for Storing Libraries" in the Name and Location panel, and
"Use dedicated library folder for server JAR files" in the Server and Settings panel

Inside the project directory, subfolder lib/GlassFish_v3 will be created, containing jaxb-osgi.jar and
webservices-osgi.jar (which together take up 15 MB). These files are not needed and should not be added.
Comment 1 Vince Kraemer 2009-07-21 23:42:58 UTC
It looks like this is due to http://hg.netbeans.org/web-main/rev/7227c77db315...

mkuchtiak: please advise or correct
Comment 2 Milan Kuchtiak 2009-07-30 17:01:27 UTC
This is due to shared library mechanism, where all jars specified in
J2eePlatformImpl implementation (J2EE Server plugin), getToolClasspathEntries method (for all tools) are added to
"dedicated" library folder. This is done, regardless the tool is ever used in project or not.

In this particular case, there are jar files needed for wsgen tool and wsimport tool.


The mechanism isn't good. In fact the dedicated library folder contains the superclass of all jar files specified for
all tools.

Reassigning to dkonecny to evaluate.
Comment 3 Petr Jiricka 2009-07-30 19:42:59 UTC
So if I understand it correctly, these jar files *may* be needed sometimes to build the project, right? In such a case,
they actually *should* be in the server library - otherwise the project would not be buildable from commandline. The
question is, do we really need 14.6 MB of jar files just to run wsgen and wsimport? I don't believe all these classes
are needed. I would say the right solution should be to divide the two jar files into "dev" and "rt" parts. Only the
"dev" would be needed at build time, and "rt" would be used at runtime. I suspect these "dev" jars would be much smaller
than the current big jars.

> library folder contains the superclass

I think you meant to say "superset".
Comment 4 Milan Kuchtiak 2009-07-31 08:06:01 UTC
Yes, I meant superset of course.
This is one solution for web services, though this will not solve the generic problem. But anyway, who can split
webservices.jar and jaxb.jar to smaller parts ? I doubt GlassFish team has motivation for that.
Comment 5 David Konecny 2009-08-03 00:20:47 UTC
I don't have anything to add - preferably jars should be smaller.
Comment 6 Milan Kuchtiak 2009-08-04 16:41:36 UTC
I've got an idea how to solve this for wsimport, wsgen :

- clean up the library list from J2eePlatformImpl:getToolClasspathEntries() method
- use JAX-WS stack framework
- create programmaticaly, on demand (e.g. when WS Client is generated) a specific Netbeans library(e.g. ServerJaxWsLib)
- use this specific library in ant tasks, instead of jar list specified in J2eePlatformImpl:getToolClasspathEntries()

Hopefully this will work 

Comment 7 Milan Kuchtiak 2009-08-04 16:43:21 UTC
Reassigning back to myself.
Comment 8 Milan Kuchtiak 2009-08-13 16:02:03 UTC
I cannot do much with this issue.
Did some improvements : used WSStack instead of J2eePlatformImpl:getToolClasspathEntries().

My idea of creating JaxWS_GlassFish library (JAX-WS library taken from server jars) is not good because of shareability.