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

Slawomir Jaranowski commented on MDEP-764:
------------------------------------------

It is not a problem in m-dependency-p, the same effect will be for other 
plugins, phase

{{analyze-dep-mgt}} require project to have resolved dependencies...

> dependency:analyze-dep-mgt fails for multi module projects
> ----------------------------------------------------------
>
>                 Key: MDEP-764
>                 URL: https://issues.apache.org/jira/browse/MDEP-764
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: analyze-dep-mgt
>    Affects Versions: 3.2.0
>            Reporter: Jon Edvardsson
>            Priority: Major
>             Fix For: wontfix-candidate
>
>
> dependency:dependency:analyze-dep-mgt fails for multi module projects (that 
> have yet not been installed?). The goal fail with the same error as MDEP-409.
> {code:sh}
> ➜  my-app git:(master) ✗ mvn dependency:analyze-dep-mgt
> [INFO] Scanning for projects...
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Detecting the operating system and CPU architecture
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] os.detected.name: osx
> [INFO] os.detected.arch: aarch_64
> [INFO] os.detected.version: 11.5
> [INFO] os.detected.version.major: 11
> [INFO] os.detected.version.minor: 5
> [INFO] os.detected.classifier: osx-aarch_64
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Reactor Build Order:
> [INFO]
> [INFO] my-app                                                       [pom]
> [INFO] my-app-api                                                   [jar]
> [INFO] my-app-impl                                                [jar]
> [INFO]
> [INFO] ----------------< com.example:my-app >-----------------
> [INFO] Building my-app 1.0-SNAPSHOT                                 [1/3]
> [INFO] --------------------------------[ pom 
> ]---------------------------------
> [INFO]
> [INFO] --- maven-dependency-plugin:3.2.0:analyze-dep-mgt (default-cli) @ 
> my-app ---
> [INFO] Found Resolved Dependency/DependencyManagement mismatches:
> [INFO]  Ignoring Direct Dependencies.
> [INFO]  None
> [INFO]
> [INFO] --------------< com.example:my-app-api >---------------
> [INFO] Building my-app-api 1.0-SNAPSHOT                             [2/3]
> [INFO] --------------------------------[ jar 
> ]---------------------------------
> [INFO]
> [INFO] --- maven-dependency-plugin:3.2.0:analyze-dep-mgt (default-cli) @ 
> my-app-api ---
> [INFO] Found Resolved Dependency/DependencyManagement mismatches:
> [INFO]  Ignoring Direct Dependencies.
> [INFO] com.google.code.findbugs:jsr305:jar was excluded in DepMgt, but 
> version 3.0.2 has been found in the dependency tree.
> [INFO] javax.annotation:javax.annotation-api:jar was excluded in DepMgt, but 
> version 1.3.2 has been found in the dependency tree.
> [INFO] com.google.protobuf:protobuf-java:jar was excluded in DepMgt, but 
> version 3.17.3 has been found in the dependency tree.
> [WARNING] Potential problems found in Dependency Management
> [INFO]
> [INFO] -------------< com.example:my-app-impl >-------------
> [INFO] Building my-app-impl 1.0-SNAPSHOT                          [3/3]
> [INFO] --------------------------------[ jar 
> ]---------------------------------
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Reactor Summary for my-app 1.0-SNAPSHOT:
> [INFO]
> [INFO] my-app ....................................... SUCCESS [  0.332 s]
> [INFO] my-app-api ................................... SUCCESS [  0.090 s]
> [INFO] my-app-impl ................................ FAILURE [  0.166 s]
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] 
> ------------------------------------------------------------------------
> [INFO] Total time:  0.871 s
> [INFO] Finished at: 2021-09-08T10:57:57+02:00
> [INFO] 
> ------------------------------------------------------------------------
> [ERROR] Failed to execute goal on project my-app-impl: Could not resolve 
> dependencies for project com.example:my-app-impl:jar:1.0-SNAPSHOT: Could not 
> find artifact com.example:my-app-api:jar:1.0-SNAPSHOT -> [Help 1]
> [ERROR]
> [ERROR] To see the full stack trace of the errors, re-run Maven with the -e 
> switch.
> [ERROR] Re-run Maven using the -X switch to enable full debug logging.
> [ERROR]
> [ERROR] For more information about the errors and possible solutions, please 
> read the following articles:
> [ERROR] [Help 1] 
> http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
> [ERROR]
> [ERROR] After correcting the problems, you can resume the build with the 
> command
> [ERROR]   mvn <args> -rf :my-app-impl
> ➜  my-app git:(master) ✗
> {code}



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

Reply via email to