Howdy

Yes, usually you do want it absolute.

The relative examples like "-Dmaven repo.local=../repo" you usually can
find in some examples or reproducers.

If local repo path relative, these will end up using different local
repositories (imagine some multi module build):

$ mvn install
$ mvn -f submodule1/pom.xml install
$ cd submodule2 && mvn install

As it is evaluated at maven boot and relative would be calculated against
CWD based on invocation (plus, -f modifies it).

Hth
T

On Sun, Jul 14, 2024, 03:10 Timothy Stone <tst...@petmystone.com> wrote:

> I help maintain Maven tooling for To Be Continuous, a GitLab CI/CD
> catalog of pluggable pipeline configurations.
>
> There is some discussion on the use of the JVM property,
> `-Dmaven.repo.local=path' and the note on "Configuring your Local
> Repository" (see [1]). Initially I was going to post to the user list,
> but being a development question against the internals of Maven, I
> thought this a better forum.
>
> There is an admonition on the referenced page:
>
> /Note: The local repository _must_ be an absolute path./ (emphasis mine)
>
> Is this specifically noted for the use of the settings.localRepository
> only or does the note extend to the use of the JVM property? I searched
> the GitHub repo for a examples and found numerous uses of relative
> paths, e.g., `../.repository` and others.
>
> Seeking clarification as I could not immediately determine the internal
> use of `maven.repo.local' property when set.
>
> Thanks!
> Tim
>
>
> [1]
>
> https://maven.apache.org/guides/mini/guide-configuring-maven.html#configuring-your-local-repository
> --
> Timothy Stone
> =============
> Some call me ... Tim.
> Husband, Father, Blogger, OSS, Wargamer, Home Brewer, and D&D
> Find me on GitLab | GitHub | Linked In | MeWe | GnuPG
>

Reply via email to