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

Petar Tahchiev commented on MDEP-516:
-------------------------------------

Here's a demo project:

https://github.com/ptahchiev/MDEP-516

You can see that that when you run it with {{mvn dependency:go-offline}} 
initially in the build it says:
{code}
[INFO] Reactor Build Order:
[INFO] 
[INFO] demo-parent
[INFO] module-1
[INFO] module-2
{code}
but later it will fail with:
{code}
[ERROR] Failed to execute goal on project module-2: Could not resolve 
dependencies for project org.test:module-2:jar:0.0.1-SNAPSHOT: Could not find 
artifact org.test:module-1:jar:0.0.1-SNAPSHOT -> [Help 1]
{code}

It will work though, if you run it with {{mvn package dependency:go-offline}}.

> Go-offline does not find module dependencies in multi-module build.
> -------------------------------------------------------------------
>
>                 Key: MDEP-516
>                 URL: https://issues.apache.org/jira/browse/MDEP-516
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>            Reporter: Petar Tahchiev
>
> Hello,
> I've recently hit the exact same problem that these guys are having:
> http://stackoverflow.com/questions/14694139/how-to-resolve-dependencies-between-modules-within-multi-module-project
> and I thought it must be a very normal scenario so probably a lot of other 
> people are hitting.
> So basically I have a multi-module build where {{moduleA}} is built first and 
> them {{moduleB}} depends on {{moduleA}}. However when I do {{mvn 
> dependency:go-offline}} it comes to resolve the dependencies of {{moduleB}} 
> and it fails with {{Artifact not found: moduleA}}. 
> That seems to happen because only modules that have been packaged are put in 
> the reactor and so later modules will know about them. So to fix it I have to 
> do the following:
> {code}
> mvn package dependency:go-offline -U -Pquick,test -DskipTests -s 
> src/main/resources/settings.xml
> {code}
> which I really don't like, because it does an extra package that I don't 
> need, and then the whole build gets a lot slower.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to