-
1. Re: [MavenResolver] Is there a way to fetch versions from the parent POM?
kpiwko Oct 31, 2014 5:16 AM (in response to bmajsak)Hi Bartosz,
it should definitely go up the chain. If you see it in mvn help:effective-pom, Resolver should see it as well. You can also try to debug what resolver actually see by grabbing MavenWorkingSession here:
https://github.com/shrinkwrap/resolver#debugging-and-logging
It should work with 2.1.1, there were some fixes w.r.t. classifiers and types in 2.2.0 stream. If that does not work with 2.2.0-beta-1, it's most likely a bug.
Karel
-
2. Re: [MavenResolver] Is there a way to fetch versions from the parent POM?
bmajsak Oct 31, 2014 5:45 AM (in response to kpiwko)Hi Karel,
Sadly, it does not work for me with both 2.1.1 and 2.2.0-beta-1.
I'm getting :
org.jboss.shrinkwrap.resolver.api.ResolutionException: Unable to get version for dependency specified by org.assert:assertj-core:compile, it was not provided in neither <dependencyManagement> nor <dependencies> sections.
And in the effective pom I see:
<dependency>
<groupId>org.assertj</groupId>
<artifactId>assertj-core</artifactId>
<version>1.7.0</version>
<scope>test</scope>
</dependency>
I thought that would be implicit. Should I specify scope too?
-
3. Re: [MavenResolver] Is there a way to fetch versions from the parent POM?
bmajsak Oct 31, 2014 6:38 AM (in response to bmajsak)I will try to isolate this problem and share it through GitHub.
-
4. Re: [MavenResolver] Is there a way to fetch versions from the parent POM?
kpiwko Oct 31, 2014 11:09 AM (in response to bmajsak)Is that assertj-core directly in <dependency> or <dependencyManagement> of parent? Or is it transitive dependency? The closest test case in integration test for the former is here - which seems pretty much like your test case:
Karel