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

Maarten Mulders commented on MDEP-204:
--------------------------------------

I've shortly discussed this with [~rfscholte] and we've analysed the situation. 
It seems to us that we cannot use the default Maven dependency resolution 
mechanism here, as it doesn't allow to exclude certain artifacts (for example, 
those we _know_ are in the Reactor).

I would propose to rewrite this Mojo so it roughly does the following:
* analyse the dependencies for the current module
* see if any of those are in the Reactor already
* attempt to resolve all dependencies that are _not_ in the reactor.

Regarding the latter, I think we could do it by following the logic in 
{{MojoExecutor}}'s {{ensureDependenciesAreResolved}} method, except when we 
invoke the {{LifeCycleDependencyResolver}} we supply the artifacts that are 
already in the Reactor.

> go-offline fails to resolve artifact available in maven reactor
> ---------------------------------------------------------------
>
>                 Key: MDEP-204
>                 URL: https://issues.apache.org/jira/browse/MDEP-204
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: go-offline
>    Affects Versions: 2.0, 2.1
>         Environment: maven 2.1.0
>            Reporter: Stevo Slavic
>            Priority: Major
>         Attachments: mvn-dependency-go-offline-failing-example.zip
>
>
> Attached is example project, for which IMO dependency:go-offline should be 
> able to resolve all dependencies as they are only intermodule dependencies 
> within same multimodule project which haven't been installed yet but are 
> available in maven reactor so can be considered as resolvable in offline mode 
> - instead dependency:go-offline fails to resolve these dependencies.



--
This message was sent by Atlassian Jira
(v8.3.2#803003)

Reply via email to