ops4j / org.ops4j.pax.jms

Pax JMS provides a lightweight bridge between Java Message Service (JMS) and OSGi using Declarative Services and the whiteboard pattern
Apache License 2.0
6 stars 8 forks source link

Make dependencies able to be blacklisted for artemis [PAXJMS-16] #44

Closed grgrzybek closed 6 years ago

grgrzybek commented 6 years ago

Benjamin Graf created PAXJMS-16

Set dependency="true" for features artemis-core-client and artemis-jms-client to make them able to be blacklisted.

Otherwise IllegalStateException is thrown by karaf-maven-plugin for custom distributions.


Affects: 1.0.1 Votes: 0, Watches: 2

grgrzybek commented 6 years ago

Grzegorz Grzybek commented

Fixed here - thanks Benjamin Graf!

grgrzybek commented 6 years ago

Grzegorz Grzybek commented

If you need new release, please let me know. Remember, with Karaf 4.2, you can override entire feature without a need to change it in original project.

In other words, if you have pax jms feature:

<feature name="pax-jms-artemis" version="1.0.1">
    <feature>pax-jms-core</feature>
    <!-- features from mvn:org.apache.activemq/artemis-features/2.5.0/xml/features -->
    <feature>artemis-core-client</feature>
    <feature>artemis-jms-client</feature>
    <feature>artemis-amqp-client</feature>

    <bundle>mvn:org.ops4j.pax.jms/pax-jms-artemis/1.0.1</bundle>
</feature>

You can have $KARAF_HOME/etc/org.apache.karaf.features.xml file with:

<?xml version="1.0" encoding="UTF-8"?>
<featuresProcessing xmlns="http://karaf.apache.org/xmlns/features-processing/v1.0.0" xmlns:f="http://karaf.apache.org/xmlns/features/v1.5.0">
    <!-- A list of feature replacements that allows changing external feature definitions -->
    <featureReplacements>
        <replacement mode="replace">
            <feature name="pax-jms-artemis" version="1.0.1">
                <feature>pax-jms-core</feature>
                <!-- features from mvn:org.apache.activemq/artemis-features/2.5.0/xml/features -->
                <feature dependency="true">artemis-core-client</feature>
                <feature dependency="true">artemis-jms-client</feature>
                <feature>artemis-amqp-client</feature>

                <bundle>mvn:org.ops4j.pax.jms/pax-jms-artemis/1.0.1</bundle>
            </feature>
        </replacement>
    </featureReplacements>
</featuresProcessing>

Karaf 4.2 will use your version of feature definition.