Community
Participate
Working Groups
The goal is to accomodate the jetty aggregate that can be now consumed in an OSGi environment. See bug 317222
Created attachment 174838 [details] jetty-osgi-boot pom w/o require-bundles ./META-INF/MANIFEST.MF could be removed
Created attachment 174839 [details] jetty-osgi-boot-jsp updated pom ./META-INF/MANIFEST.MF could be removed
Many thanks Dmytro.
Dmytro, The patched pom for jetty-osgi-boot-jsp works for me but it really does produce the same than the current build. I am inclined to keep the current code as it is; it fits the eclipse PDE style for the development of an OSGi bundle. The patched jetty-osgi-boot pom.xml is not clear to me: In my testing, I must remove the existing MANIFEST.MF to eliminate the Require-Bundle instructions: BND will merge the pom's configuration and the existing MANIFEST.MF otherwise. Once I remove the existing MANIFEST.MF the list of import packages is surprisingly small. For sure we need to specify a couple starting with the servlet packages otherwise the imported servlet API will not be consistent with what the rest of jetty-7 imports: 2.5. Also BND will only detect the org.eclipse.jetty packages that are explicitly used in java classes of this bundle. However this bundle need to be able to access any of the org.eclipse.jetty objects that could be declared in a jetty.xml configuration file. The easiest solution I believe if we don't want to use Require-Bundle is to use a DynamicImport-Package Here are the set of instructions that I think will do what we want. <instructions> <Bundle-SymbolicName>org.eclipse.jetty.osgi.boot;singleton:=true</Bundle-SymbolicName> <Export-Package>org.eclipse.jetty.osgi.boot,org.eclipse.jetty.osgi.boot.utils</Export-Package> <Bundle-Activator>org.eclipse.jetty.osgi.boot.JettyBootstrapActivator</Bundle-Activator> <Bundle-ActivationPolicy>lazy</Bundle-ActivationPolicy> <!-- disable the uses directive: jetty will accomodate pretty much any versions of the packages it uses; no need to reflect some tight dependency determined at compilation time. --> <_nouses>true</_nouses> <Import-Package>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.servlet;version="2.5.0", javax.servlet.http;version="2.5.0", javax.transaction;version="1.1.0";resolution:=optional, javax.transaction.xa;version="1.1.0";resolution:=optional, org.osgi.framework, org.osgi.service.cm;version="1.2.0", org.osgi.service.packageadmin, org.osgi.service.startlevel;version="1.0", org.osgi.service.url;version="1.0.0", org.osgi.util.tracker;version="1.3.0", org.slf4j;resolution:=optional, org.slf4j.spi;resolution:=optional, org.slf4j.helpers;resolution:=optional, org.xml.sax, org.xml.sax.helpers, * </Import-Package> <DynamicImport-Package>org.eclipse.jetty.*;version=[7.2,8)</DynamicImport-Package> <!--Require-Bundle/--> <Bundle-RequiredExecutionEnvironment>J2SE-1.5</Bundle-RequiredExecutionEnvironment> </instructions> Comments and review welcome.
I have added an ant task to the pom.xml to delete the MANIFEST.MF copied from the sources. This way we can continue to use the PDE to develop this plugin. Fixed as described above.