Skip to content

Conversation

@michael-o
Copy link
Member

@michael-o michael-o commented Oct 24, 2021

@mthmulders
Copy link
Contributor

From MNG-7193:

MAVEN_ARGS is overwritten by maven.config is overwritten by CLI arguments.

However, if I build Maven on this branch and test with

$ cat .mvn/maven.config 
-V
-DskipTests=true

$ MAVEN_ARGS="-DskipTests=false" mvn test 

I get

[INFO] -------------------------------------------------------
[INFO]  T E S T S
[INFO] -------------------------------------------------------
[INFO] Running foo.AppTest
[INFO] Tests run: 1, Failures: 0, Errors: 0, Skipped: 0, Time elapsed: 0.023 s - in foo.AppTest

Since maven.config should have precedence over MAVEN_ARGS, I would expect the tests to be skipped. If I use the same maven.config and run mvn test (without MAVEN_ARGS) the tests are skipped, as expected.

I did a second test, where a Maven profile upgrades a plugin; it shows the same behaviour: MAVEN_ARGS "wins" from .mvn/maven.config, despite MNG-7193 saying the reverse.

@michael-o
Copy link
Member Author

Let me get in touch with you later this week about this.

@michael-o
Copy link
Member Author

You're right. It was written before we have agreed on option 7 in https://cwiki.apache.org/confluence/plugins/servlet/mobile?contentId=186877056#content/view/186877056. I will rework.

@asfgit asfgit force-pushed the maven.config-from-start-scripts branch from a4078ee to f8ccd7f Compare December 26, 2022 16:37
@asfgit asfgit force-pushed the maven.config-from-start-scripts branch from f8ccd7f to 43493cf Compare December 26, 2022 16:45
@michael-o
Copy link
Member Author

Superseded by #936.

@michael-o michael-o closed this Dec 26, 2022
@michael-o michael-o deleted the maven.config-from-start-scripts branch December 26, 2022 17:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants