maven-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Petar Tahchiev (JIRA)" <>
Subject [jira] [Commented] (MDEP-516) Go-offline does not find module dependencies in multi-module build.
Date Fri, 06 May 2016 08:28:13 GMT


Petar Tahchiev commented on MDEP-516:

Hi Herve,

I might be missing the point but I don't think dependency collection would fix the issues.
Most CIs (including CircleCI) operates in the following manner: 

1) Restore your local repo from cache (if any)
2) Run your dependency resolution phase (which I specify to be {{mvn dependency:go-offline}})
3) Save your local repository somewhere in cache
4) Execute your build

If we do dependency collection instead of dependency resolution, then no artifacts will be
downloaded and the local repository of the CI will be always empty, so the build will be always
slow (as it has to download every time dependencies).

> Go-offline does not find module dependencies in multi-module build.
> -------------------------------------------------------------------
>                 Key: MDEP-516
>                 URL:
>             Project: Maven Dependency Plugin
>          Issue Type: Bug
>          Components: go-offline
>    Affects Versions: 2.10
>            Reporter: Petar Tahchiev
> Hello,
> I've recently hit the exact same problem that these guys are having:
> and I thought it must be a very normal scenario so probably a lot of other people are
> 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.
> of course, {{mvn install}} at any time fixes the issue also, but I don't want to install

This message was sent by Atlassian JIRA

View raw message