Ok, sure that's one approach. It does kinda offset the caching benefit of
having a local repo.
But more seriously for me it prevents partial builds, which is the same as
enforcing
https://maven.apache.org/enforcer/enforcer-rules/reactorModuleConvergence.html

I wondering why this is permitted? The dependency is not part of the model,
so why is it available?
The impact of turning this off in the next Maven is that incorrectly
configured projects might fail to build.
Far reaching consequences, but completely just and reasonable and forward
thinking.

Delany

On Wed, 13 Jul 2022 at 15:21, Mantas Gridinas <mgridi...@gmail.com> wrote:

> I circumvented that by setting custom repository directory every time via
> maven.repo.local
>
> Seems that you can configure your repository in settings.xml to use update
> policy "always" for releases to make sure that its always downloaded. I
> cannot comment on how that would work if artifact is already present and
> download fails though.
>
> On Wed, Jul 13, 2022, 16:15 Delany <delany.middle...@gmail.com> wrote:
>
> > Hi Maven,
> >
> > A project was missing a dependency junit:junit and would fail to build on
> > Jenkins, where the .m2/repository is removed for each build.
> > On my machine this dependency happens to be in .m2/repository and the
> > project would build fine.
> >
> > How can I make it not fine? I don't want my projects taking whatever they
> > need from maven local repository without a <dependency>
> >
> > Thanks
> > Delany
> >
>

Reply via email to