Fix camel install on karaf with servlet range. Make camel-jetty into 2 features for 8 and 9. And make camel-jetty use 9 as default now.
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/891ab44f Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/891ab44f Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/891ab44f Branch: refs/heads/master Commit: 891ab44f21f6102abf8bcfcf6caf7ef35bd7cd0a Parents: 9ec5776 Author: Claus Ibsen <davscl...@apache.org> Authored: Sat Mar 12 12:07:15 2016 +0100 Committer: Claus Ibsen <davscl...@apache.org> Committed: Sat Mar 12 12:07:15 2016 +0100 ---------------------------------------------------------------------- components/camel-atmosphere-websocket/pom.xml | 8 ++-- components/camel-http/pom.xml | 8 ---- components/camel-jetty8/pom.xml | 2 +- .../features/src/main/resources/features.xml | 8 +++- .../camel/itest/karaf/CamelJetty8Test.java | 41 ++++++++++++++++++++ .../camel/itest/karaf/CamelJetty9Test.java | 40 +++++++++++++++++++ 6 files changed, 92 insertions(+), 15 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/891ab44f/components/camel-atmosphere-websocket/pom.xml ---------------------------------------------------------------------- diff --git a/components/camel-atmosphere-websocket/pom.xml b/components/camel-atmosphere-websocket/pom.xml index efe297a..c0a27a9 100644 --- a/components/camel-atmosphere-websocket/pom.xml +++ b/components/camel-atmosphere-websocket/pom.xml @@ -36,13 +36,13 @@ </camel.osgi.export.pkg> <camel.osgi.import.pkg> !org.apache.camel.component.atmosphere.websocket.*, - javax.servlet*;version="3.1.0", + javax.servlet.*;version="${servlet-version-range}", org.atmosphere.*;version="${atmosphere-version-range}", org.apache.catalina;resolution:=optional, org.apache.catalina.comet;resolution:=optional, - org.eclipse.jetty.continuation;version="[7.6,8.2)";resolution:=optional, - org.eclipse.jetty.server;version="[7.6,8.2)";resolution:=optional, - org.eclipse.jetty.util.ssl;version="[7.6,8.2)";resolution:=optional, + org.eclipse.jetty.continuation;version="[8,10)";resolution:=optional, + org.eclipse.jetty.server;version="[8,10)";resolution:=optional, + org.eclipse.jetty.util.ssl;version="[8,10)";resolution:=optional, ${camel.osgi.import.defaults}, * </camel.osgi.import.pkg> http://git-wip-us.apache.org/repos/asf/camel/blob/891ab44f/components/camel-http/pom.xml ---------------------------------------------------------------------- diff --git a/components/camel-http/pom.xml b/components/camel-http/pom.xml index 91df298..3a0e30c 100644 --- a/components/camel-http/pom.xml +++ b/components/camel-http/pom.xml @@ -30,9 +30,6 @@ <description>Camel HTTP support</description> <properties> - <camel.osgi.import.before.defaults> - javax.servlet.*;version="${servlet-version-range}" - </camel.osgi.import.before.defaults> <camel.osgi.export.pkg>org.apache.camel.component.http.*</camel.osgi.export.pkg> <camel.osgi.export.service> org.apache.camel.spi.ComponentResolver;component=http, @@ -50,11 +47,6 @@ <groupId>org.apache.camel</groupId> <artifactId>camel-http-common</artifactId> </dependency> - <dependency> - <groupId>javax.servlet</groupId> - <artifactId>javax.servlet-api</artifactId> - <version>${javax.servlet-api-version}</version> - </dependency> <dependency> <groupId>commons-httpclient</groupId> http://git-wip-us.apache.org/repos/asf/camel/blob/891ab44f/components/camel-jetty8/pom.xml ---------------------------------------------------------------------- diff --git a/components/camel-jetty8/pom.xml b/components/camel-jetty8/pom.xml index 737c628..cf27adf 100644 --- a/components/camel-jetty8/pom.xml +++ b/components/camel-jetty8/pom.xml @@ -31,7 +31,7 @@ <properties> <camel.osgi.import.before.defaults> - javax.servlet.*;version="${servlet-version-range}" + org.eclipse.jetty.*;version="[8,9)" </camel.osgi.import.before.defaults> <camel.osgi.export.pkg>org.apache.camel.component.jetty8</camel.osgi.export.pkg> <camel.osgi.export.service>org.apache.camel.spi.ComponentResolver;component=jetty</camel.osgi.export.service> http://git-wip-us.apache.org/repos/asf/camel/blob/891ab44f/platforms/karaf/features/src/main/resources/features.xml ---------------------------------------------------------------------- diff --git a/platforms/karaf/features/src/main/resources/features.xml b/platforms/karaf/features/src/main/resources/features.xml index 59faaa5..d660c40 100644 --- a/platforms/karaf/features/src/main/resources/features.xml +++ b/platforms/karaf/features/src/main/resources/features.xml @@ -850,8 +850,8 @@ <feature version='${project.version}'>camel-core</feature> <bundle>mvn:org.apache.camel/camel-jdbc/${project.version}</bundle> </feature> - <feature name='camel-jetty' version='${project.version}' resolver='(obr)' start-level='50'> - <details>camel-jetty intend to work with jetty8, so this feature only works in the karaf container which support jetty8, e.g. karaf 2.x/3.x</details> + <feature name='camel-jetty8' version='${project.version}' resolver='(obr)' start-level='50'> + <details>camel-jetty8 intend to work with jetty8, so this feature only works in the karaf container which support jetty8, e.g. karaf 2.x/3.x</details> <feature>jetty</feature> <feature version='${project.version}'>camel-core</feature> <bundle>mvn:org.apache.camel/camel-http-common/${project.version}</bundle> @@ -866,6 +866,10 @@ <bundle>mvn:org.apache.camel/camel-jetty-common/${project.version}</bundle> <bundle>mvn:org.apache.camel/camel-jetty9/${project.version}</bundle> </feature> + <feature name='camel-jetty' version='${project.version}' resolver='(obr)' start-level='50'> + <details>camel-jetty intend to work with jetty9, so this feature only works in the karaf container which support jetty9, e.g. karaf 4.x</details> + <feature>camel-jetty9</feature> + </feature> <feature name='camel-jgroups' version='${project.version}' resolver='(obr)' start-level='50'> <feature version='${project.version}'>camel-core</feature> <bundle>mvn:org.apache.camel/camel-jgroups/${project.version}</bundle> http://git-wip-us.apache.org/repos/asf/camel/blob/891ab44f/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJetty8Test.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJetty8Test.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJetty8Test.java new file mode 100644 index 0000000..0a81006 --- /dev/null +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJetty8Test.java @@ -0,0 +1,41 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.itest.karaf; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.PaxExam; + +@RunWith(PaxExam.class) +@Deprecated +public class CamelJetty8Test extends AbstractFeatureTest { + + public static final String COMPONENT = extractName(CamelJetty8Test.class); + + @Test + public void test() throws Exception { + testComponent("jetty"); + } + + @Configuration + public static Option[] configure() { + return configure(COMPONENT); + } + +} \ No newline at end of file http://git-wip-us.apache.org/repos/asf/camel/blob/891ab44f/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJetty9Test.java ---------------------------------------------------------------------- diff --git a/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJetty9Test.java b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJetty9Test.java new file mode 100644 index 0000000..07b2681 --- /dev/null +++ b/tests/camel-itest-karaf/src/test/java/org/apache/camel/itest/karaf/CamelJetty9Test.java @@ -0,0 +1,40 @@ +/** + * Licensed to the Apache Software Foundation (ASF) under one or more + * contributor license agreements. See the NOTICE file distributed with + * this work for additional information regarding copyright ownership. + * The ASF licenses this file to You under the Apache License, Version 2.0 + * (the "License"); you may not use this file except in compliance with + * the License. You may obtain a copy of the License at + * + * http://www.apache.org/licenses/LICENSE-2.0 + * + * Unless required by applicable law or agreed to in writing, software + * distributed under the License is distributed on an "AS IS" BASIS, + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + * See the License for the specific language governing permissions and + * limitations under the License. + */ +package org.apache.camel.itest.karaf; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Configuration; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.PaxExam; + +@RunWith(PaxExam.class) +public class CamelJetty9Test extends AbstractFeatureTest { + + public static final String COMPONENT = extractName(CamelJetty9Test.class); + + @Test + public void test() throws Exception { + testComponent("jetty"); + } + + @Configuration + public static Option[] configure() { + return configure(COMPONENT); + } + +} \ No newline at end of file