karaf-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (KARAF-4571) karaf-maven-plugin should respect version ranges when generating features repos
Date Tue, 14 Jun 2016 19:12:27 GMT

    [ https://issues.apache.org/jira/browse/KARAF-4571?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15330191#comment-15330191
] 

ASF GitHub Bot commented on KARAF-4571:
---------------------------------------

GitHub user SourcePond opened a pull request:

    https://github.com/apache/karaf/pull/200

    KARAF-4571 Use version range in feature.xml if useVersionRange is true

    This pull-request implements KARAF-4571. It would be cool if somebody could review it.

You can merge this pull request into a Git repository by running:

    $ git pull https://github.com/SourcePond/karaf master

Alternatively you can review and apply these changes as the patch at:

    https://github.com/apache/karaf/pull/200.patch

To close this pull request, make a commit to your master/trunk branch
with (at least) the following in the commit message:

    This closes #200
    
----

----


> karaf-maven-plugin should respect version ranges when generating features repos
> -------------------------------------------------------------------------------
>
>                 Key: KARAF-4571
>                 URL: https://issues.apache.org/jira/browse/KARAF-4571
>             Project: Karaf
>          Issue Type: Improvement
>          Components: karaf-tooling
>    Affects Versions: 4.0.5
>            Reporter: Roland Hauser
>             Fix For: 4.1.0
>
>
> When for the dependencies of a feature project version ranges are used, then the produced
feature.xml 
> references the highest available version of a bundle. This is not always the desired
behavior. Instead of that, 
> it should be configurable if the latest base version of a dependency or the version range
itself should be written 
> to the feature file (when a dependency is declared with a version range). I would suggest
a new plugin configuration 
> property "useVersionRange". Suppose a dependency to commons-lang3:
> {code:title=pom.xml}
> <dependencies>
> 	<dependency>
> 		<groupId>org.apache.commons</groupId>
> 		<artifactId>commons-lang3</artifactId>
> 		<version>[3.0,3.4)</version>
> 	</dependency>
> </dependencies>
> <build>
>     <plugins>
>         <plugin>
>             <groupId>org.apache.karaf.tooling</groupId>
>             <artifactId>karaf-maven-plugin</artifactId>
>             <version>4.1.0-SNAPSHOT</version>
>             <extensions>true</extensions>
>         </plugin>
>     </plugins>
> </build>
> {code}
> If "useVersionRange" is set to "false" (default), then nothing changes, so the resulting
feature.xml would look like this:
> {code:title=feature.xml}
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="test-feature-use-base-version">
>     <feature name="test-feature-use-base-version" description="test-feature-use-base-version"
version="1.0.0.SNAPSHOT">
>         <bundle>mvn:org.apache.commons/commons-lang3/3.4</bundle>
>     </feature>
> </features>
> {code}
> If "useVersionRange" is set to "true", instead of the base version the declared version
range will be used in the bundle element:
> {code:title=pom.xml}
> <build>
>     <plugins>
>         <plugin>
>             <groupId>org.apache.karaf.tooling</groupId>
>             <artifactId>karaf-maven-plugin</artifactId>
>             <version>@pom.version@</version>
>             <extensions>true</extensions>
>             <configuration>
>             	<useVersionRange>true</useVersionRange>
>             </configuration>
>         </plugin>
>     </plugins>
> </build>
> {code}
> {code:title=feature.xml}
> <features xmlns="http://karaf.apache.org/xmlns/features/v1.4.0" name="test-feature-use-version-range">
>     <feature name="test-feature-use-version-range" description="test-feature-use-version-range"
version="1.0.0.SNAPSHOT">
>         <bundle>mvn:org.apache.commons/commons-lang3/[3.0,3.4)</bundle>
>     </feature>
> </features>
> {code}



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message