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

Adrian Tarau commented on MNG-7539:
-----------------------------------

*Always* is configured on purpose to make sure it has the latest version.

Indeed, the slow resolution of artifacts does point to a problem in Nexus. 
Unfortunately, there is no apparent issue with OS (CPU, I/O), and the Java 
profiler did not highlight anything that stands out. My problem is not with 
Nexus, even when it's at its best, it still loses time doing all those 
roundtrips.

I know the recommendation is to use {*}interval:XX{*}, but downloading 
SNAPSHOTs once would be the most logical thing to do (and as a side effect, it 
will speed build everywhere the project is set to Always policy). It makes 
sense to see the same SNAPSHOT at time 00:05s in the build and at 01m:20s ... 
why would project A have modules built with different versions of a library (we 
presume a build happened in the middle)? It should present the same artifact 
version between all modules.

And a final yes, ideally, each project will be released independently. However, 
all these projects are independent, built on each other, and released as one 
(under another project) every 3-4 weeks. There are fixes/improvements across 
multiple projects, and we do not _stop_ and _release_ them individually. Thye 
is building on commit, running tests, etc., and when the time comes, we move to 
GA all at once and move to the next release cycle.

If Maven developers find the request wrong, I'll build an extension and share 
it with those who might have this particular need (and problem :)). Sometimes 
you might build things in a way that is _not by the book_ , but they are 
working for you :) 

 

 

> Validate/Download SNAPSHOT dependencies once
> --------------------------------------------
>
>                 Key: MNG-7539
>                 URL: https://issues.apache.org/jira/browse/MNG-7539
>             Project: Maven
>          Issue Type: Improvement
>          Components: Dependencies
>            Reporter: Adrian Tarau
>            Priority: Critical
>
> Building an unreleased multi-module project (30-40 modules) that depends on 
> various other unreleased modules puts significant pressure on the Maven 
> Repository (a local Nexus instance), and artifact resolution could slow down 
> the build 2x-3x.
> I do acknowledge that it is the job of the repository to cache and serve 
> those responses fast, and for some reason, sometimes it slows down without an 
> apparent reason.
> However, the whole build process will be faster if Maven validates a SNAPSHOT 
> once for multi-module (when the dependency is reached the first time) and 
> then use that version. Even if Maven Repository is relative fast, there is 
> still network traffic done. Outside the fact that it should not be done, it 
> might also introduce flaky behaviors:
>  * one module downloads a version of artifact A, works with it, and 
> everything is fine
>  * 10 minutes later, another module needs artifact A and gets a newer 
> version, which has some issues, and various (test) failures will be raised
> For consistency, on a multi-module build, all modules should _see_ the same 
> version of a SNAPSHOT artifact. It will be faster, and it will be consistent 
> (which is very important).
>  
>  



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

Reply via email to