You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@karaf.apache.org by infiniteuniverse <in...@gmail.com> on 2015/02/12 20:14:24 UTC

features-validate-descriptor fails in version 4.0.0.M1

There appears to be an issue running the validate plugin in karaf version
4.0.0.M1.  While attempting to validate a feature I'm getting the following
error:

[INFO]
------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO]
------------------------------------------------------------------------
[INFO] Total time: 37:25.221s
[INFO] Finished at: Thu Feb 12 10:15:24 CST 2015
[INFO] Final Memory: 25M/447M
[INFO]
------------------------------------------------------------------------
[ERROR] Failed to execute goal
org.apache.karaf.tooling:karaf-maven-plugin:4.0.0.M1:features-validate-descriptor
(validate) on project leo-karaf-dist: Unable to validate
/Users/e21897/Projects/leo/repo/source/leo/leo-karaf-dist/src/main/distribution/deploy/leo-features.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 
the default version "0.0.0" won't match the actual version "4.0.0.M1" but
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 specified version of "9.0.7.v20131107". As a side note, it looks
like you have to add
mvn:org.ops4j.pax.web/pax-web-features/4.0.0/xml/features as a configuration
repository for the features-validate-descriptor to work, since the karaf
standard feature has a dependency on pax-http, and additionally I had to add
the felix framework as a provided dependency because 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)





--
View this message in context: http://karaf.922171.n3.nabble.com/features-validate-descriptor-fails-in-version-4-0-0-M1-tp4038501.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: features-validate-descriptor fails in version 4.0.0.M1

Posted by infiniteuniverse <in...@gmail.com>.
Thanks, I created the following jira task:
https://issues.apache.org/jira/browse/KARAF-3525 -- I wasn't able to test if
the defect still exists since my attempts to build tag 4.0.0.M2 failed due
to my inability to resolve a pax snapshot dependency that exists in that tag
(org.ops4j.pax.cdi:pax-cdi-features:xml:features:0.12.0-SNAPSHOT) but
glancing at the code, it looks like it's doing the same thing, so I doubt
that it's been fixed in 4.0.0.M2



--
View this message in context: http://karaf.922171.n3.nabble.com/features-validate-descriptor-fails-in-version-4-0-0-M1-tp4038501p4038507.html
Sent from the Karaf - User mailing list archive at Nabble.com.

Re: features-validate-descriptor fails in version 4.0.0.M1

Posted by Achim Nierbeck <bc...@googlemail.com>.
Hi,

might be a bug, could you open a jira issue for this.
That makes it easier for us to track.
Did you also check if this is still an issue with 4.0.0.M2?
It's currently under vote so you can check with that version also.


regards, Achim

2015-02-12 20:14 GMT+01:00 infiniteuniverse <in...@gmail.com>:

> There appears to be an issue running the validate plugin in karaf version
> 4.0.0.M1.  While attempting to validate a feature I'm getting the following
> error:
>
> [INFO]
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO]
> ------------------------------------------------------------------------
> [INFO] Total time: 37:25.221s
> [INFO] Finished at: Thu Feb 12 10:15:24 CST 2015
> [INFO] Final Memory: 25M/447M
> [INFO]
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal
>
> org.apache.karaf.tooling:karaf-maven-plugin:4.0.0.M1:features-validate-descriptor
> (validate) on project leo-karaf-dist: Unable to validate
>
> /Users/e21897/Projects/leo/repo/source/leo/leo-karaf-dist/src/main/distribution/deploy/leo-features.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
> the default version "0.0.0" won't match the actual version "4.0.0.M1" but
> 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 specified version of "9.0.7.v20131107". As a side note, it looks
> like you have to add
> mvn:org.ops4j.pax.web/pax-web-features/4.0.0/xml/features as a
> configuration
> repository for the features-validate-descriptor to work, since the karaf
> standard feature has a dependency on pax-http, and additionally I had to
> add
> the felix framework as a provided dependency because 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)
>
>
>
>
>
> --
> View this message in context:
> http://karaf.922171.n3.nabble.com/features-validate-descriptor-fails-in-version-4-0-0-M1-tp4038501.html
> Sent from the Karaf - User mailing list archive at Nabble.com.
>



-- 

Apache Member
Apache Karaf <http://karaf.apache.org/> Committer & PMC
OPS4J Pax Web <http://wiki.ops4j.org/display/paxweb/Pax+Web/> Committer &
Project Lead
blog <http://notizblog.nierbeck.de/>
Co-Author of Apache Karaf Cookbook <http://bit.ly/1ps9rkS>

Software Architect / Project Manager / Scrum Master