Skip to content

Commit

Permalink
477385 Make jetty osgi manifests only resolve jetty packages against …
Browse files Browse the repository at this point in the history
…a single distro version
  • Loading branch information
janbartel committed Sep 16, 2015
1 parent edce119 commit 03a601f
Show file tree
Hide file tree
Showing 21 changed files with 17 additions and 194 deletions.
1 change: 0 additions & 1 deletion jetty-annotations/pom.xml
Expand Up @@ -20,7 +20,6 @@
<extensions>true</extensions>
<configuration>
<instructions>
<Import-Package>javax.servlet.*;version="[2.6.0,3.2)",org.objectweb.asm.*;version=5,*</Import-Package>
<Require-Capability>osgi.serviceloader; filter:="(osgi.serviceloader=javax.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)"</Require-Capability>
</instructions>
</configuration>
Expand Down
17 changes: 0 additions & 17 deletions jetty-client/pom.xml
Expand Up @@ -15,23 +15,6 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<Import-Package>javax.net.*,*</Import-Package>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
Expand Down
18 changes: 0 additions & 18 deletions jetty-deploy/pom.xml
Expand Up @@ -14,24 +14,6 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<Import-Package>org.eclipse.jetty.jmx.*;resolution:=optional,*</Import-Package>
<_nouses>true</_nouses>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
Expand Down
17 changes: 0 additions & 17 deletions jetty-infinispan/pom.xml
Expand Up @@ -32,23 +32,6 @@
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<Import-Package>javax.servlet.*;version="[2.6.0,4)",org.eclipse.jetty.server.session.jmx;version="9.3";resolution:=optional,,org.eclipse.jetty.*;version="9.3",*</Import-Package>
</instructions>
</configuration>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>manifest</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
20 changes: 0 additions & 20 deletions jetty-jaas/pom.xml
Expand Up @@ -13,26 +13,6 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<_versionpolicy> </_versionpolicy>
<Import-Package>javax.sql.*,javax.security.*,javax.naming.*,
javax.servlet.*;version="[2.6.0,3.2)",
*</Import-Package>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
<!-- always include the sources to be able to prepare the eclipse-jetty-SDK feature
with a snapshot. -->
<plugin>
Expand Down
5 changes: 2 additions & 3 deletions jetty-osgi/jetty-osgi-boot-jsp/pom.xml
Expand Up @@ -133,7 +133,7 @@
org.apache.taglibs.standard.tei;version="1.2";resolution:=optional,
org.apache.taglibs.standard.tlv;version="1.2";resolution:=optional,
org.apache.tomcat;version="[8.0.23,9)";resolution:=optional,
org.eclipse.jetty.jsp;version="[9.3,10)";resolution:=optional,
org.eclipse.jetty.jsp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:=optional,
org.osgi.*,
org.xml.*;resolution:=optional,
org.xml.sax.*;resolution:=optional,
Expand All @@ -142,8 +142,7 @@
org.w3c.dom.ls;resolution:=optional,
javax.xml.parser;resolution:=optional
</Import-Package>
<_nouses>true</_nouses>
<DynamicImport-Package>org.eclipse.jetty.jsp.*;version="9.3",org.apache.jasper.*;version="8.0.23",org.apache.el.*;version="8.0.23"</DynamicImport-Package>
<DynamicImport-Package>org.eclipse.jetty.jsp.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",org.apache.jasper.*;version="8.0.23",org.apache.el.*;version="8.0.23"</DynamicImport-Package>
</instructions>
</configuration>
</plugin>
Expand Down
4 changes: 1 addition & 3 deletions jetty-osgi/jetty-osgi-boot/pom.xml
Expand Up @@ -93,7 +93,7 @@
<instructions>
<Bundle-SymbolicName>org.eclipse.jetty.osgi.boot;singleton:=true</Bundle-SymbolicName>
<Bundle-Activator>org.eclipse.jetty.osgi.boot.JettyBootstrapActivator</Bundle-Activator>
<DynamicImport-Package>org.eclipse.jetty.*;version="[9.1,10.0)"</DynamicImport-Package>
<DynamicImport-Package>org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))"</DynamicImport-Package>
<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,
Expand All @@ -103,8 +103,6 @@
javax.servlet.http;version="[3.1,3.2)",
javax.transaction;version="1.1.0";resolution:=optional,
javax.transaction.xa;version="1.1.0";resolution:=optional,
org.eclipse.jetty.annotations;version="9.1";resolution:=optional,
org.eclipse.jetty.plus.webapp;version="9.1";resolution:=optional,
org.objectweb.asm;version=4;resolution:=optional,
org.osgi.framework,
org.osgi.service.cm;version="1.2.0",
Expand Down
3 changes: 1 addition & 2 deletions jetty-osgi/test-jetty-osgi-webapp/pom.xml
Expand Up @@ -82,7 +82,6 @@
<!-- 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>
org.osgi.framework,
org.osgi.service.cm;version="1.2.0",
Expand All @@ -97,7 +96,7 @@
org.xml.sax.helpers,
*
</Import-Package>
<DynamicImport-Package>org.eclipse.jetty.*;version="[9.1,10.0)"</DynamicImport-Package>
<DynamicImport-Package>org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))"</DynamicImport-Package>
</instructions>
</configuration>
</plugin>
Expand Down
1 change: 1 addition & 0 deletions jetty-osgi/test-jetty-osgi/pom.xml
Expand Up @@ -255,6 +255,7 @@
<dependency>
<groupId>org.eclipse.jetty</groupId>
<artifactId>jetty-util</artifactId>
<version>${project.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
Expand Down
Expand Up @@ -96,10 +96,10 @@ public static List<Option> coreJettyDependencies()
res.add(mavenBundle().groupId( "org.apache.geronimo.specs" ).artifactId( "geronimo-jta_1.1_spec" ).version("1.1.1").noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty.orbit" ).artifactId( "javax.mail.glassfish" ).version( "1.4.1.v201005082020" ).noStart());

res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-util" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-deploy" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-server" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-servlet" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-util" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-http" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-xml" ).versionAsInProject().noStart());
res.add(mavenBundle().groupId( "org.eclipse.jetty" ).artifactId( "jetty-webapp" ).versionAsInProject().noStart());
Expand Down
27 changes: 0 additions & 27 deletions jetty-plus/pom.xml
Expand Up @@ -14,33 +14,6 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<_nouses>true</_nouses>
<!-- Export-Package>
org.eclipse.jetty.plus.annotation;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}",
org.eclipse.jetty.plus.webapp;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}",
org.eclipse.jetty.plus.jndi;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}",
org.eclipse.jetty.plus.security;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"
</Export-Package -->
<Import-Package>javax.sql.*,javax.security.*,javax.naming.*,
javax.servlet.*;version="[2.6.0,3.2)",javax.transaction.*;version="[1.1,1.3)",
*
</Import-Package>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
<!-- always include the sources to be able to prepare the eclipse-jetty-SDK feature
with a snapshot. -->
<plugin>
Expand Down
2 changes: 1 addition & 1 deletion jetty-security/pom.xml
Expand Up @@ -25,7 +25,7 @@
</goals>
<configuration>
<instructions>
<Import-Package>javax.servlet.*;version="[2.6.0,3.2)",javax.security.cert,*</Import-Package>
<Import-Package>javax.servlet.*;version="[2.6.0,3.2)",javax.security.cert,org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",*</Import-Package>
</instructions>
</configuration>

