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

Harry Smith updated KARAF-3525:
-------------------------------
    Attachment: pom.xml

The defect can be reproduced using the attached pom file, which also contains 
the additional dependencies and repositories commented out which are mentioned 
in the later half of the defect description.

> features-validate-descriptor of karaf-maven-plugin doesn't resolve 
> dependencies properly
> ----------------------------------------------------------------------------------------
>
>                 Key: KARAF-3525
>                 URL: https://issues.apache.org/jira/browse/KARAF-3525
>             Project: Karaf
>          Issue Type: Bug
>          Components: karaf-tooling
>    Affects Versions: 4.0.0.M1
>            Reporter: Harry Smith
>         Attachments: pom.xml
>
>
> Attempting to validate a feature descriptor produces the following error:
> [[INFO] <<< karaf-maven-plugin:4.0.0.M1:features-validate-descriptor 
> (validate) < process-resources @ karaf-tooling-bug <<<
> [INFO]
> [INFO] --- karaf-maven-plugin:4.0.0.M1:features-validate-descriptor 
> (validate) @ karaf-tooling-bug ---
> [INFO] == Preparing for validation ==
> [INFO]  - getting list of system bundle exports
> [INFO]  - getting list of provided bundle exports
> [INFO]     scanning org.bug:karaf-tooling-bug:pom:1.0.0 for exports
> [INFO]  - populating repositories with Karaf core features descriptors
> [INFO]  - validation of 
> file:/Users/e21897/Projects/bugs/feature-validator-bug/target/feature/feature.xml
> [INFO] == Analyzing feature descriptor ==
> [INFO]  - read 
> /Users/e21897/Projects/bugs/feature-validator-bug/target/feature/feature.xml
> [INFO]  - adding repository from 
> mvn:org.apache.karaf.features/standard/4.0.0.M1/xml/features
> [INFO]  - validation of 
> mvn:org.apache.karaf.features/standard/4.0.0.M1/xml/features
> [INFO]     scanning feature framework-security for exports
> [INFO]     scanning feature service-security for exports
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time: 1.603 s
> [INFO] Finished at: 2015-02-12T15:28:30-06:00
> [INFO] Final Memory: 16M/310M
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal 
> org.apache.karaf.tooling:karaf-maven-plugin:4.0.0.M1:features-validate-descriptor
>  (validate) on project karaf-tooling-bug: Unable to validate 
> /Users/e21897/Projects/bugs/feature-validator-bug/target/feature/feature.xml: 
> Unable to find definition for feature aries-proxy (version 0.0.0) -> [Help 1]
> Based upon preliminary investigation, it appears that 
> ValidateDescriptorMojo:Features.get(String name, String version) doesn't find 
> a feature match during getDependencyFeatureExports because the code is 
> looking for an exact string version match, so if the version isn't specified 
> on the feature dependency the default version "0.0.0" won't match the actual 
> version "4.0.0.M1".  This also doesn't seem to work for version ranges 
> either, for example in pax-http the specified version range of [7.0,10.0) for 
> pax-jetty doesn't match the declared version of "9.0.7.v20131107" for 
> pax-jetty so that also fails to find the feature definition. 
> Additionally, it appears that 
> mvn:org.ops4j.pax.web/pax-web-features/4.0.0/xml/features must be added to 
> the repository list since it isn't present in the karaf core feature 
> descriptors added by default but is a dependency of the http feature of the 
> standard feature descriptor.  Also, a provided dependency must be added to 
> the felix framework as otherwise the plugin fails trying to validate the 
> standard aries-proxy feature with the following missing exports... 
> [WARNING] Failed to validate feature aries-proxy 
> [WARNING] No export found to match org.osgi.util.tracker;version="[1.4,2)" 
> (imported by mvn:org.apache.aries/org.apache.aries.util/1.1.0) 
> [WARNING] No export found to match org.osgi.util.tracker;version="[1.5,2)" 
> (imported by mvn:org.apache.aries.proxy/org.apache.aries.proxy.impl/1.0.3) 
> [WARNING] No export found to match org.osgi.framework;version="[1.5,2)" 
> (imported by mvn:org.apache.aries.proxy/org.apache.aries.proxy.impl/1.0.3) 
> [WARNING] No export found to match org.osgi.framework;version="[1.5,2)" 
> (imported by mvn:org.apache.aries.proxy/org.apache.aries.proxy.api/1.0.1) 
> [WARNING] No export found to match org.osgi.framework;version="[1.5,2)" 
> (imported by mvn:org.apache.aries/org.apache.aries.util/1.1.0) 



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

Reply via email to