[ https://issues.apache.org/jira/browse/KARAF-4684?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Grzegorz Grzybek reassigned KARAF-4684: --------------------------------------- Assignee: Grzegorz Grzybek > karaf-maven-plugin assembly goal fails to find nested features with explicit > version containing qualifier > --------------------------------------------------------------------------------------------------------- > > Key: KARAF-4684 > URL: https://issues.apache.org/jira/browse/KARAF-4684 > Project: Karaf > Issue Type: Bug > Components: karaf-profile > Affects Versions: 4.0.5, 4.0.6 > Reporter: Declan Cox > Assignee: Grzegorz Grzybek > Priority: Minor > > In karaf 4.0.5 and 4.0.6 (at least) there is an issue with nested features > which explicitly declare a version when that version has a qualifier e.g., > such as development snapshot version like 1.0-SNAPSHOT or a release qualifier > like for example 1.0.0-RELEASE. > > For example, take our features descriptor for a simple project: > {noformat} > <feature name="api" version="${project.version}"> > <bundle>mvn:org.deklanowski.karaf/api/${project.version}</bundle> > </feature> > <feature name="impl" version="${project.version}"> > <feature version="${project.version}">api</feature> > <!--feature>api</feature--> > <bundle>mvn:org.deklanowski.karaf/impl/${project.version}</bundle> > </feature> > {noformat} > If we explicitly include the version of the nested api feature inside the > impl feature then > you will get the following output when building the assembly: > {noformat} > [INFO] Reactor Summary: > [INFO] > [INFO] sample feature ..................................... SUCCESS [ 0.116 > s] > [INFO] sample karaf feature repository .................... SUCCESS [ 0.763 > s] > [INFO] sample karaf assembly configuration ................ FAILURE [ 2.727 > s] > [INFO] sample feature api ................................. SKIPPED > [INFO] sample feature impl ................................ SKIPPED > [INFO] sample assembly reactor ............................ SKIPPED > [INFO] > ------------------------------------------------------------------------ > [INFO] BUILD FAILURE > [INFO] > ------------------------------------------------------------------------ > [INFO] Total time: 5.178 s > [INFO] Finished at: 2016-08-30T10:52:02+01:00 > [INFO] Final Memory: 23M/399M > [INFO] > ------------------------------------------------------------------------ > [ERROR] Failed to execute goal > org.apache.karaf.tooling:karaf-maven-plugin:4.0.6:assembly (default-assembly) > on project assembly: Unable to build assembly: Could not find matching > feature for api/1.0-SNAPSHOT -> {noformat} > Excluding the version number solves the issue. As stated this is not limited > to snapshot qualifiers, any qualifier of the form > {noformat}'-<qualifier>'{noformat} seems to do it. > Debugging the assembly yields the problem emanating from the recursive > addFeatures method in the karaf assembly building subsystem > [Builder.java|https://github.com/apache/karaf/blob/karaf-4.0.6/profile/src/main/java/org/apache/karaf/profile/assembly/Builder.java]. > > Please see my sample project and debug screenshots in > [sample-karaf-assembly|https://github.com/deklanowski/sample-karaf-assembly] -- This message was sent by Atlassian JIRA (v6.4.14#64029)