Hi,

shure here it is ...

Regards
Frank
________________________________
Von: Jean-Baptiste Onofré <[email protected]>
Gesendet: Donnerstag, 20. Januar 2022 17:23
An: [email protected] <[email protected]>
Betreff: EXT:Re: Karaf Tooling Maven Plugin produces strange feature file

Hi,

Can you share the pom.xml ? It looks like you have dual deps maybe in
dependency sets or plugin dependency sets.

Regards
JB

On 20/01/2022 16:25, Zinner, Frank Uwe Alfred wrote:
> Hi,
>
> I need to migrate from Karaf 4.2.10 to 4.2.15 and I use the
> karaf-maven-plugin for building a custom one.
>
> With 4.2.10 this works, but from 4.2.11 onwards the build produces
> different feature files.
>
> Here’s an excerpt from the UUID like feature xml file generated with the
> 4.2.15 version:
>
> <features xmlns=http://karaf.apache.org/xmlns/features/v1.6.0
> <http://karaf.apache.org/xmlns/features/v1.6.0>
> name="c9cb60ab-2f43-4db2-94fe-be232fcadcca">
>
>
> <repository>mvn:org.apache.karaf.features/standard/4.2.15/xml/features</repository>
>
>
> <repository>mvn:org.apache.karaf.features/framework/4.2.15/xml/features</repository>
>
>
> <repository>mvn:org.apache.karaf.features/enterprise/4.2.15/xml/features</repository>
>
>
> <repository>mvn:org.apache.camel.karaf/apache-camel/3.7.7/xml/features</repository>
>
>
> <repository>mvn:org.apache.activemq/activemq-karaf/5.16.2/xml/features</repository>
>
>      <repository>mvn:io.hawt/hawtio-karaf/2.14.4/xml/features</repository>
>
>      <feature name="4d86dce9-a5be-4263-8dfd-ed8cace10e68" version="0.0.0">
>
>          <feature version="4.2.15" dependency="false">framework</feature>
>
>          <feature version="4.2.10" dependency="false">eventadmin</feature>
>
>          <feature version="4.2.15" dependency="false">eventadmin</feature>
>
>          <feature version="4.2.10"
> dependency="false">aries-blueprint</feature>
>
>          <feature version="4.2.15"
> dependency="false">aries-blueprint</feature>
>
>          <feature version="2.6.2" dependency="false">wrap</feature>
>
>          <feature version="2.6.7" prerequisite="true"
> dependency="false">wrap</feature>
>
>          <feature version="5.16.2"
> dependency="false">activemq-broker-noweb</feature>
>
>          <feature version="4.2.10" dependency="false">bundle</feature>
>
>         <feature version="4.2.15" dependency="false">bundle</feature>
>
> *The file contains duplicates which differ in versions, this wasn’t the
> case in 4.2.10.*
>
> Any ideas what causes this problem?
>
> Karaf won’t start with such a configuration.
>
> **
>
> Kind regards,
>
> Frank
>
> **
>
> *Frank Uwe Alfred Zinner (extern)*
>
> DFS Deutsche Flugsicherung GmbH
> SH/AM
> Am DFS-Campus 7
> 63225 Langen
>
> Mail: [email protected]
> <mailto:[email protected]>
>
> DFS Deutsche Flugsicherung GmbH • Am DFS-Campus • 63225 Langen • Tel.:
> +49 6103 707-0 • Sitz der Gesellschaft: Langen/Hessen • Zuständiges
> Registergericht: AG Offenbach am Main, HRB 34977 • Vorsitzende des
> Aufsichtsrats: Antje Geese • Geschäftsführer: Arndt Schoenemann (Vors.),
> Dr. Kerstin Böcker, Dirk Mahns, Friedrich-Wilhelm Menge • www.dfs.de
> <http://www.dfs.de>
>
> Sollten Sie nicht der richtige Empfänger dieser E-Mail sein, löschen Sie
> diese bitte.
>

DFS Deutsche Flugsicherung GmbH • Am DFS-Campus • 63225 Langen • Tel.: +49 6103 
707-0 • Sitz der Gesellschaft: Langen/Hessen • Zuständiges Registergericht: AG 
Offenbach am Main, HRB 34977 • Vorsitzende des Aufsichtsrats: Antje Geese • 
Geschäftsführer: Arndt Schoenemann (Vors.), Dr. Kerstin Böcker, Dirk Mahns, 
Friedrich-Wilhelm Menge • www.dfs.de<http://www.dfs.de>

