| Summary: | Provide an OSGi ready aggregate for jetty | ||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|
| Product: | [RT] Jetty | Reporter: | Hugues Malphettes <hmalphettes> | ||||||||
| Component: | osgi | Assignee: | Hugues Malphettes <hmalphettes> | ||||||||
| Status: | RESOLVED FIXED | QA Contact: | |||||||||
| Severity: | normal | ||||||||||
| Priority: | P3 | CC: | dmytro.pishchukhin, gregw, jetty-inbox, mgorovoy | ||||||||
| Version: | 7.1.4 | Flags: | gregw:
iplog+
|
||||||||
| Target Milestone: | 7.1.x | ||||||||||
| Hardware: | All | ||||||||||
| OS: | All | ||||||||||
| Whiteboard: | |||||||||||
| Attachments: |
|
||||||||||
|
Description
Hugues Malphettes
Created attachment 173763 [details]
jetty-all-server pom with OSGi manifest entries
Hi Hugues, In the attachment you can find pom for one aggregate module (jetty-all-server). You can use it to change the other aggregate pom files with minor fixes (Import-Package, Export-Package etc.) I found 2 issues: 1. jetty bundle jetty-jsp-2.1 is a part of this aggregate bundle and it imports com.sun.org.apache.commons.logging;version="[2.1,3)" package that is contained in org.apache.jasper.glassfish_2.1.0.v201004190952.jar, but this package is not (!) exported by this bundle. This bundle is out of jetty project scope, but it is built by eclipse community (Orbit). As I can see you can easily update it. 2. jetty-osgi-boot module manifest. You have to change importing from Require-Bundle to Import-Package, because the jetty-osgi-boot bundle has hard links to bundles, but not to packages (I use the same approach to link to aggregate server module, but only for tests of aggregate bundle). Hope that my changes help you. Cheers, Dmytro Thanks a lot Dmytro. Looking into these 2 issues. (In reply to comment #2) 1- For com.sun.org.apache.commons.logging, I will mark it as a split package to make sure that consumers willingly want that version of the package. I think the import of the package should be marked as optional anyways: when it is not present, the jsp engine will not issue logs is all that happens. 2- I'll be working on the jetty.boot.osgi to move away from the Require-Bundle Created attachment 173801 [details]
Revised pom.xml
Here is the revised pom.xml as discussed with Dmytro.
Committed as revision 2083 Also committed the change in the manifest of jetty-jsp to import the split-package provided by jasper.glassfish as packaged in eclipse orbit. bug 319306 keeps track of the necessary improvement on org.eclipse.jetty.osgi.boot to be able to consume the aggregate. Hi Hugues,
I found several issues with package importing. Here is updated list of imported packages for jetty-all-server bundle
<Import-Package>
!org.eclipse.jetty*,
com.sun.org.apache.commons.logging;version="[2.1,3)";glassfish="split";resolution:=optional,
javax.servlet;version="2.5.0",
javax.servlet.http;version="2.5.0",
javax.mail;version="1.4.0";resolution:=optional,
javax.mail.event;version="1.4.0";resolution:=optional,
javax.mail.internet;version="1.4.0";resolution:=optional,
javax.mail.search;version="1.4.0";resolution:=optional,
javax.mail.util;version="1.4.0";resolution:=optional,
javax.transaction;version="1.1.0";resolution:=optional,
javax.transaction.xa;version="1.1.0";resolution:=optional,
org.slf4j;resolution:=optional,
org.slf4j.spi;resolution:=optional,
org.slf4j.helpers;resolution:=optional,
org.xml.sax,
org.xml.sax.helpers,
javax.xml.parsers,
javax.net.ssl,
!org.mortbay.*,
org.objectweb.asm;version="3.1.0";resolution:=optional,
org.objectweb.asm.commons;version="3.1.0";resolution:=optional,
javax.security.auth.message*;version="[1.0,2.0)"resolution:=optional,
*
</Import-Package>
Regards,
Dmytro
one small typo in imports list: javax.security.auth.message*;version="[1.0,2.0)";resolution:=optional, Created attachment 174836 [details]
Updated jetty-all-server pom with fixed import-package issues
Hello,
(In reply to comment #10) > Created an attachment (id=174836) [details] > Updated jetty-all-server pom with fixed import-package issues > > Hello, Hi Dmytro, So in the attached pom.xml, the difference is that the manifest generated by BND will import: javax.security.auth.message*;version="[1.0,2.0)";resolution:=optional and there is no more wildcard to import all other necessary packages as detected by BND. Could you let us know what required this change? In particular, I am not sure how javax.security.auth.message*;version="[1.0,2.0)" is resolved: I can't find such a package in the orbit bundles. Thanks! (In reply to comment #11) > (In reply to comment #10) > > Created an attachment (id=174836) [details] [details] > > Updated jetty-all-server pom with fixed import-package issues > > > > Hello, > > Hi Dmytro, > So in the attached pom.xml, the difference is that the manifest generated by > BND will import: > javax.security.auth.message*;version="[1.0,2.0)";resolution:=optional > > and there is no more wildcard to import all other necessary packages as > detected by BND. > > Could you let us know what required this change? > In particular, I am not sure how > javax.security.auth.message*;version="[1.0,2.0)" > is resolved: I can't find such a package in the orbit bundles. > > Thanks! Hi Hugues, those packages are provided by <dependency> <groupId>org.apache.geronimo.specs</groupId> <artifactId>geronimo-jaspic_1.0_spec</artifactId> <version>1.0</version> </dependency> in <artifactId>jetty-jaspi</artifactId> module. Regards, Dmytro (In reply to comment #12) > (In reply to comment #11) > > (In reply to comment #10) > > > Created an attachment (id=174836) [details] [details] [details] > > > Updated jetty-all-server pom with fixed import-package issues > > > > > > Hello, > > > > Hi Dmytro, > > So in the attached pom.xml, the difference is that the manifest generated by > > BND will import: > > javax.security.auth.message*;version="[1.0,2.0)";resolution:=optional > > > > and there is no more wildcard to import all other necessary packages as > > detected by BND. > > > > Could you let us know what required this change? > > In particular, I am not sure how > > javax.security.auth.message*;version="[1.0,2.0)" > > is resolved: I can't find such a package in the orbit bundles. > > > > Thanks! > > Hi Hugues, > > those packages are provided by > <dependency> > <groupId>org.apache.geronimo.specs</groupId> > <artifactId>geronimo-jaspic_1.0_spec</artifactId> > <version>1.0</version> > </dependency> > > in <artifactId>jetty-jaspi</artifactId> > module. > > Regards, > Dmytro So we can't use the one provided by the JDK? Currently these packages are not provided by orbit which is what worries me. (In reply to comment #13) > (In reply to comment #12) > > (In reply to comment #11) > > > (In reply to comment #10) > > > > Created an attachment (id=174836) [details] [details] [details] [details] > > > > Updated jetty-all-server pom with fixed import-package issues > > > > > > > > Hello, > > > > > > Hi Dmytro, > > > So in the attached pom.xml, the difference is that the manifest generated by > > > BND will import: > > > javax.security.auth.message*;version="[1.0,2.0)";resolution:=optional > > > > > > and there is no more wildcard to import all other necessary packages as > > > detected by BND. > > > > > > Could you let us know what required this change? > > > In particular, I am not sure how > > > javax.security.auth.message*;version="[1.0,2.0)" > > > is resolved: I can't find such a package in the orbit bundles. > > > > > > Thanks! > > > > Hi Hugues, > > > > those packages are provided by > > <dependency> > > <groupId>org.apache.geronimo.specs</groupId> > > <artifactId>geronimo-jaspic_1.0_spec</artifactId> > > <version>1.0</version> > > </dependency> > > > > in <artifactId>jetty-jaspi</artifactId> > > module. > > > > Regards, > > Dmytro > So we can't use the one provided by the JDK? > Currently these packages are not provided by orbit which is what worries me. The packages javax.security.auth.message* are not provided by JDK6. I have added the import of javax.security.auth.message*;resolution:=optional to the pom.xml Thanks for reporting the issue. Fixed with this new import-package. |