Hello,

There is a maven.project.config variable, but it’s not used to find the config 
(amd not defined in m2.conf), – if I understand this logic correctly: 
https://github.com/apache/maven/blob/199ed20faf07a4caf1efb7280e442fd9ccd62f66/impl/maven-cli/src/main/java/org/apache/maven/cling/invoker/mvn/MavenParser.java#L52

Maybe deleting the file is the quickest Solution for that Build-Job. 

But I would agree, a mechanism similar (or same) to MAVEN_SKIP_RC should exist.

Gruß
Bernd

Greg Chabala wrote on 15. Mar 2025 16:24 (GMT +01:00):

> I have -V (aka --show-version) set in .mvn/mvn.config in my project, which
> is nice because I can see basic diagnostic information wherever the
> project
> runs, teammates' machines, CI boxes, etc, even where I may not have direct
> access to set -V on the maven invocation.
> 
> Outside of my control, another team has a script that runs against my
> project, and that script invokes maven and expects to parse the output.
> Having -V set is unexpected for them and their script breaks. I am trying
> to help them write a better script, but it's still outside my control.
> 
> Is there any way I can disable mvn.config or -V for a specific invocation
> of maven? I was thinking of something like setting MAVEN_ARGS="
> --show-version=false " before their script runs, but from looking at the
> code, it seems like once -V or --show-version is seen, it's set, there's
> no
> way to unset something.
> 
> I should also mention, this is running against various Maven versions in
> the 3.9.x series, depending on the machine. Any notion of 'that's coming
> in
> Maven 4' will probably not help.
> 
> Greg Chabala
> 


Gruß
Bernd
— 
https://bernd.eckenfels.net

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@maven.apache.org
For additional commands, e-mail: users-h...@maven.apache.org

Reply via email to