Skip to content

Conversation

froque
Copy link
Contributor

@froque froque commented Aug 4, 2025

Apache Maven 4.0.0-rc-4 fails with:

[ERROR] Internal error: java.lang.IllegalArgumentException: Invalid LocalRepositories: [/var/maven/.m2/repository-${MVN_UMASK} ()] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalArgumentException: Invalid LocalRepositories: [/var/maven/.m2/repository-${MVN_UMASK} ()]
Suppressed: java.lang.IllegalArgumentException: Not fully interpolated local repository /var/maven/.m2/repository-${MVN_UMASK} ()

fixes #3135

Apache Maven 4.0.0-rc-4 fails with:
> [ERROR] Internal error: java.lang.IllegalArgumentException: Invalid LocalRepositories: [/var/maven/.m2/repository-${MVN_UMASK} ()] -> [Help 1]
org.apache.maven.InternalErrorException: Internal error: java.lang.IllegalArgumentException: Invalid LocalRepositories: [/var/maven/.m2/repository-${MVN_UMASK} ()]
>     Suppressed: java.lang.IllegalArgumentException: Not fully interpolated local repository /var/maven/.m2/repository-${MVN_UMASK} ()
@hboutemy
Copy link
Member

hboutemy commented Aug 4, 2025

yes, this would be an option to fix #3135
but it would break buids that rely on this settings: we need to have different local repositories based on umask
need to find another strategy that dropping the feature, or letting settings.xml interpolation do the job (as was properly working until now...)

@froque
Copy link
Contributor Author

froque commented Aug 4, 2025

Any example of a build broken by this ?

I tried with a few projects and could not find a problem.

we need to have different local repositories based on umask

Why ?

@hboutemy
Copy link
Member

hboutemy commented Aug 5, 2025

when I added the feature, it was on purpose: cases where project copies dependencies from local repo, then inherit permissions
yes, not the vast majority
it was a long time ago, need to investigate history to find

@hboutemy
Copy link
Member

hboutemy commented Aug 8, 2025

thinking at it: perhaps just using mvn -Dmaven.repo.local=... can be a good option on the few buildspecs where umask is important for local repo
I need to test

@hboutemy
Copy link
Member

hboutemy commented Aug 9, 2025

for reference and further research: this was introduced in ed7fb4f

@hboutemy
Copy link
Member

another aspect coming back to my mind: for the umask from repository issue to be seen, we need 2 builds:

  • 1 that fetches the content with a umask
  • the other that uses the content from the repository, expecting another umask

these conditions happen when I'm building on my laptop, because local repository is kept between all my builds
but it does not happen on GHA builds, that start from an empty local repo each time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

Maven 4.0.0-rc-4 builds are broken for reproducible central
2 participants