You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@maven.apache.org by "Kariem Hussein (Jira)" <ji...@apache.org> on 2024/11/06 13:42:00 UTC

[jira] [Comment Edited] (MDEP-900) dependency:resolve fails for multi-module project

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

Kariem Hussein edited comment on MDEP-900 at 11/6/24 1:41 PM:
--------------------------------------------------------------

Michael Osipov, 2024-06-07
{quote}For now, this is by design. See PR for reasons.{quote}

I do not see the reasons in the PR. Could you elaborate?

If I run {{dependency:resolve}} on a reactor with inter-module dependencies without prior compile/install, it will fail. Shouldn't reactor dependencies resolve without the repository?

Also, it seems that {{-DexcludeGroupIds}} which could be a workaround, does not work as documented: MDEP-568



was (Author: kariem):
Michael Osipov, 2024-06-07
{quote}For now, this is by design. See PR for reasons.{quote}

I do not see the reasons in the PR. Could you elaborate?

If I run {{dependency:resolve}} on a reactor with inter-module dependencies without prior compile/install, it will fail. Shouldn't reactor dependencies resolve without the repository? Otherwise, 

Also, it seems that {{-DexcludeGroupIds}} which could be a workaround, does not work as documented: MDEP-568


> dependency:resolve fails for multi-module project
> -------------------------------------------------
>
>                 Key: MDEP-900
>                 URL: https://issues.apache.org/jira/browse/MDEP-900
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: resolve
>    Affects Versions: 3.6.1
>            Reporter: Gerd Aschemann
>            Assignee: Slawomir Jaranowski
>            Priority: Critical
>
> When executing {{mvn dependency:resolve}} on a multi-module project it fails to retrieve artifacts for the modules themselves (which is not necessary as these can be installed by {{mvn install}} any time). 
> This can be seen on an [OSS multi-module project|https://github.com/WASdev/sample.daytrader7]:
> {code:java}
> mvn dependency:resolve
> [INFO] Scanning for projects...
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Build Order:
> [INFO]
> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - EJB Module        [jar]
> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - Web Module        [war]
> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample                     [pom]
> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - EAR               [ear]
> [INFO]
> [INFO] --------------< net.wasdev.wlp.sample:daytrader-ee7-ejb >---------------
> [INFO] Building WAS Liberty Sample - Java EE7 Benchmark Sample - EJB Module 1.0-SNAPSHOT [1/4]
> [INFO]   from daytrader-ee7-ejb/pom.xml
> [INFO] --------------------------------[ jar ]---------------------------------
> [INFO]
> [INFO] --- dependency:3.6.0:resolve (default-cli) @ daytrader-ee7-ejb ---
> [INFO]
> [INFO] The following files have been resolved:
> [INFO]    javax:javaee-api:jar:7.0:provided -- module javaee.api (auto)
> [INFO]    com.sun.mail:javax.mail:jar:1.5.0:provided -- module javax.mail (auto)
> [INFO]    javax.activation:activation:jar:1.1:provided -- module activation (auto)
> [INFO]    javax.annotation:javax.annotation-api:jar:1.3.2:provided -- module java.annotation [auto]
> [INFO]
> [INFO]
> [INFO] --------------< net.wasdev.wlp.sample:daytrader-ee7-web >---------------
> [INFO] Building WAS Liberty Sample - Java EE7 Benchmark Sample - Web Module 1.0-SNAPSHOT [2/4]
> [INFO]   from daytrader-ee7-web/pom.xml
> [INFO] --------------------------------[ war ]---------------------------------
> [INFO] ------------------------------------------------------------------------
> [INFO] Reactor Summary for WAS Liberty Sample - Java EE7 Benchmark Sample 1.0-SNAPSHOT:
> [INFO]
> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - EJB Module SUCCESS [  0.402 s]
> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - Web Module FAILURE [  0.012 s]
> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample ..... SKIPPED
> [INFO] WAS Liberty Sample - Java EE7 Benchmark Sample - EAR SKIPPED
> [INFO] ------------------------------------------------------------------------
> [INFO] BUILD FAILURE
> [INFO] ------------------------------------------------------------------------
> [INFO] Total time:  0.552 s
> [INFO] Finished at: 2023-11-14T12:37:02+01:00
> [INFO] ------------------------------------------------------------------------
> [ERROR] Failed to execute goal on project daytrader-ee7-web: Could not resolve dependencies for project net.wasdev.wlp.sample:daytrader-ee7-web:war:1.0-SNAPSHOT: The following artifacts could not be resolved: net.wasdev.wlp.sample:daytrader-ee7-ejb:jar:1.0-SNAPSHOT (absent): Could not find artifact net.wasdev.wlp.sample:daytrader-ee7-ejb:jar:1.0-SNAPSHOT -> [Help 1]{code}
> This is similar to the behaviour of MDEP-409, and MDEP-895



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