From 03a601f2b246a278961203a4b183100156d44dc1 Mon Sep 17 00:00:00 2001 From: Jan Bartel Date: Wed, 16 Sep 2015 19:13:47 +1000 Subject: [PATCH] 477385 Make jetty osgi manifests only resolve jetty packages against a single distro version --- jetty-annotations/pom.xml | 1 - jetty-client/pom.xml | 17 ------------ jetty-deploy/pom.xml | 18 ------------- jetty-infinispan/pom.xml | 17 ------------ jetty-jaas/pom.xml | 20 -------------- jetty-osgi/jetty-osgi-boot-jsp/pom.xml | 5 ++-- jetty-osgi/jetty-osgi-boot/pom.xml | 4 +-- jetty-osgi/test-jetty-osgi-webapp/pom.xml | 3 +-- jetty-osgi/test-jetty-osgi/pom.xml | 1 + .../osgi/test/TestJettyOSGiBootCore.java | 2 +- jetty-plus/pom.xml | 27 ------------------- jetty-security/pom.xml | 2 +- jetty-server/pom.xml | 19 ------------- jetty-servlet/pom.xml | 18 ------------- jetty-util/pom.xml | 17 ------------ jetty-websocket/pom.xml | 18 ------------- jetty-websocket/websocket-server/pom.xml | 1 - jetty-websocket/websocket-servlet/pom.xml | 1 - pom.xml | 2 +- tests/test-webapps/test-jetty-webapp/pom.xml | 2 +- .../test-spec-webapp/pom.xml | 16 +++++------ 21 files changed, 17 insertions(+), 194 deletions(-) diff --git a/jetty-annotations/pom.xml b/jetty-annotations/pom.xml index 6690bce63ea..88ebfd71219 100644 --- a/jetty-annotations/pom.xml +++ b/jetty-annotations/pom.xml @@ -20,7 +20,6 @@ true - javax.servlet.*;version="[2.6.0,3.2)",org.objectweb.asm.*;version=5,* osgi.serviceloader; filter:="(osgi.serviceloader=javax.servlet.ServletContainerInitializer)";resolution:=optional;cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)" diff --git a/jetty-client/pom.xml b/jetty-client/pom.xml index cc2168807f2..dd194530d1b 100644 --- a/jetty-client/pom.xml +++ b/jetty-client/pom.xml @@ -15,23 +15,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.net.*,* - - - - - org.codehaus.mojo findbugs-maven-plugin diff --git a/jetty-deploy/pom.xml b/jetty-deploy/pom.xml index 08169311d6e..99c00e5d49c 100644 --- a/jetty-deploy/pom.xml +++ b/jetty-deploy/pom.xml @@ -14,24 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - org.eclipse.jetty.jmx.*;resolution:=optional,* - <_nouses>true - - - - - org.codehaus.mojo findbugs-maven-plugin diff --git a/jetty-infinispan/pom.xml b/jetty-infinispan/pom.xml index 351f6830310..b8f74181da3 100644 --- a/jetty-infinispan/pom.xml +++ b/jetty-infinispan/pom.xml @@ -32,23 +32,6 @@ - - org.apache.felix - maven-bundle-plugin - - - javax.servlet.*;version="[2.6.0,4)",org.eclipse.jetty.server.session.jmx;version="9.3";resolution:=optional,,org.eclipse.jetty.*;version="9.3",* - - - true - - - - manifest - - - - org.apache.maven.plugins maven-jar-plugin diff --git a/jetty-jaas/pom.xml b/jetty-jaas/pom.xml index f3e8d621ec6..9e15407a073 100644 --- a/jetty-jaas/pom.xml +++ b/jetty-jaas/pom.xml @@ -13,26 +13,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - <_versionpolicy> - javax.sql.*,javax.security.*,javax.naming.*, - javax.servlet.*;version="[2.6.0,3.2)", - * - - - - - diff --git a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml index ddc0d48e1be..9905190de8a 100644 --- a/jetty-osgi/jetty-osgi-boot-jsp/pom.xml +++ b/jetty-osgi/jetty-osgi-boot-jsp/pom.xml @@ -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, @@ -142,8 +142,7 @@ org.w3c.dom.ls;resolution:=optional, javax.xml.parser;resolution:=optional - <_nouses>true - org.eclipse.jetty.jsp.*;version="9.3",org.apache.jasper.*;version="8.0.23",org.apache.el.*;version="8.0.23" + 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" diff --git a/jetty-osgi/jetty-osgi-boot/pom.xml b/jetty-osgi/jetty-osgi-boot/pom.xml index 47bdf2f9424..c2dcea6a03a 100644 --- a/jetty-osgi/jetty-osgi-boot/pom.xml +++ b/jetty-osgi/jetty-osgi-boot/pom.xml @@ -93,7 +93,7 @@ org.eclipse.jetty.osgi.boot;singleton:=true org.eclipse.jetty.osgi.boot.JettyBootstrapActivator - org.eclipse.jetty.*;version="[9.1,10.0)" + org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))" 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, @@ -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", diff --git a/jetty-osgi/test-jetty-osgi-webapp/pom.xml b/jetty-osgi/test-jetty-osgi-webapp/pom.xml index a778ac7297f..93b022a1e50 100644 --- a/jetty-osgi/test-jetty-osgi-webapp/pom.xml +++ b/jetty-osgi/test-jetty-osgi-webapp/pom.xml @@ -82,7 +82,6 @@ - <_nouses>true org.osgi.framework, org.osgi.service.cm;version="1.2.0", @@ -97,7 +96,7 @@ org.xml.sax.helpers, * - org.eclipse.jetty.*;version="[9.1,10.0)" + org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))" diff --git a/jetty-osgi/test-jetty-osgi/pom.xml b/jetty-osgi/test-jetty-osgi/pom.xml index 8d2304d1a59..4dbb0398d70 100644 --- a/jetty-osgi/test-jetty-osgi/pom.xml +++ b/jetty-osgi/test-jetty-osgi/pom.xml @@ -255,6 +255,7 @@ org.eclipse.jetty jetty-util + ${project.version} runtime diff --git a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootCore.java b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootCore.java index 19db6154cc5..79d418bad22 100644 --- a/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootCore.java +++ b/jetty-osgi/test-jetty-osgi/src/test/java/org/eclipse/jetty/osgi/test/TestJettyOSGiBootCore.java @@ -96,10 +96,10 @@ public class TestJettyOSGiBootCore 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()); diff --git a/jetty-plus/pom.xml b/jetty-plus/pom.xml index d2e6cb3be42..a470764e6c6 100644 --- a/jetty-plus/pom.xml +++ b/jetty-plus/pom.xml @@ -14,33 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - <_nouses>true - - javax.sql.*,javax.security.*,javax.naming.*, - javax.servlet.*;version="[2.6.0,3.2)",javax.transaction.*;version="[1.1,1.3)", - * - - - - - - diff --git a/jetty-security/pom.xml b/jetty-security/pom.xml index 4578803ec3f..ae58c00078a 100644 --- a/jetty-security/pom.xml +++ b/jetty-security/pom.xml @@ -25,7 +25,7 @@ - javax.servlet.*;version="[2.6.0,3.2)",javax.security.cert,* + javax.servlet.*;version="[2.6.0,3.2)",javax.security.cert,org.eclipse.jetty*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* diff --git a/jetty-server/pom.xml b/jetty-server/pom.xml index 743d78a02c8..aaa3ac13bea 100644 --- a/jetty-server/pom.xml +++ b/jetty-server/pom.xml @@ -14,25 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - generate-manifest - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",org.eclipse.jetty.jmx.*;resolution:=optional,* - <_nouses>true - - - - - org.apache.maven.plugins maven-jar-plugin diff --git a/jetty-servlet/pom.xml b/jetty-servlet/pom.xml index a1ae6875f21..ebdcdf734eb 100644 --- a/jetty-servlet/pom.xml +++ b/jetty-servlet/pom.xml @@ -15,24 +15,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[2.6.0,3.2)",org.eclipse.jetty.jmx.*;resolution:=optional,* - <_nouses>true - - - - - org.apache.maven.plugins maven-jar-plugin diff --git a/jetty-util/pom.xml b/jetty-util/pom.xml index 6e2efaa5489..e226b0126e2 100644 --- a/jetty-util/pom.xml +++ b/jetty-util/pom.xml @@ -14,23 +14,6 @@ - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - 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,* - - - - - org.codehaus.mojo findbugs-maven-plugin diff --git a/jetty-websocket/pom.xml b/jetty-websocket/pom.xml index 579e808cca1..519995e9b43 100644 --- a/jetty-websocket/pom.xml +++ b/jetty-websocket/pom.xml @@ -32,24 +32,6 @@ org.eclipse.jetty.websocket.* - - org.apache.felix - maven-bundle-plugin - true - - - - manifest - - - - javax.servlet.*;version="[3.1,4.0)",org.eclipse.jetty.*;version="[9.0,10.0)",* - <_nouses>true - - - - - org.codehaus.mojo clirr-maven-plugin diff --git a/jetty-websocket/websocket-server/pom.xml b/jetty-websocket/websocket-server/pom.xml index b772a7bcbd8..d55ef0aefd4 100644 --- a/jetty-websocket/websocket-server/pom.xml +++ b/jetty-websocket/websocket-server/pom.xml @@ -24,7 +24,6 @@ osgi.extender; filter:="(osgi.extender=osgi.serviceloader.registrar)" osgi.serviceloader; osgi.serviceloader=org.eclipse.jetty.websocket.servlet.WebSocketServletFactory - <_nouses>true diff --git a/jetty-websocket/websocket-servlet/pom.xml b/jetty-websocket/websocket-servlet/pom.xml index 7857ebc4177..c5062c1138e 100644 --- a/jetty-websocket/websocket-servlet/pom.xml +++ b/jetty-websocket/websocket-servlet/pom.xml @@ -23,7 +23,6 @@ Websocket Servlet Interface - <_nouses>true org.eclipse.jetty.websocket.server.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}",org.eclipse.jetty.websocket.server.pathmap.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}" osgi.serviceloader; filter:="(osgi.serviceloader=org.eclipse.jetty.websocket.servlet.WebSocketServletFactory)";cardinality:=multiple, osgi.extender; filter:="(osgi.extender=osgi.serviceloader.processor)" diff --git a/pom.xml b/pom.xml index 46fd47a9bd7..eaff7dbb30b 100644 --- a/pom.xml +++ b/pom.xml @@ -331,7 +331,7 @@ . ${bundle-symbolic-name}.*;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" Copyright (c) 2008-2015 Mort Bay Consulting Pty. Ltd. - <_versionpolicy>[$(version;==;$(@)),$(version;+;$(@))) + 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}))",* diff --git a/tests/test-webapps/test-jetty-webapp/pom.xml b/tests/test-webapps/test-jetty-webapp/pom.xml index 5a168c70723..de3071d50b5 100644 --- a/tests/test-webapps/test-jetty-webapp/pom.xml +++ b/tests/test-webapps/test-jetty-webapp/pom.xml @@ -82,7 +82,7 @@ war - javax.servlet.jsp.*;version="[2.2.0,3.0)",javax.servlet.*;version="[2.6,3.2)",org.eclipse.jetty.*;version="[9.0,10.0)",* + javax.servlet.jsp.*;version="[2.2.0,3.0)",org.eclipse.jetty.*;version="[$(version;===;${parsedVersion.osgiVersion}),$(version;==+;${parsedVersion.osgiVersion}))",* !com.acme* diff --git a/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml b/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml index 1c052db1de3..05c69279957 100644 --- a/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml +++ b/tests/test-webapps/test-servlet-spec/test-spec-webapp/pom.xml @@ -76,19 +76,19 @@ Test Webapp for Servlet 3.1 Features 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}", * - com.acme.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}" + <_nouses/> + com.acme.test;version="${parsedVersion.majorVersion}.${parsedVersion.minorVersion}.${parsedVersion.incrementalVersion}";-noimport:=true / .,WEB-INF/classes,WEB-INF/lib /META-INF/plugin-context.xml - <_nouses>true