Expand Down
19 changes: 0 additions & 19 deletions jetty-server/pom.xml
Expand Up @@ -14,25 +14,6 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<id>generate-manifest</id>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<Import-Package>javax.servlet.*;version="[2.6.0,3.2)",org.eclipse.jetty.jmx.*;resolution:=optional,*</Import-Package>
<_nouses>true</_nouses>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
18 changes: 0 additions & 18 deletions jetty-servlet/pom.xml
Expand Up @@ -15,24 +15,6 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<Import-Package>javax.servlet.*;version="[2.6.0,3.2)",org.eclipse.jetty.jmx.*;resolution:=optional,*</Import-Package>
<_nouses>true</_nouses>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
Expand Down
17 changes: 0 additions & 17 deletions jetty-util/pom.xml
Expand Up @@ -14,23 +14,6 @@
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<Import-Package>javax.servlet.*;version="[2.6.0,3.2)",org.slf4j;version="[1.6,2.0)";resolution:=optional,org.slf4j.impl;version="[1.6,2.0)";resolution:=optional,*</Import-Package>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>findbugs-maven-plugin</artifactId>
Expand Down
18 changes: 0 additions & 18 deletions jetty-websocket/pom.xml
Expand Up @@ -32,24 +32,6 @@
<onlyAnalyze>org.eclipse.jetty.websocket.*</onlyAnalyze>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<executions>
<execution>
<goals>
<goal>manifest</goal>
</goals>
<configuration>
<instructions>
<Import-Package>javax.servlet.*;version="[3.1,4.0)",org.eclipse.jetty.*;version="[9.0,10.0)",*</Import-Package>
<_nouses>true</_nouses>
</instructions>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>clirr-maven-plugin</artifactId>
Expand Down
1 change: 0 additions & 1 deletion jetty-websocket/websocket-server/pom.xml
Expand Up @@ -24,7 +24,6 @@
<instructions>
<Require-Capability>osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)"</Require-Capability>
<Provide-Capability>osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.websocket.servlet.WebSocketServletFactory</Provide-Capability>
<_nouses>true</_nouses>
</instructions>
</configuration>
</plugin>
Expand Down
1 change: 0 additions & 1 deletion jetty-websocket/websocket-servlet/pom.xml
Expand Up @@ -23,7 +23,6 @@
<instructions>
<Bundle-Description>Websocket Servlet Interface</Bundle-Description>
<Bundle-Classpath />
<_nouses>true</_nouses>
<DynamicImport-Package>org.eclipse.jetty.websocket.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}",org.eclipse.jetty.websocket.server.pathmap.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}"</DynamicImport-Package>
<Require-Capability>osgi.serviceloader; filter:="(osgi.serviceloader=org.eclipse.jetty.websocket.servlet.WebSocketServletFactory)";cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)"</Require-Capability>
</instructions>
Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -331,7 +331,7 @@
<Bundle-Classpath>.</Bundle-Classpath>
<Export-Package>${bundle-symbolic-name}.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</Export-Package>
<Bundle-Copyright>Copyright (c) 2008-2015 Mort Bay Consulting Pty. Ltd.</Bundle-Copyright>
<_versionpolicy>[$(version;==;$(@)),$(version;+;$(@)))</_versionpolicy>
<Import-Package>javax.servlet*;version="[2.6.0,3.2)",javax.transaction*;version="[1.1,1.3)",org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",*</Import-Package>
</instructions>
</configuration>
</plugin>
Expand Down
2 changes: 1 addition & 1 deletion tests/test-webapps/test-jetty-webapp/pom.xml
Expand Up @@ -82,7 +82,7 @@
<supportedProjectType>war</supportedProjectType>
</supportedProjectTypes>
<instructions>
<Import-Package>javax.servlet.jsp.*;version="[2.2.0,3.0)",javax.servlet.*;version="[2.6,3.2)",org.eclipse.jetty.*;version="[9.0,10.0)",*</Import-Package>
<Import-Package>javax.servlet.jsp.*;version="[2.2.0,3.0)",org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",*</Import-Package>
<Export-Package>!com.acme*</Export-Package>
<!-- the test webapp is configured via a jetty xml file
in order to add the security handler. -->
Expand Down
16 changes: 8 additions & 8 deletions tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml
Expand Up @@ -76,19 +76,19 @@
<Bundle-Description>Test Webapp for Servlet 3.1 Features</Bundle-Description>
<Import-Package>
javax.servlet.jsp.*;version="[2.2.0, 3.0)",
javax.transaction.*;version="[1.1, 2.0)",
javax.servlet.*;version="3.0",
javax.sql,
org.eclipse.jetty.webapp;version="9.2",org.eclipse.jetty.plus.jndi;version="9.2",
org.eclipse.jetty.security;version="9.2",
com.acme;version="9.2",
javax.transaction*;version="[1.1,1.3)",
javax.servlet*;version="[2.6,3.2)",
org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",
org.eclipse.jetty.webapp;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional",
org.eclipse.jetty.plus.jndi;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))";resolution:="optional",
com.acme;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}",
*
</Import-Package>
<Export-Package>com.acme.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}"</Export-Package>
<_nouses/>
<Export-Package>com.acme.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}";-noimport:=true</Export-Package>
<Web-ContextPath>/</Web-ContextPath>
<Bundle-ClassPath>.,WEB-INF/classes,WEB-INF/lib</Bundle-ClassPath>
<Jetty-ContextFilePath>/META-INF/plugin-context.xml</Jetty-ContextFilePath>
<_nouses>true</_nouses>
</instructions>
</configuration>
</plugin>
Expand Down

0 comments on commit 03a601f

Please sign in to comment.