Allow custom updatePolicy

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Allow custom updatePolicy

Jonathan Haber
I just wanted to get thoughts on a possible new feature. Right now, my
company has thousands of Maven modules that are all on snapshots with an
updatePolicy of "always" (basically everyone gets the latest build of
everything, kind of like a poor man's monorepo). This mostly works fine,
but one of the big issues we've run into is that this is pretty slow for
local development. For each snapshot, it needs to download the
maven-metadata.xml and its checksum to know whether something has changed.
And when developing locally, the latency to our Nexus server isn't great
(even worse for our developers in the EU) so this process is pretty slow.

To mitigate this, each of our developers run a local proxy that sits in
front of Nexus. The proxy talks to our build system to know what artifacts
have built so that it can short-circuit the metadata requests if it knows
nothing has changed. This works pretty well, but we've never been able to
get it to work perfectly. The idea I had that would simplify this setup
significantly is if aether/maven-resolver allowed a custom updatePolicy
that can be implemented by extensions. This would allow us to simply write
an extension with our custom logic and ditch the local proxy and all the
edge cases and complexity that it brings.

Let me know if this sounds reasonable or if you have any other thoughts.

Thanks,
Jonathan
Reply | Threaded
Open this post in threaded view
|

Re: Allow custom updatePolicy

Jonathan Haber
If we did that, then wouldn't the build get really slow every time you hit
that 5 minute expiration?

On Wed, Oct 11, 2017 at 11:49 AM Michael Osipov <[hidden email]> wrote:

>
> > I just wanted to get thoughts on a possible new feature. Right now, my
> > company has thousands of Maven modules that are all on snapshots with an
> > updatePolicy of "always" (basically everyone gets the latest build of
> > everything, kind of like a poor man's monorepo).
>
> Why "always" then and not 5 minutes or so?
>
> Michael
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: [hidden email]
> For additional commands, e-mail: [hidden email]
>
>