Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AMQ-9281: Add Camel 4.1.0 and exclude camel-osgi/camel-blueprint #1096

Merged
merged 1 commit into from
Nov 1, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions activemq-karaf-itest/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -111,14 +111,6 @@
<version>${qpid-jms-version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.camel.karaf</groupId>
<artifactId>apache-camel</artifactId>
<version>${camel-version}</version>
<type>xml</type>
<classifier>features</classifier>
<scope>test</scope>
</dependency>

<!-- test and logging -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,8 +145,6 @@ public static Option configure(String... features) {
String karafVersion = MavenUtils.getArtifactVersion("org.apache.karaf", "apache-karaf");
MavenUrlReference karafUrl = maven().groupId("org.apache.karaf").artifactId("apache-karaf")
.type("tar.gz").versionAsInProject();
UrlReference camelUrl = maven().groupId("org.apache.camel.karaf")
.artifactId("apache-camel").type("xml").classifier("features").versionAsInProject();
UrlReference activeMQUrl = maven().groupId("org.apache.activemq").
artifactId("activemq-karaf").versionAsInProject().type("xml").classifier("features").versionAsInProject();
return composite(
Expand All @@ -157,15 +155,10 @@ public static Option configure(String... features) {
editConfigurationFilePut("etc/org.ops4j.pax.url.mvn.cfg", "org.ops4j.pax.url.mvn.repositories", "https://repo1.maven.org/maven2@id=central"),
editConfigurationFilePut("etc/config.properties", "karaf.startlevel.bundle", "50"),
// debugConfiguration("5005", true),
features(activeMQUrl, features), //
features(camelUrl)
features(activeMQUrl, features)
);
}

protected static String camelVersion() {
return MavenUtils.getArtifactVersion("org.apache.camel.karaf", "apache-camel");
}

public static boolean withinReason(Callable<Boolean> callable) throws Exception {
long max = System.currentTimeMillis() + ASSERTION_TIMEOUT;
while (true) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ public static Option[] configure() {
return new Option[] //
{
composite(configure("activemq", "activemq-shell", "camel-jms")),
editConfigurationFilePut("etc/system.properties", "camel.version", camelVersion()),
replaceConfigurationFile("etc/activemq.xml", new File(RESOURCE_BASE + "activemq-nd-camel.xml")),
replaceConfigurationFile("etc/org.apache.activemq.server-default.cfg", new File(RESOURCE_BASE + "org.apache.activemq.server-default.cfg"))
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,8 +40,7 @@ public static Option[] configure() {
{
configure("activemq"),
// copy camel.xml into a temporary directory in karaf, so we later can hot-deploy it
replaceConfigurationFile("data/tmp/camel.xml", new File(RESOURCE_BASE + "camel.xml")),
editConfigurationFilePut("etc/system.properties", "camel.version", camelVersion())
replaceConfigurationFile("data/tmp/camel.xml", new File(RESOURCE_BASE + "camel.xml"))
};
}

Expand Down
8 changes: 0 additions & 8 deletions activemq-karaf/src/main/resources/features.xml
Original file line number Diff line number Diff line change
Expand Up @@ -42,14 +42,6 @@
<bundle>mvn:org.apache.activemq/activemq-karaf/${project.version}</bundle>
</feature>

<feature name="activemq-camel" version="${project.version}">
<feature version="${project.version}">activemq-client</feature>
<feature version="${camel-version-range}">camel-jms</feature>
<feature version="${camel-version-range}">camel</feature>
<feature version="${camel-version-range}">camel-spring</feature>
<feature version="${camel-version-range}">camel-blueprint</feature>
</feature>

<!--
Don't forget to bind Karaf JMX server to 0.0.0.0 to have a functional webconsole:
In etc/org.apache.karaf.management.cfg, both rmiRegistryHost and rmiServerHost should use 0.0.0.0
Expand Down
14 changes: 0 additions & 14 deletions activemq-osgi/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -94,11 +94,6 @@
<groupId>${project.groupId}</groupId>
<artifactId>activemq-spring</artifactId>
</dependency>

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
</dependency>

<dependency>
<groupId>${project.groupId}</groupId>
Expand Down Expand Up @@ -255,15 +250,6 @@
<outputDirectory>${basedir}/target/extra-resources/</outputDirectory>
<includes>camel-spring.xsd</includes>
</artifactItem>
<artifactItem>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
<version>${camel-version}</version>
<type>jar</type>
<overWrite>false</overWrite>
<outputDirectory>${basedir}/target/extra-resources/</outputDirectory>
<includes>camel-blueprint.xsd</includes>
</artifactItem>
</artifactItems>
</configuration>
</execution>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
import org.apache.activemq.broker.BrokerService;
import org.apache.activemq.spring.SpringBrokerContext;
import org.apache.activemq.spring.Utils;
import org.apache.camel.blueprint.CamelContextFactoryBean;
import org.osgi.framework.BundleContext;
import org.osgi.framework.ServiceRegistration;
import org.osgi.service.cm.ConfigurationException;
Expand Down Expand Up @@ -93,9 +92,10 @@ public void postProcessBeanFactory(ConfigurableListableBeanFactory beanFactory)

@Override
public Object postProcessBeforeInitialization(Object bean, String beanName) throws BeansException {
if (bean instanceof CamelContextFactoryBean) {
((CamelContextFactoryBean) bean).setBundleContext(bundleContext);
}
// camel-blueprint is not provided by camel 4.1.0
//if (bean instanceof CamelContextFactoryBean) {
// ((CamelContextFactoryBean) bean).setBundleContext(bundleContext);
//}
return bean;
}

Expand Down
72 changes: 72 additions & 0 deletions assembly/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -162,18 +162,90 @@
</dependency>

<!-- camel -->
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-activemq</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-base</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-base-engine</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core-catalog</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core-engine</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core-languages</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core-model</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core-processor</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core-reifier</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core-xml</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-log</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-management-api</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-util</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring-xml</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-support</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-timer</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-xml-jaxb</artifactId>
</dependency>

<!-- commons -->
<dependency>
Expand Down
22 changes: 19 additions & 3 deletions assembly/src/main/descriptors/common-bin.xml
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@
<include>jakarta.transaction:jakarta.transaction-api</include>
<include>${pom.groupId}:activemq-web</include>
<include>org.fusesource.hawtbuf:hawtbuf</include>
<include>jakarta.xml.bind:jaxb-api</include>
<include>jakarta.xml.bind:jakarta.xml.bind-api</include>
<include>org.glassfish.jaxb:jaxb-runtime</include>
<include>org.glassfish.jaxb:jaxb-core</include>
<include>com.sun.istack:istack-commons-runtime</include>
Expand All @@ -157,20 +157,36 @@
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</dependencySet>
<!-- AMQ-9239 as of 2023-06-05 Camel does not support jakarta.jms*
<dependencySet>
<outputDirectory>lib/camel</outputDirectory>
<unpack>false</unpack>
<scope>runtime</scope>
<includes>
<include>org.apache.camel:camel-activemq</include>
<include>org.apache.camel:camel-api</include>
<include>org.apache.camel:camel-base</include>
<include>org.apache.camel:camel-base-engine</include>
<include>org.apache.camel:camel-core</include>
<include>org.apache.camel:camel-core-catalog</include>
<include>org.apache.camel:camel-core-engine</include>
<include>org.apache.camel:camel-core-languages</include>
<include>org.apache.camel:camel-core-model</include>
<include>org.apache.camel:camel-core-processor</include>
<include>org.apache.camel:camel-core-reifier</include>
<include>org.apache.camel:camel-core-xml</include>
<include>org.apache.camel:camel-log</include>
<include>org.apache.camel:camel-management-api</include>
<include>org.apache.camel:camel-spring</include>
<include>org.apache.camel:camel-spring-xml</include>
<include>org.apache.camel:camel-support</include>
<include>org.apache.camel:camel-timer</include>
<include>org.apache.camel:camel-util</include>
<include>org.apache.camel:camel-jms</include>
<include>org.apache.camel:camel-xml-jaxb</include>
</includes>
<fileMode>0644</fileMode>
<directoryMode>0755</directoryMode>
</dependencySet>
-->
<dependencySet>
<outputDirectory>lib/optional</outputDirectory>
<unpack>false</unpack>
Expand Down
2 changes: 0 additions & 2 deletions assembly/src/release/examples/conf/camel.xml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,8 @@
http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd">

<camelContext id="camel" xmlns="http://camel.apache.org/schema/spring">

<!-- You can use Spring XML syntax to define the routes here using the <route> element -->
<route>
<description>Example Camel Route</description>
<from uri="activemq:example.A"/>
<to uri="activemq:example.B"/>
</route>
Expand Down
38 changes: 7 additions & 31 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -46,8 +46,7 @@
<ant-version>1.10.14</ant-version>
<aries-version>1.1.0</aries-version>
<axion-version>1.0-M3-dev</axion-version>
<camel-version>2.25.4</camel-version>
<camel-version-range>[2.20,4)</camel-version-range>
<camel-version>4.1.0</camel-version>
<commons-beanutils-version>1.9.4</commons-beanutils-version>
<commons-collections-version>3.2.2</commons-collections-version>
<commons-daemon-version>1.3.4</commons-daemon-version>
Expand Down Expand Up @@ -215,7 +214,6 @@
<module>activemq-all</module>
<module>activemq-console</module>
<module>activemq-jaas</module>
<module>activemq-karaf</module>
<module>activemq-jms-pool</module>
<module>activemq-pool</module>
<module>activemq-cf</module>
Expand All @@ -227,10 +225,11 @@
<module>activemq-runtime-config</module>
<module>activemq-tooling</module>
<module>activemq-web</module>
<module>activemq-osgi</module>
<module>activemq-blueprint</module>
<module>activemq-web-demo</module>
<module>activemq-web-console</module>
<module>activemq-karaf</module>
<module>activemq-osgi</module>
<module>activemq-blueprint</module>
<module>activemq-karaf-itest</module>
<module>assembly</module>
<module>activemq-log4j-appender</module>
Expand Down Expand Up @@ -515,33 +514,10 @@

<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-core</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-spring</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-blueprint</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-jms</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test</artifactId>
<version>${camel-version}</version>
</dependency>
<dependency>
<groupId>org.apache.camel</groupId>
<artifactId>camel-test-spring</artifactId>
<artifactId>camel-bom</artifactId>
<version>${camel-version}</version>
<type>pom</type>
<scope>import</scope>
</dependency>

<dependency>
Expand Down