You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@karaf.apache.org by "Alexander Domke (JIRA)" <ji...@apache.org> on 2019/05/24 11:22:00 UTC

[jira] [Updated] (KARAF-6294) Building of custom distribution will fail if a repository with range has been specified in feature.xml.

     [ https://issues.apache.org/jira/browse/KARAF-6294?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Alexander Domke updated KARAF-6294:
-----------------------------------
    Description: 
Hello Karaf-Team,

during the custom distribution build, there is an error when trying to install the aries-jax-rs-whiteboard feature. Here is an example of the custom distribution build:

 

{code:java}

<?xml version="1.0"?>
<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>

    <groupId>com.example.karaf/groupId>
    <artifactId>custom-distribution</artifactId>    
    <packaging>karaf-assembly</packaging>
    <name>Karaf Custom Distribution</name>

    <dependencies>
        ...
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <defaultGoal>install</defaultGoal>

        <plugins>
            <!-- karaf-maven-plugin creates custom distribution -->
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <version>4.2.5</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>karaf-assembly</id>
                        <goals>
                            <goal>assembly</goal>
                        </goals>
                        <phase>install</phase>
                    </execution>
                </executions>
                <configuration>
                    <includeBuildOutputDirectory>false</includeBuildOutputDirectory>
                    <installedFeatures>
                        <feature>wrapper</feature>
                    </installedFeatures>
                    <startupFeatures>
                        <feature>eventadmin</feature>
                    </startupFeatures>
                    <bootFeatures>
                         ...                        
                        <feature>aries-jax-rs-whiteboard</feature> <!-- Problem Feature-->
                    </bootFeatures>
                    <javase>1.8</javase>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
{code}


 

I looked at the following feature repository:

[http://central.maven.org/maven2/org/apache/aries/jax/rs/org.apache.aries.jax.rs.features/1.0.4/org.apache.aries.jax.rs.features-1.0.4.xml]

 

The reason the build fails is in the XML file, because there was a repository with a range specified:


{code:java}
<features name="aries-jax-rs-1.0.4" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">

    <repository>mvn:org.apache.karaf.features/standard/[4,5)/xml/features</repository> <!-- The range [4,5) not working in custom distribution build -->

    <feature version="1.0.4" name="aries-jax-rs-whiteboard">
        ...
    </feature>

    <feature version="1.0.0" name="aries-jax-rs-whiteboard-jackson">
        ...
    </feature>

</features>
{code}


 

If the repository is given a specific number then the custom distribution build works:

{code:java}

<repository>mvn:org.apache.karaf.features/standard/4.2.5/xml/features</repository>
{code}


 

Is the range generally supported in feature repositories?

many Greetings
Alex

 

 

  was:
Hello Karaf-Team,

during the custom distribution build, there is an error when trying to install the aries-jax-rs-whiteboard feature. Here is an example of the custom distribution build:

 

{{<?xml version="1.0"?>
<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>

    <groupId>com.example.karaf/groupId>
    <artifactId>custom-distribution</artifactId>    
    <packaging>karaf-assembly</packaging>
    <name>Karaf Custom Distribution</name>

    <dependencies>
        ...
    </dependencies>

    <build>
        <resources>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
            </resource>
        </resources>

        <defaultGoal>install</defaultGoal>

        <plugins>
            <!-- karaf-maven-plugin creates custom distribution -->
            <plugin>
                <groupId>org.apache.karaf.tooling</groupId>
                <artifactId>karaf-maven-plugin</artifactId>
                <version>4.2.5</version>
                <extensions>true</extensions>
                <executions>
                    <execution>
                        <id>karaf-assembly</id>
                        <goals>
                            <goal>assembly</goal>
                        </goals>
                        <phase>install</phase>
                    </execution>
                </executions>
                <configuration>
                    <includeBuildOutputDirectory>false</includeBuildOutputDirectory>
                    <installedFeatures>
                        <feature>wrapper</feature>
                    </installedFeatures>
                    <startupFeatures>
                        <feature>eventadmin</feature>
                    </startupFeatures>
                    <bootFeatures>
                         ...                        
                        <feature>aries-jax-rs-whiteboard</feature> <!-- Problem Feature-->
                    </bootFeatures>
                    <javase>1.8</javase>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>}}

 

I looked at the following feature repository:

[http://central.maven.org/maven2/org/apache/aries/jax/rs/org.apache.aries.jax.rs.features/1.0.4/org.apache.aries.jax.rs.features-1.0.4.xml]

 

The reason the build fails is in the XML file, because there was a repository with a range specified:

{{<features name="aries-jax-rs-1.0.4" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">

    <repository>mvn:org.apache.karaf.features/standard/[4,5)/xml/features</repository> <!-- The range [4,5) not working in custom distribution build -->

    <feature version="1.0.4" name="aries-jax-rs-whiteboard">
        ...
    </feature>

    <feature version="1.0.0" name="aries-jax-rs-whiteboard-jackson">
        ...
    </feature>

</features>}}

 

If the repository is given a specific number then the custom distribution build works:

{{<repository>mvn:org.apache.karaf.features/standard/4.2.5/xml/features</repository>}}

 

Is the range generally supported in feature repositories?

many Greetings
Alex

 

 


> Building of custom distribution will fail if a repository with range has been specified in feature.xml.
> -------------------------------------------------------------------------------------------------------
>
>                 Key: KARAF-6294
>                 URL: https://issues.apache.org/jira/browse/KARAF-6294
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf
>    Affects Versions: 4.2.5
>            Reporter: Alexander Domke
>            Priority: Minor
>
> Hello Karaf-Team,
> during the custom distribution build, there is an error when trying to install the aries-jax-rs-whiteboard feature. Here is an example of the custom distribution build:
>  
> {code:java}
> <?xml version="1.0"?>
> <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>
>     <groupId>com.example.karaf/groupId>
>     <artifactId>custom-distribution</artifactId>    
>     <packaging>karaf-assembly</packaging>
>     <name>Karaf Custom Distribution</name>
>     <dependencies>
>         ...
>     </dependencies>
>     <build>
>         <resources>
>             <resource>
>                 <directory>src/main/resources</directory>
>                 <filtering>true</filtering>
>             </resource>
>         </resources>
>         <defaultGoal>install</defaultGoal>
>         <plugins>
>             <!-- karaf-maven-plugin creates custom distribution -->
>             <plugin>
>                 <groupId>org.apache.karaf.tooling</groupId>
>                 <artifactId>karaf-maven-plugin</artifactId>
>                 <version>4.2.5</version>
>                 <extensions>true</extensions>
>                 <executions>
>                     <execution>
>                         <id>karaf-assembly</id>
>                         <goals>
>                             <goal>assembly</goal>
>                         </goals>
>                         <phase>install</phase>
>                     </execution>
>                 </executions>
>                 <configuration>
>                     <includeBuildOutputDirectory>false</includeBuildOutputDirectory>
>                     <installedFeatures>
>                         <feature>wrapper</feature>
>                     </installedFeatures>
>                     <startupFeatures>
>                         <feature>eventadmin</feature>
>                     </startupFeatures>
>                     <bootFeatures>
>                          ...                        
>                         <feature>aries-jax-rs-whiteboard</feature> <!-- Problem Feature-->
>                     </bootFeatures>
>                     <javase>1.8</javase>
>                 </configuration>
>             </plugin>
>         </plugins>
>     </build>
> </project>
> {code}
>  
> I looked at the following feature repository:
> [http://central.maven.org/maven2/org/apache/aries/jax/rs/org.apache.aries.jax.rs.features/1.0.4/org.apache.aries.jax.rs.features-1.0.4.xml]
>  
> The reason the build fails is in the XML file, because there was a repository with a range specified:
> {code:java}
> <features name="aries-jax-rs-1.0.4" xmlns="http://karaf.apache.org/xmlns/features/v1.3.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://karaf.apache.org/xmlns/features/v1.3.0 http://karaf.apache.org/xmlns/features/v1.3.0">
>     <repository>mvn:org.apache.karaf.features/standard/[4,5)/xml/features</repository> <!-- The range [4,5) not working in custom distribution build -->
>     <feature version="1.0.4" name="aries-jax-rs-whiteboard">
>         ...
>     </feature>
>     <feature version="1.0.0" name="aries-jax-rs-whiteboard-jackson">
>         ...
>     </feature>
> </features>
> {code}
>  
> If the repository is given a specific number then the custom distribution build works:
> {code:java}
> <repository>mvn:org.apache.karaf.features/standard/4.2.5/xml/features</repository>
> {code}
>  
> Is the range generally supported in feature repositories?
> many Greetings
> Alex
>  
>  



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)