[ 
https://issues.apache.org/jira/browse/MRESOLVER-224?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17606050#comment-17606050
 ] 

Tuomas Kiviaho commented on MRESOLVER-224:
------------------------------------------

Thanks for the clarification. 

My workaround was to switch from {{invoker:install}} to premature installing at 
{{pre-integration-test}} phase. If I recall correctly I stopped poking around 
when I saw that invoker did use shared metadata creation but had it's own 
rather crude implementation for it. Install plugin on the other hand didn't  
"corrupt" the local repo with such partial (this is the model 1.0.0 I presume) 
metadata and thus I was able to continue without too much of a fuzz.

I'd close the issue by knowing now that the limitation had left it's 
marks/scars to the codebase. 

PS. IMO {{invoker:install}} might be worth looking at with pair of eyes that 
know more about  the subtleties involved with metadata generation and resolving.

> DefaultVersionResolver is inflicting ArtifactNotFoundException for 
> classifiers with SNAPSHOT version
> ----------------------------------------------------------------------------------------------------
>
>                 Key: MRESOLVER-224
>                 URL: https://issues.apache.org/jira/browse/MRESOLVER-224
>             Project: Maven Resolver
>          Issue Type: Bug
>          Components: Resolver
>    Affects Versions: 1.6.3
>            Reporter: Tuomas Kiviaho
>            Priority: Major
>             Fix For: waiting-for-feedback
>
>
> I use classifier artifact along with the artifact itself as a dependency in a 
> Maven Invoker Plugin project. The project that calls the invoker has the 
> artifact itself as a dependency, but no reference to the classifier.
> This causes resolving of the maven-metadata.xml for the project itself plus 
> downloading of the dependency artifact.When invoker is called the artifact is 
> already downloaded to the local repo and cached with SNAPSHOT key.
> This causes the DefaultVersionResolver to merge the version information of 
> the SNAPSHOT<myclassifier>:jar artifact that is now being resolved with the 
> already downloaded SNAPSHOT key. Since the local version is newer than the 
> repo version the DefaultVersionResolver thinks SNAPSHOT<myclassifier>:jar to 
> be outdated thus overriding it with local repo.
> Since the SNAPSHOT<myclassifier>:jar doesn't exist in the local repo there 
> are no remote report left to try the DefaultArtifactResolver fails ultimately 
> to ArtifactNotFoundException since there was no download task.
> {code:java}
> [INFO] [DEBUG] Resolving artifact 
> <mygroupid>.<myartifactid>:jar:<myclassifier>:<mybaseversion>-SNAPSHOT from 
> []{code}
>  



--
This message was sent by Atlassian Jira
(v8.20.10#820010)

Reply via email to