diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java index 40a834147d..c3acfa74ec 100644 --- a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java +++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/AbstractFeatureTest.java @@ -18,6 +18,7 @@ package org.apache.activemq.karaf.itest; import org.apache.felix.service.command.CommandProcessor; import org.apache.felix.service.command.CommandSession; +import org.apache.karaf.features.FeaturesService; import org.junit.After; import org.junit.Before; import org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption; @@ -47,6 +48,7 @@ import java.util.concurrent.TimeUnit; import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.karafDistributionConfiguration; import static org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption.replaceConfigurationFile; import static org.ops4j.pax.exam.CoreOptions.*; +import static org.junit.Assert.assertTrue; public abstract class AbstractFeatureTest { @@ -69,6 +71,9 @@ public abstract class AbstractFeatureTest { @Inject protected BundleContext bundleContext; + @Inject + FeaturesService featuresService; + @Before public void setUp() throws Exception { } @@ -127,8 +132,20 @@ public abstract class AbstractFeatureTest { return executeCommand(command, COMMAND_TIMEOUT, false); } + /** + * Installs a feature and asserts that feature is properly installed. + * @param feature + * @throws Exception + */ + public void installAndAssertFeature(String feature) throws Exception { + System.err.println(executeCommand("features:install " + feature)); + System.err.println(executeCommand("osgi:list -t 0")); + assertTrue("Expected " + feature + " feature to be installed.", featuresService.isInstalled(featuresService.getFeature(feature))); + } - public static String karafVersion() { + + + public static String karafVersion() { return System.getProperty("karafVersion", "2.3.0"); } diff --git a/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java new file mode 100644 index 0000000000..3e2edbf866 --- /dev/null +++ b/activemq-karaf-itest/src/test/java/org/apache/activemq/karaf/itest/ObrFeatureTest.java @@ -0,0 +1,43 @@ +/** + * 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.activemq.karaf.itest; + +import org.junit.Test; +import org.junit.runner.RunWith; +import org.ops4j.pax.exam.Option; +import org.ops4j.pax.exam.junit.Configuration; +import org.ops4j.pax.exam.junit.JUnit4TestRunner; + + +@RunWith(JUnit4TestRunner.class) +public class ObrFeatureTest extends AbstractFeatureTest { + + @Configuration + public static Option[] configure() { + return configure("obr"); + } + + @Test + public void testClient() throws Throwable { + installAndAssertFeature("activemq-client"); + } + + //@Test + public void testBroker() throws Throwable { + installAndAssertFeature("activemq-broker"); + } +} diff --git a/activemq-karaf/src/main/resources/features.xml b/activemq-karaf/src/main/resources/features.xml index 3ff0ef98a5..01b0a7dcfe 100644 --- a/activemq-karaf/src/main/resources/features.xml +++ b/activemq-karaf/src/main/resources/features.xml @@ -22,19 +22,22 @@ - mvn:org.apache.activemq/activemq-osgi/${project.version} mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1 mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1 mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1 mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1 mvn:commons-pool/commons-pool/${commons-pool-version} + mvn:commons-net/commons-net/${commons-net-version} spring mvn:org.apache.xbean/xbean-spring/${xbean-version} + mvn:org.apache.activemq/activemq-osgi/${project.version} + jetty + spring-dm activemq-client mvn:commons-collections/commons-collections/${commons-collections-version} mvn:commons-lang/commons-lang/${commons-lang-version} @@ -44,14 +47,17 @@ mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/${servicemix.specs.version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xpp3/${xpp3-bundle-version} mvn:joda-time/joda-time/${jodatime-bundle-version} - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jdom/${jdom-bundle-version} - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/${dom4j-bundle-version} mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream/${xstream-bundle-version} + mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.snappy-java/${snappy-bundle-version} mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/${aries-version} + mvn:org.apache.geronimo.specs/geronimo-j2ee-connector_1.5_spec/2.0.0 mvn:org.apache.aries/org.apache.aries.util/${aries-version} + mvn:org.apache.activemq/activeio-core/${activeio-version} + mvn:org.codehaus.jettison/jettison/${jettison-version} + mvn:org.codehaus.jackson/jackson-core-asl/${jackson-version} + mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson-version} mvn:org.apache.activemq/activemq-karaf/${project.version} mvn:org.scala-lang/scala-library/${scala-version} - activemq-http @@ -62,19 +68,6 @@ activemq-web-console - - jetty - mvn:org.apache.activemq/activemq-http/${project.version} - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.josql/${josql-version} - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlresolver/${xmlresolver-bundle-version} - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.saxon/${saxon-bundle-version} - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.ant/${ant-bundle-version} - mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xmlbeans/${xmlbeans-bundle-version} - mvn:org.apache.httpcomponents/httpcore-osgi/${httpclient-version} - mvn:org.apache.httpcomponents/httpclient-osgi/${httpclient-version} - mvn:javax.jmdns/jmdns/${jmdns-version} - - activemq-client camel-jms diff --git a/activemq-leveldb-store/pom.xml b/activemq-leveldb-store/pom.xml index 1265154d54..4e7fbb937e 100644 --- a/activemq-leveldb-store/pom.xml +++ b/activemq-leveldb-store/pom.xml @@ -111,7 +111,6 @@ org.iq80.snappy snappy 0.2 - true org.codehaus.jackson diff --git a/activemq-osgi/pom.xml b/activemq-osgi/pom.xml index acbf671d18..e7a5eb6eff 100644 --- a/activemq-osgi/pom.xml +++ b/activemq-osgi/pom.xml @@ -32,13 +32,50 @@ - + !org.apache.commons.daemon, + !org.apache.maven*, + sun.misc*;resolution:=optional, + sun.nio*;resolution:=optional, + javax.jmdns*;resolution:=optional, + javax.resource*;resolution:=optional, + javax.servlet*;resolution:=optional, + com.thoughtworks.xstream*;resolution:=optional, + org.apache.activeio*;resolution:=optional, + org.apache.camel*;resolution:=optional, + org.apache.derby.jdbc*;resolution:=optional, + org.apache.geronimo.transaction.manager*;resolution:=optional, + org.apache.hadoop*;resolution:=optional, + org.apache.http*;resolution:=optional, + org.apache.xpath*;resolution:=optional, + org.bouncycastle*;resolution:=optional, + org.codehaus.jackson*;resolution:=optional, + org.codehaus.jettison*;resolution:=optional, + org.jasypt*;resolution:=optional, + org.eclipse.jetty*;resolution:=optional, + org.springframework.jms*;version="[3,4]";resolution:=optional, + org.springframework.osgi*;version="[3,4]";resolution:=optional, + org.springframework.transaction*;version="[3,4]";resolution:=optional, + org.xmlpull*;resolution:=optional, + scala*;resolution:=optional, + javax.annotation*, + javax.jms*, + javax.management + javax.transaction*, + org.apache.commons.pool*, + org.apache.commons.net*, + org.apache.xbean.spring*, + org.springframework*;version="[3,4]";resolution:=optional, + * org.apache.activemq*;version=${project.version};-noimport:=true;-split-package:=merge-first, - org.iq80*;-noimport:=true;-split-package:=merge-first, - org.fusesource*;-noimport:=true;-split-package:=merge-first + + org.fusesource*, + org.apache.qpid*, + com.google.common*, + org.iq80* + * -Xmx512M diff --git a/pom.xml b/pom.xml index 89d680c15f..f768a18dba 100755 --- a/pom.xml +++ b/pom.xml @@ -104,6 +104,7 @@ 2.10.0 1.8 1.6.6 + 1.0.4.1_1 3.1.3.RELEASE 1.2.1 1.5.10