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

Wei Lin commented on MNG-6896:
------------------------------

Oh I see. So the reason is that I was executing a standalone goal rather than a 
phase, so the dependency has to be managed manually. Is that correct?

> Failsafe cannot resolve local dependency in a multi-module build
> ----------------------------------------------------------------
>
>                 Key: MNG-6896
>                 URL: https://issues.apache.org/jira/browse/MNG-6896
>             Project: Maven
>          Issue Type: Bug
>          Components: Bootstrap & Build
>    Affects Versions: 3.6.3
>         Environment: macOS 10.13.6
> OpenJDK Runtime Environment AdoptOpenJDK (build 11.0.5+10)
>            Reporter: Wei Lin
>            Priority: Major
>
> In a multimodule build, if a module depends on another module, failsafe 
> reports error "Could not resolve dependencies"
> I have created [a self-extracting python 
> [script|https://gist.github.com/wlnirvana/cdabc9495eb7dd0e03fc19e75146192c], 
> with a sample project encoded in the script to reproduce the issue. After 
> downloading the script (sss.py), the project can be populated as follows:
> {{$ python3 sss.py}}
>  {{Extract project to 
> /var/folders/c9/42x7_bq13kx5ms99j0w7_k3h0000gn/T/tmpbia95v4y ? ([Y/n]):}}
>  {{Project extracted successfully!}}
> Then one should be able to reproduce the issue as follows:
> {{$ cd /var/folders/c9/42x7_bq13kx5ms99j0w7_k3h0000gn/T/tmpbia95v4y}}
> {{$ rm -rf ~/.m2/repository/org/test/dependency}}
> {{$ mvn failsafe:integration-test}}
>  {{[INFO] Scanning for projects...}}
>  {{...}}
>  {{[ERROR] Failed to execute goal on project app: Could not resolve 
> dependencies for project org.test:app:jar:1.0-SNAPSHOT: Could not find 
> artifact org.test:dependency:jar:1.0-SNAPSHOT -> [Help 1]}}
>  {{...}}
> To work around the error, the dependency has to be installed to the local 
> repo, as shown below:
> {{$ mvn --pl dependency install}}
> {{$ mvn failsafe:integration-test}}



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to