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

CAMEL-18664 fix build and examples to work in karaf. #6

Merged
merged 2 commits into from Nov 10, 2022
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
3 changes: 0 additions & 3 deletions examples/camel-example-artemis-amqp-blueprint/pom.xml
Expand Up @@ -35,9 +35,6 @@

<properties>
<category>Messaging</category>
<camel.osgi.import.additional>
org.apache.qpid.*;version="[0.20,1)",
</camel.osgi.import.additional>
</properties>

<dependencyManagement>
Expand Down
Expand Up @@ -16,30 +16,22 @@
*/
package org.apache.camel.example.artemis.amqp;

import org.apache.activemq.artemis.jms.server.embedded.EmbeddedJMS;
import org.apache.activemq.artemis.core.server.embedded.EmbeddedActiveMQ;
import org.apache.activemq.artemis.spi.core.security.ActiveMQJAASSecurityManager;

// import org.apache.activemq.artemis.core.config.impl.SecurityConfiguration;
// import org.apache.activemq.artemis.spi.core.security.jaas.InVMLoginModule;


//#################################################
// Blueprint does not support Bean inheritance (necessary for Artemis EmbeddedJMS)
// We need therefore a 'support' class
//#################################################
public class EmbeddedBrokerSupport extends EmbeddedJMS {
public class EmbeddedBrokerSupport extends EmbeddedActiveMQ {

public EmbeddedBrokerSupport(ActiveMQJAASSecurityManager securityManager) throws Exception {
this.setSecurityManager(securityManager);
}

public void startServer() throws Exception {
this.start();

//if you need more twicking use Java to customise as follows:
// SecurityConfiguration securityConfig = new SecurityConfiguration();
// securityConfig.addUser("guest", "guest");
// securityConfig.addRole("guest", "guest");
// securityConfig.setDefaultUser("guest");
// ActiveMQJAASSecurityManager securityManager = new ActiveMQJAASSecurityManager(InVMLoginModule.class.getName(), securityConfig);
// this.setSecurityManager(securityManager);
}

public void close() throws Exception {
Expand Down
Expand Up @@ -50,10 +50,12 @@
</argument>
</bean>


<!-- Blueprint does not support Bean inheritance (necessary for Artemis EmbeddedJMS)
We need therefore a 'support' class -->
<bean id="embeddedJMS"
class="org.apache.camel.example.artemis.amqp.EmbeddedBrokerSupport"
init-method="startServer"
destroy-method="close">
<argument ref="securityManager"/>
</bean>
Expand Down
Expand Up @@ -39,10 +39,11 @@
<permission type="deleteDurableQueue" roles="guest"/>
<permission type="createNonDurableQueue" roles="guest"/>
<permission type="deleteNonDurableQueue" roles="guest"/>
<permission type="createAddress" roles="guest"/>
<permission type="consume" roles="guest"/>
<permission type="send" roles="guest"/>
</security-setting>
</security-settings>

</core>
</configuration>
</configuration>
Expand Up @@ -30,7 +30,7 @@ spec:
- "camel:timer"
- "camel:http"
- "camel:jsonpath"
flow:
template:
from:
uri: "timer:chuck"
parameters:
Expand Down
6 changes: 6 additions & 0 deletions examples/pom.xml
Expand Up @@ -207,6 +207,12 @@
</pluginRepositories>

<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<filtering>true</filtering>
</resource>
</resources>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
Expand Down