-
1. Re: How to only resolve versions numbers and/or poms without downloading artifact Jars?
kpiwko Aug 11, 2014 8:04 AM (in response to binodpanta)1 of 1 people found this helpfulHi Binod,
this is not possible at this moment. However, it should not be that difficult to implement this - we just need to split collectAndResolve into two phases and implement API to access http://download.eclipse.org/aether/aether-core/0.9.0.M2/apidocs/org/eclipse/aether/RepositorySystem.html#collectDependen…. Can you please file a Feature Request at https://issues.jboss.org/browse/SHRINKRES ?
Thanks,
Karel -
2. Re: How to only resolve versions numbers and/or poms without downloading artifact Jars?
binodpanta Aug 11, 2014 12:01 PM (in response to kpiwko)Thanks Karel for addressing this, I will file a help request. In the meantime, how easy might it be for me to get around this and maybe use Aether api directly, do you recommend that?
I was hoping there was a way to maybe use the resolution filters mechanism to only resolve poms, I am familiar with writing custom MavenStrategy and filters by now, so if there is such a way I can try that out
-
3. Re: How to only resolve versions numbers and/or poms without downloading artifact Jars?
binodpanta Aug 11, 2014 2:51 PM (in response to kpiwko)Also, I thought I would 'game the system' and try replacing all requests to use the 'pom' packaging type during resolution thinking it would give me just the poms, and it almost did except there is a line of code specifically blocking pom artifacts types fro getting into the output! right before this line runs, I do see that my pom artifacts are being found (which makes sense since the dependency plugni also allows me to only grab poms by adding 'type' pom to my dependency tags.
// apply post filtering
return PostResolutionFilterApplicator.postFilter(resolvedArtifacts);
in my case it is almost as if I need the exact opposite filter, which only accepts poms or a way to override that filter, that I can inject from outside
// maybe something like this
return PostResolutionFilterApplicator.postFilter(resolvedArtifacts, customPOMOnlyFilter);
Wooh, got close...
-
4. Re: How to only resolve versions numbers and/or poms without downloading artifact Jars?
kpiwko Aug 29, 2014 4:06 AM (in response to binodpanta)POMs are indeed removed from resulting set of resolved artifacts - due to fact the will interfere with resulting set, we are just using their dependencies. However, we should be able to use the same model and split collection (metadata only) and resolution (artifacts).
Could be like:
Maven.configureResolver().resolveOnlyMetadata().loadPomFromFile("pom.xml").importRuntimeDependencies() .resolve().withTransitivity().as(MavenResolvedArtifact.class);
-
5. Re: How to only resolve versions numbers and/or poms without downloading artifact Jars?
binodpanta Sep 26, 2014 4:53 PM (in response to kpiwko)Thanks, I see that the issue says lined up for release 2.2.1-cr1
Is there anyway I can preview the fix? I am having a real need for this fix in my system, where things are taking very long times. When is the release for cr-1 expected? If it is going to take some more time, can I get instructions on how to get the latest build to start my prequals ?
Thanks
-
6. Re: How to only resolve versions numbers and/or poms without downloading artifact Jars?
kpiwko Oct 6, 2014 9:56 AM (in response to binodpanta)I don't want to promise anything but end of October could be reasonable target.
-
7. Re: How to only resolve versions numbers and/or poms without downloading artifact Jars?
sschuberth Apr 10, 2017 9:34 AM (in response to kpiwko)Is there any update on the availability of this feature?