You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@maven.apache.org by Jonathan Haber <jh...@hubspot.com> on 2017/10/11 12:54:13 UTC

Allow custom updatePolicy

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

Re: Allow custom updatePolicy

Posted by Jonathan Haber <jh...@hubspot.com>.
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 <19...@gmx.net> 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: dev-unsubscribe@maven.apache.org
> For additional commands, e-mail: dev-help@maven.apache.org
>
>

Re: Allow custom updatePolicy

Posted by Michael Osipov <19...@gmx.net>.
> 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: dev-unsubscribe@maven.apache.org
For additional commands, e-mail: dev-help@maven.apache.org