Added a activemq-osgi module which is an uber OSGi bundle of all the ActiveMQ jars to make integrating into OSGi a little simpler.

Adding karaf-itests module.

git-svn-id: https://svn.apache.org/repos/asf/activemq/trunk@1428537 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Hiram R. Chirino 2013-01-03 18:37:45 +00:00
parent 8dbfbb0095
commit 8eb11a3aa7
12 changed files with 771 additions and 7 deletions

View File

@ -0,0 +1,163 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>5.8-SNAPSHOT</version>
</parent>
<artifactId>activemq-karaf-itest</artifactId>
<name>ActiveMQ :: Karaf Integration Tests</name>
<description>Performs Karaf compliance integration tests</description>
<dependencies>
<dependency>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-client</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.exam</groupId>
<artifactId>pax-exam-junit4</artifactId>
<version>${pax-exam-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.runner</groupId>
<artifactId>pax-runner-no-jcl</artifactId>
<version>${pax-runner-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.ops4j.pax.swissbox</groupId>
<artifactId>pax-swissbox-tinybundles</artifactId>
<version>${pax-tiny-bundle-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.openengsb.labs.paxexam.karaf</groupId>
<artifactId>paxexam-karaf-container</artifactId>
<version>${paxexam-karaf-container-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.karaf</groupId>
<artifactId>apache-karaf</artifactId>
<version>${karaf-version}</version>
<type>tar.gz</type>
<scope>test</scope>
<exclusions>
<exclusion>
<groupId>org.apache.karaf.shell</groupId>
<artifactId>org.apache.karaf.shell.dev</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse</groupId>
<artifactId>osgi</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.felix</groupId>
<artifactId>org.apache.felix.configadmin</artifactId>
<version>${felix-configadmin-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.osgi</groupId>
<artifactId>org.osgi.core</artifactId>
<version>${org.osgi.core-version}</version>
<scope>test</scope>
</dependency>
<!-- test and logging -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkMode>pertest</forkMode>
<redirectTestOutputToFile>true</redirectTestOutputToFile>
<argLine>-Xmx256m</argLine>
<excludes>
<!--<exclude>**/*Cxf*.*</exclude>-->
</excludes>
<systemPropertyVariables>
<karafVersion>${karaf-version}</karafVersion>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>ci-build-profile</id>
<activation>
<property>
<name>maven.repo.local</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<forkedProcessTimeoutInSeconds>300</forkedProcessTimeoutInSeconds>
<!--
when the local repo location has been specified, we need to pass
on this information to PAX mvn url
-->
<argLine>-Dorg.ops4j.pax.url.mvn.localRepository=${maven.repo.local}</argLine>
<excludes>
<exclude>**/*Test.*</exclude>
</excludes>
<systemPropertyVariables>
<karafVersion>${karaf-version}</karafVersion>
</systemPropertyVariables>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

View File

@ -0,0 +1,178 @@
/**
* 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.After;
import org.junit.Before;
import org.openengsb.labs.paxexam.karaf.options.KarafDistributionOption;
import org.ops4j.pax.exam.Option;
import org.ops4j.pax.exam.options.UrlReference;
import org.osgi.framework.BundleContext;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import javax.inject.Inject;
import java.io.File;
import java.io.IOException;
import java.util.ArrayList;
import java.util.Arrays;
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.*;
public abstract class AbstractFeatureTest {
private static final Logger LOG = LoggerFactory.getLogger(AbstractFeatureTest.class);
static String basedir;
static {
try {
File location = new File(AbstractFeatureTest.class.getProtectionDomain().getCodeSource().getLocation().getFile());
basedir = new File(location, "../..").getCanonicalPath();
} catch (IOException e) {
throw new RuntimeException(e);
}
}
@Inject
protected BundleContext bundleContext;
@Before
public void setUp() throws Exception {
}
@After
public void tearDown() throws Exception {
}
// protected void testComponent(String component) throws Exception {
// long max = System.currentTimeMillis() + 10000;
// while (true) {
// try {
// assertNotNull("Cannot get component with name: " + component, createCamelContext().getComponent(component));
// return;
// } catch (Exception t) {
// if (System.currentTimeMillis() < max) {
// Thread.sleep(1000);
// } else {
// throw t;
// }
// }
// }
// }
//
// protected void testDataFormat(String format) throws Exception {
// long max = System.currentTimeMillis() + 10000;
// while (true) {
// try {
// DataFormatDefinition dataFormatDefinition = createDataformatDefinition(format);
// assertNotNull(dataFormatDefinition);
// assertNotNull(dataFormatDefinition.getDataFormat(new DefaultRouteContext(createCamelContext())));
// return;
// } catch (Exception t) {
// if (System.currentTimeMillis() < max) {
// Thread.sleep(1000);
// continue;
// } else {
// throw t;
// }
// }
// }
// }
//
// protected DataFormatDefinition createDataformatDefinition(String format) {
// return null;
// }
// protected void testLanguage(String lang) throws Exception {
// long max = System.currentTimeMillis() + 10000;
// while (true) {
// try {
// assertNotNull(createCamelContext().resolveLanguage(lang));
// return;
// } catch (Exception t) {
// if (System.currentTimeMillis() < max) {
// Thread.sleep(1000);
// continue;
// } else {
// throw t;
// }
// }
// }
// }
// protected CamelContext createCamelContext() throws Exception {
// CamelContextFactory factory = new CamelContextFactory();
// factory.setBundleContext(bundleContext);
// LOG.info("Get the bundleContext is " + bundleContext);
// return factory.createContext();
// }
public static String karafVersion() {
return System.getProperty("karafVersion", "2.3.0");
}
public static String activemqVersion() {
Package p = Package.getPackage("org.apache.activemq");
String version=null;
if (p != null) {
version = p.getImplementationVersion();
}
return System.getProperty("activemqVersion", version);
}
public static UrlReference getActiveMQKarafFeatureUrl() {
String type = "xml/features";
return mavenBundle().groupId("org.apache.activemq").
artifactId("activemq-karaf").version(activemqVersion()).type(type);
}
public static UrlReference getKarafFeatureUrl() {
LOG.info("*** The karaf version is " + karafVersion() + " ***");
String type = "xml/features";
return mavenBundle().groupId("org.apache.karaf.assemblies.features").
artifactId("standard").version(karafVersion()).type(type);
}
public static Option[] configure(String ...features) {
ArrayList<String> f = new ArrayList<String>();
// install the cxf jaxb spec as the karaf doesn't provide it by default
// f.add("cxf-jaxb");
f.addAll(Arrays.asList(features));
Option[] options =
new Option[]{
karafDistributionConfiguration().frameworkUrl(
maven().groupId("org.apache.karaf").artifactId("apache-karaf").type("tar.gz").version(karafVersion()))
//This version doesn't affect the version of karaf we use
.karafVersion(karafVersion()).name("Apache Karaf")
.unpackDirectory(new File("target/paxexam/unpack/")),
KarafDistributionOption.keepRuntimeFolder(),
// override the config.properties (to fix pax-exam bug)
replaceConfigurationFile("etc/config.properties", new File(basedir+"/src/test/resources/org/apache/activemq/karaf/itest/config.properties")),
replaceConfigurationFile("etc/custom.properties", new File(basedir+"/src/test/resources/org/apache/activemq/karaf/itest/custom.properties")),
scanFeatures(getActiveMQKarafFeatureUrl(), f.toArray(new String[f.size()]))};
return options;
}
}

View File

@ -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.activemq.karaf.itest;
import org.apache.activemq.ActiveMQConnectionFactory;
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 ActiveMQClientBundleTest extends AbstractFeatureTest {
@Configuration
public static Option[] configure() {
return configure("activemq-client");
}
@Test
public void test() throws Exception {
ActiveMQConnectionFactory factory = new ActiveMQConnectionFactory();
factory.getBrokerURL();
}
}

View File

@ -0,0 +1,19 @@
## ---------------------------------------------------------------------------
## 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.
## ---------------------------------------------------------------------------
#org.apache.commons.logging.Log=org.apache.commons.logging.impl.Jdk14Logger
org.apache.commons.logging.Log=org.apache.commons.logging.impl.Log4JLogger

View File

@ -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.
## ---------------------------------------------------------------------------
#
# The logging properties used during tests..
#
log4j.rootLogger=INFO, out
# Use the following line to turn on debug output for camel
#log4j.logger.org.apache.camel=DEBUG
#log4j.logger.org.ops4j.pax=DEBUG
# is very noisy at INFO level
log4j.logger.org.ops4j.io=WARN
# CONSOLE appender not used by default
log4j.appender.stdout=org.apache.log4j.ConsoleAppender
log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
log4j.appender.stdout.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
# File appender
log4j.appender.out=org.apache.log4j.FileAppender
log4j.appender.out.layout=org.apache.log4j.PatternLayout
log4j.appender.out.layout.ConversionPattern=%d [%-15.15t] %-5p %-30.30c{1} - %m%n
log4j.appender.out.file=target/camel-itest-karaf-test.log
log4j.appender.out.append=true

View File

@ -0,0 +1,124 @@
################################################################################
#
# 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.
#
################################################################################
# FIXING PAX-EXAM BUG
#
# This file lists Karaf default settings for this particular version of Karaf.
# For easier maintenance when upgrading Karaf and to better document which
# default values have changed, it is recommended to place any changes to
# these values in a custom.properties file in the same folder as this file.
# Each value specified in custom.properties will override the default value
# here.
#
#
# Properties file inclusions (as a space separated list of relative paths)
# Included files will override the values specified in this file
# NB: ${includes} properties files are mandatory, it means that Karaf will not start
# if the include file is not found
#
${includes} = jre.properties custom.properties
#
# Properties file inclusions (as a space separated list of relative paths)
# Included files will override the values specified in this file
# NB: ${optionals} properties files are optionals, it means that Karaf will just
# display a warning message but the bootstrap will be performed
#
# ${optionals} = my.properties
#
# Framework selection properties
#
karaf.framework=felix
#
# Location of the OSGi frameworks
#
karaf.framework.equinox=${karaf.default.repository}/org/eclipse/osgi/3.8.0.v20120529-1548/osgi-3.8.0.v20120529-1548.jar
karaf.framework.felix=${karaf.default.repository}/org/apache/felix/org.apache.felix.framework/4.0.3/org.apache.felix.framework-4.0.3.jar
#
# Framework config properties.
#
org.osgi.framework.system.packages= \
org.osgi.framework.startlevel;uses:="org.osgi.framework";version="1.0", \
org.osgi.framework.wiring;uses:="org.osgi.resource,org.osgi.framework";version="1.1", \
org.osgi.framework.hooks.bundle;uses:="org.osgi.framework";version="1.1", \
org.osgi.framework.hooks.service;uses:="org.osgi.framework";version="1.1", \
org.osgi.framework.hooks.resolver;uses:="org.osgi.framework.wiring";version="1.0", \
org.osgi.framework.launch;uses:="org.osgi.framework";version="1.1", \
org.osgi.framework.namespace;uses:="org.osgi.resource";version="1.0", \
org.osgi.framework;version="1.7",\
org.osgi.framework.hooks.weaving;uses:="org.osgi.framework.wiring";version="1.0",\
org.osgi.resource;version="1.0",org.osgi.service.url;version="1.0",\
org.osgi.service.startlevel;uses:="org.osgi.framework";version="1.1",\
org.osgi.service.packageadmin;uses:="org.osgi.framework";version="1.2",\
org.osgi.service.url;version="1.0", \
org.osgi.util.tracker;uses:="org.osgi.framework";version="1.5.1", \
org.apache.karaf.jaas.boot;version="2.3.0", \
org.apache.karaf.jaas.boot.principal;version="2.3.0", \
org.apache.karaf.version;version="2.3.0", \
${jre-${java.specification.version}}
# Extra packages appended after standard packages
# org.osgi.framework.system.packages.extra=
# javax.transaction is needed to avoid class loader constraint violation when using javax.sql
org.osgi.framework.bootdelegation=org.apache.karaf.jaas.boot,sun.*,com.sun.*,javax.transaction,javax.transaction.*
# OSGi Execution Environment
org.osgi.framework.executionenvironment=J2SE-1.7,JavaSE-1.7,J2SE-1.6,JavaSE-1.6,J2SE-1.5,JavaSE-1.5,J2SE-1.4,JavaSE-1.4,J2SE-1.3,JavaSE-1.3,J2SE-1.2,,JavaSE-1.2,CDC-1.1/Foundation-1.1,CDC-1.0/Foundation-1.0,J2ME,OSGi/Minimum-1.1,OSGi/Minimum-1.0
# Set the parent classloader for the bundle to the classloader that loads the Framework (i.e. everything in lib/*.jar)
org.osgi.framework.bundle.parent=framework
# To enable the use of the startup.properties file to control the start level:
karaf.auto.start=startup.properties
org.osgi.framework.startlevel.beginning=100
karaf.startlevel.bundle=80
karaf.shutdown.port.file=${karaf.data}/port
#
# FileMonitor properties
#
felix.fileinstall.dir = ${karaf.base}/etc
felix.fileinstall.filter = .*\\.cfg
felix.fileinstall.poll = 1000
felix.fileinstall.noInitialDelay = true
felix.fileinstall.log.level = 3
#
# Delay for writing the framework state to disk in equinox
# must be >= 1000 and <= 1800000
#
eclipse.stateSaveDelayInterval = 1000
#
# OBR Repository list
# This property will be modified by the obr:addUrl and obr:removeUrl commands.
#
obr.repository.url =
karaf.delay.console=false

View File

@ -0,0 +1,30 @@
################################################################################
#
# 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.
#
################################################################################
#
# All the values specified here will override the default values given
# in config.properties.
#
karaf.systemBundlesStartLevel=50
#
# You can place any customized configuration here.
#

View File

@ -37,6 +37,7 @@
<xstream-bundle-version>1.3_3</xstream-bundle-version> <xstream-bundle-version>1.3_3</xstream-bundle-version>
<servicemix.specs.version>1.9.0</servicemix.specs.version> <servicemix.specs.version>1.9.0</servicemix.specs.version>
<pax-exam-version>1.2.4</pax-exam-version> <pax-exam-version>1.2.4</pax-exam-version>
<karaf-version>2.2.9</karaf-version>
</properties> </properties>
<dependencies> <dependencies>

View File

@ -19,12 +19,36 @@
--> -->
<features name="activemq-${project.version}"> <features name="activemq-${project.version}">
<feature name="activemq" version="${project.version}" resolver="(obr)" start-level="50">
<feature name="activemq-client" version="${project.version}" resolver="(obr)" start-level="50">
<bundle>mvn:org.apache.activemq/activemq-osgi/${project.version}</bundle>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1</bundle> <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-annotation_1.0_spec/1.1.1</bundle>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle> <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jta_1.1_spec/1.1.1</bundle>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle> <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-jms_1.1_spec/1.1.1</bundle>
<bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle> <bundle dependency="true">mvn:org.apache.geronimo.specs/geronimo-j2ee-management_1.1_spec/1.0.1</bundle>
<bundle dependency="true">mvn:commons-pool/commons-pool/${commons-pool-version}</bundle> <bundle dependency="true">mvn:commons-pool/commons-pool/${commons-pool-version}</bundle>
<!--<bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections-version}</bundle>-->
<!--<bundle dependency='true'>mvn:commons-lang/commons-lang/${commons-lang-version}</bundle>-->
<!--<bundle dependency="true">mvn:commons-codec/commons-codec/1.4</bundle>-->
<!--<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.velocity/1.7_5</bundle>-->
<!--<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jasypt/1.9.0_1</bundle>-->
<!--<bundle dependency="true">mvn:org.apache.servicemix.specs/org.apache.servicemix.specs.stax-api-1.0/${servicemix.specs.version}</bundle>-->
<!--<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xpp3/${xpp3-bundle-version}</bundle>-->
<!--<bundle dependency="true">mvn:joda-time/joda-time/${jodatime-bundle-version}</bundle>-->
<!--<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.jdom/${jdom-bundle-version}</bundle>-->
<!--<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.dom4j/${dom4j-bundle-version}</bundle>-->
<!--<bundle dependency="true">mvn:org.apache.servicemix.bundles/org.apache.servicemix.bundles.xstream/${xstream-bundle-version}</bundle>-->
<!--<bundle dependency="true">mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/${aries-version}</bundle>-->
<!--<bundle>mvn:org.apache.activemq/kahadb/${project.version}</bundle>-->
<!--<bundle>mvn:org.apache.activemq/activemq-console/${project.version}</bundle>-->
<!--<bundle>mvn:org.apache.activemq/activemq-ra/${project.version}</bundle>-->
<!--<bundle>mvn:org.apache.activemq/activemq-pool/${project.version}</bundle>-->
<!--<bundle>mvn:org.apache.activemq/activemq-karaf/${project.version}</bundle>-->
<!--<bundle>mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/${aries-version}</bundle>-->
</feature>
<feature name="activemq-broker" version="${project.version}" resolver="(obr)" start-level="50">
<feature version="${project.version}">-client</feature>
<bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections-version}</bundle> <bundle dependency="true">mvn:commons-collections/commons-collections/${commons-collections-version}</bundle>
<bundle dependency='true'>mvn:commons-lang/commons-lang/${commons-lang-version}</bundle> <bundle dependency='true'>mvn:commons-lang/commons-lang/${commons-lang-version}</bundle>
<bundle dependency="true">mvn:commons-codec/commons-codec/1.4</bundle> <bundle dependency="true">mvn:commons-codec/commons-codec/1.4</bundle>
@ -42,11 +66,6 @@
<bundle dependency="true">mvn:org.fusesource.hawtbuf/hawtbuf-proto/${hawtbuf-version}</bundle> <bundle dependency="true">mvn:org.fusesource.hawtbuf/hawtbuf-proto/${hawtbuf-version}</bundle>
<bundle dependency="true">mvn:org.codehaus.jackson/jackson-core-asl/${jackson-version}</bundle> <bundle dependency="true">mvn:org.codehaus.jackson/jackson-core-asl/${jackson-version}</bundle>
<bundle dependency="true">mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson-version}</bundle> <bundle dependency="true">mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson-version}</bundle>
<bundle>mvn:org.apache.activemq/activemq-core/${project.version}</bundle>
<bundle>mvn:org.apache.activemq/kahadb/${project.version}</bundle>
<bundle>mvn:org.apache.activemq/activemq-console/${project.version}</bundle>
<bundle>mvn:org.apache.activemq/activemq-ra/${project.version}</bundle>
<bundle>mvn:org.apache.activemq/activemq-pool/${project.version}</bundle>
<bundle>mvn:org.apache.activemq/activemq-karaf/${project.version}</bundle> <bundle>mvn:org.apache.activemq/activemq-karaf/${project.version}</bundle>
<bundle>mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/${aries-version}</bundle> <bundle>mvn:org.apache.aries.transaction/org.apache.aries.transaction.manager/${aries-version}</bundle>
</feature> </feature>

141
activemq-osgi/pom.xml Normal file
View File

@ -0,0 +1,141 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
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.
-->
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.apache.activemq</groupId>
<artifactId>activemq-parent</artifactId>
<version>5.8-SNAPSHOT</version>
</parent>
<artifactId>activemq-osgi</artifactId>
<packaging>bundle</packaging>
<name>ActiveMQ :: OSGi bundle</name>
<description>Puts together an ActiveMQ OSGi bundle</description>
<properties>
<activemq.osgi.import.pkg>
</activemq.osgi.import.pkg>
<activemq.osgi.export>
org.apache.activemq*;version=${project.version};-noimport:=true;-split-package:=merge-first,
'=META-INF.services.org.apache.xbean.spring.http.activemq.apache.org.schema';-noimport:=true
</activemq.osgi.export>
<activemq.osgi.dynamic.import>*</activemq.osgi.dynamic.import>
<surefire.argLine>-Xmx512M</surefire.argLine>
</properties>
<dependencies>
<!-- The core broker dependency -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-broker</artifactId>
</dependency>
<!-- Additional message store impls -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-kahadb-store</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-jdbc-store</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-leveldb-store</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-amq-store</artifactId>
</dependency>
<!-- Additional protocol impls -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-stomp</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-amqp</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-mqtt</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-http</artifactId>
</dependency>
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-xmpp</artifactId>
</dependency>
<!-- Additional Dependencies. -->
<dependency>
<groupId>${project.groupId}</groupId>
<artifactId>activemq-camel</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<configuration>
<instructions>
<!-- <Bundle-Activator>org.apache.activemq.util.osgi.Activator</Bundle-Activator> -->
</instructions>
</configuration>
</plugin>
</plugins>
</build>
<profiles>
<profile>
<id>deploy</id>
<build>
<defaultGoal>deploy</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>2.1.2</version>
<configuration>
<attach>false</attach>
</configuration>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>

10
pom.xml
View File

@ -83,7 +83,7 @@
<junit-version>4.10</junit-version> <junit-version>4.10</junit-version>
<hamcrest-version>1.1</hamcrest-version> <hamcrest-version>1.1</hamcrest-version>
<jxta-version>2.0</jxta-version> <jxta-version>2.0</jxta-version>
<karaf-version>2.2.9</karaf-version> <karaf-version>2.3.0</karaf-version>
<leveldb-api-version>0.4</leveldb-api-version> <leveldb-api-version>0.4</leveldb-api-version>
<leveldb-version>0.4</leveldb-version> <leveldb-version>0.4</leveldb-version>
<leveldbjni-version>1.4</leveldbjni-version> <leveldbjni-version>1.4</leveldbjni-version>
@ -120,6 +120,12 @@
<xerces-version>2.9.1</xerces-version> <xerces-version>2.9.1</xerces-version>
<zookeeper-version>3.3.5</zookeeper-version> <zookeeper-version>3.3.5</zookeeper-version>
<pax-exam-version>2.6.0</pax-exam-version>
<paxexam-karaf-container-version>1.0.0</paxexam-karaf-container-version>
<pax-runner-version>1.6.1</pax-runner-version>
<pax-tiny-bundle-version>1.3.1</pax-tiny-bundle-version>
<felix-configadmin-version>1.4.0</felix-configadmin-version>
<site-repo-url>scpexe://people.apache.org/www/activemq.apache.org/maven/</site-repo-url> <site-repo-url>scpexe://people.apache.org/www/activemq.apache.org/maven/</site-repo-url>
<source-version>1.6</source-version> <source-version>1.6</source-version>
<target-version>1.6</target-version> <target-version>1.6</target-version>
@ -220,6 +226,7 @@
<module>activemq-console</module> <module>activemq-console</module>
<module>activemq-fileserver</module> <module>activemq-fileserver</module>
<module>activemq-jaas</module> <module>activemq-jaas</module>
<module>activemq-osgi</module>
<module>activemq-blueprint</module> <module>activemq-blueprint</module>
<module>activemq-karaf</module> <module>activemq-karaf</module>
<module>activemq-openwire-generator</module> <module>activemq-openwire-generator</module>
@ -1436,6 +1443,7 @@
<profile> <profile>
<id>unstable</id> <id>unstable</id>
<modules> <modules>
<module>activemq-karaf-itest</module>
</modules> </modules>
</profile> </profile>
<profile> <profile>