Sollten Sie nicht der richtige Empfänger dieser E-Mail sein, löschen Sie diese 
bitte.
<?xml version="1.0" encoding="UTF-8"?>
<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/xsd/maven-4.0.0.xsd";>

    <modelVersion>4.0.0</modelVersion>

    <groupId>com.example</groupId>
    <artifactId>karaf</artifactId>
    <version>1.0.0-SNAPSHOT</version>
    <packaging>karaf-assembly</packaging>
    <name>com.example.karaf</name>
    <description>Custom Karaf 4.2.15</description>

    <properties>

        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>

        <maven.compiler.source>11</maven.compiler.source>
        <maven.compiler.target>11</maven.compiler.target>

        <revision>1.0.0</revision>
        <changelist>-SNAPSHOT</changelist>

        <pushChanges>false</pushChanges>
        <skipTests>false</skipTests>

        <karaf.version>4.2.15</karaf.version>
        <activemq.version>5.16.2</activemq.version>
        <camel.version>3.7.7</camel.version>
        <hawtio.version>2.14.4</hawtio.version>
        <groovy.version>3.0.7</groovy.version>
        <jasypt.version>1.9.3_1</jasypt.version>
        <jackson.version>1.9.13</jackson.version>

        <!-- Update JUnit if appropriate -->
        <junit.version>4.13.2</junit.version>

        <!-- Logging begin -->
        <slf4j.version>1.7.32</slf4j.version>
        <log4j2.version>2.17.1</log4j2.version>
        <!-- Logging end -->

        <osgi.version>6.0.0</osgi.version>
        <osgi.compendium.version>5.0.0</osgi.compendium.version>

        <!-- Same netty version as Camel 3.7.x is using here -->
        <netty.version>4.1.65.Final</netty.version>

        <!-- Apache CXF Service Framework begin -->
        <cxf.version>3.4.4</cxf.version>
        <!-- Apache CXF Service Framework end -->

        <mariadb-jdbc.version>2.7.3</mariadb-jdbc.version>

        <!-- Apache Geronimo libs and specs -->
        <geronimo-connector-spec.version>1.0</geronimo-connector-spec.version>
        <geronimo-osgi-registry.version>1.1</geronimo-osgi-registry.version>
        <geronimo-jms_1.1_spec.version>1.1.1</geronimo-jms_1.1_spec.version>
        <geronimo-jta.version>1.1.1</geronimo-jta.version>

        <!-- Apache Commons -->
        <commons-beanutils.version>1.9.4</commons-beanutils.version>
        <commons-configuration.version>1.10</commons-configuration.version>
        <commons-lang.version>2.6</commons-lang.version>
        <commons-collections.version>3.2.2</commons-collections.version>

        <!-- Plugin Versions begin -->
        <maven-bundle-plugin.version>5.1.3</maven-bundle-plugin.version>
        <maven-install-plugin.version>2.5.2</maven-install-plugin.version>
        <maven-deploy-plugin.version>2.8.2</maven-deploy-plugin.version>
        <maven-compiler-plugin.version>2.5.1</maven-compiler-plugin.version>
        <maven-surefire-plugin.version>3.0.0-M5</maven-surefire-plugin.version>
        <maven-dependency-plugin.version>3.1.2</maven-dependency-plugin.version>
        <maven-assembly-plugin.version>2.2.1</maven-assembly-plugin.version>
        <maven-resources-plugin.version>3.2.0</maven-resources-plugin.version>
        <maven-javadoc-plugin.version>2.10.1</maven-javadoc-plugin.version>
        <maven-source-plugin.version>2.4</maven-source-plugin.version>
        <maven-jar-plugin.version>3.2.0</maven-jar-plugin.version>
        <flatten-maven-plugin.version>1.1.0</flatten-maven-plugin.version>
        <build-helper-maven-plugin.version>1.8</build-helper-maven-plugin.version>
        <!-- Plugin Versions end -->
    </properties>

    <dependencies>
        <!-- Apache Karaf Dependencies begin -->
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <version>${karaf.version}</version>
            <type>kar</type>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>framework</artifactId>
            <version>${karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>standard</artifactId>
            <version>${karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
        </dependency>
        <dependency>
            <groupId>org.apache.karaf.features</groupId>
            <artifactId>enterprise</artifactId>
            <version>${karaf.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

        <!-- Apache Camel 3.7.x LTS -->
        <dependency>
            <groupId>org.apache.camel.karaf</groupId>
            <artifactId>apache-camel</artifactId>
            <version>${camel.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

        <!-- Apache ActiveMQ Classic 5.16.x -->
        <dependency>
            <groupId>org.apache.activemq</groupId>
            <artifactId>activemq-karaf</artifactId>
            <version>${activemq.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

        <!-- Apache HAWTIO -->
        <dependency>
            <groupId>io.hawt</groupId>
            <artifactId>hawtio-karaf</artifactId>
            <version>${hawtio.version}</version>
            <classifier>features</classifier>
            <type>xml</type>
            <scope>runtime</scope>
        </dependency>

        <dependency>
            <groupId>commons-beanutils</groupId>
            <artifactId>commons-beanutils</artifactId>
            <version>1.9.3</version>
        </dependency>

    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>false</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
            <resource>
                <directory>src/main/filtered-resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>**/*</include>
                </includes>
            </resource>
        </resources>

        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-compiler-plugin</artifactId>
                <version>3.8.1</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                    <source>11</source>
                    <target>11</target>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>${maven-resources-plugin.version}</version>
                <executions>
                    <execution>
                        <id>process-resources</id>
                        <goals>
                            <goal>resources</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <!-- Resource plugin end -->

            <!-- Karaf Plugin begin -->
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <version>${karaf.version}</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <phase>package</phase>
                    </execution>
                </executions>
                <configuration>
                    <enableGeneration>true</enableGeneration>
                    <finalName>${project.artifactId}</finalName>
                    <archiveZip>false</archiveZip>
                    <archiveTarGz>true</archiveTarGz>
                    <javase>11</javase>
                    <bootBundles>
                        <!-- This creates a feature xml file which will fail !!! -->
                        <!--<bootBundle>mvn:commons-beanutils/commons-beanutils/1.9.3</bootBundle>-->
                        <!-- This creates a feature xml file which will fail !!! -->
                        <bundle>mvn:commons-beanutils/commons-beanutils/1.9.3</bundle>
                    </bootBundles>
                    <installedFeatures>
                        <feature>wrapper</feature>
                    </installedFeatures>
                    <installedBundles>
                        <installedBundle>mvn:commons-beanutils/commons-beanutils/${commons-beanutils.version}</installedBundle>
                        <installedBundle>mvn:commons-configuration/commons-configuration/${commons-configuration.version}</installedBundle>
                        <installedBundle>mvn:commons-lang/commons-lang/${commons-lang.version}</installedBundle>
                        <installedBundle>mvn:org.codehaus.jackson/jackson-core-asl/${jackson.version}</installedBundle>
                        <installedBundle>mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson.version}</installedBundle>
                        <installedBundle>mvn:org.slf4j/slf4j-api/${slf4j.version}</installedBundle>
                        <installedBundle>mvn:org.slf4j/log4j-over-slf4j/${slf4j.version}</installedBundle>
                    </installedBundles>
                    <startupFeatures>
                        <feature>eventadmin</feature>
                        <feature>aries-blueprint</feature>
                        <feature>pax-url-aether</feature>
                        <feature>wrap</feature>
                    </startupFeatures>
                    <bootFeatures>
                        <feature>activemq-broker-noweb</feature>
                        <feature>bundle</feature>
                        <!-- Camel & Components begin -->
                        <feature>camel-activemq</feature>
                        <!-- Either use camel amqp OR camel activemq but NOT both !!! -->
                        <!--<feature>camel-amqp</feature>-->
                        <feature>camel-avro</feature>
                        <feature>camel-bindy</feature>
                        <feature>camel-blueprint</feature>
                        <feature>camel-core</feature>
                        <feature>camel-gson</feature>
                        <feature>camel-http</feature>
                        <feature>camel-jackson</feature>
                        <feature>camel-jaxb</feature>
                        <!-- camel-jetty issues with hawtio/cxf installed jetty version -->
                        <!--<feature>camel-jetty</feature>-->
                        <feature>camel-jms</feature>
                        <feature>camel-jpa</feature>
                        <feature>camel-mail</feature>
                        <feature>camel-netty</feature>
                        <feature>camel-quartz</feature>
                        <feature>camel-spring</feature>
                        <feature>camel-stream</feature>
                        <feature>camel-zipfile</feature>
                        <!-- Camel & Components end -->
                        <feature>config</feature>
                        <!-- cxf feature breaks Hawtio because of conflicting jetty port 8181 -->
                        <!--<feature>cxf</feature>-->
                        <feature>diagnostic</feature>
                        <feature>feature</feature>
                        <feature>hawtio</feature>
                        <feature>jaas</feature>
                        <feature>jasypt-encryption</feature>
                        <feature>jndi</feature>
                        <feature>kar</feature>
                        <feature>log</feature>
                        <feature>management</feature>
                        <feature>openjpa</feature>
                        <feature>package</feature>
                        <feature>shell</feature>
                        <feature>ssh</feature>
                        <feature>service</feature>
                        <feature>spring</feature>
                        <feature>system</feature>
                        <feature>deployer</feature>
                    </bootFeatures>
                    <libraries>
                        <!-- non osgi bundles need wrap:mvn -->
                        <library>mvn:org.osgi/org.osgi.core/${osgi.version}</library>
                        <library>mvn:org.osgi/org.osgi.compendium/${osgi.compendium.version}</library>
                        <library>mvn:org.codehaus.jackson/jackson-core-asl/${jackson.version}</library>
                        <library>mvn:org.codehaus.jackson/jackson-mapper-asl/${jackson.version}</library>
                        <library>mvn:commons-beanutils/commons-beanutils/${commons-beanutils.version}</library>
                        <library>mvn:commons-configuration/commons-configuration/${commons-configuration.version}</library>
                        <library>mvn:commons-lang/commons-lang/${commons-lang.version}</library>
                        <library>mvn:org.apache.logging.log4j/log4j-api/${log4j2.version}</library>
                        <library>mvn:org.slf4j/slf4j-api/${slf4j.version}</library>
                        <library>mvn:org.slf4j/log4j-over-slf4j/${slf4j.version}</library>
                        <library>mvn:org.slf4j/slf4j-log4j12/${slf4j.version}</library>
                        <library>mvn:org.slf4j/slf4j-simple/${slf4j.version}</library>
                    </libraries>
                    </configuration>
                </plugin>
                <!-- Karaf Plugin end -->
        </plugins>
    </build>

</project>

Reply via email to