[ https://issues.apache.org/jira/browse/MWRAPPER-23?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17506766#comment-17506766 ]
ASF GitHub Bot commented on MWRAPPER-23: ---------------------------------------- gzm55 commented on pull request #28: URL: https://github.com/apache/maven-wrapper/pull/28#issuecomment-1067678139 function `mavenUserHome()` now has two usages: 1. in MavenWrapperMain.java, `private static void addSystemProperties( Path rootDir )`. in the function wrapper loads two property files into system. the files are {maven.user.home}/maven.properties and {basedir}/maven.properties. This logic would come from a [document](https://github.com/apache/maven/blob/master/maven-core/src/site/apt/configuration-management.apt) for maven develop team, and maven 2.x, 3.x, 4.x do not load these two path. To avoid `mvn ...` and `mvnw ...` running with different system properties, `addSystemProperties()` should not be called within wrapper. 2. pass `mavenUserHome()` to `PathAssembler.mavenUserHome` which will only affect `PathAssembler.getBaseDir()`. (PS: `getBaseDir()` return working dir when user pass "PROJECT" to `getBaseDir()`, it should be a bug). This base dir is used as a storage base for distribution and unzip files. Then i would prefer add a property `maven.wrapper.repo.local` default to ~/.m2. -- This is an automated message from the Apache Git Service. To respond to the message, please log on to GitHub and use the URL above to go to the specific comment. To unsubscribe, e-mail: issues-unsubscr...@maven.apache.org For queries about this service, please contact Infrastructure at: us...@infra.apache.org > in maven-wrapper, maven user home is not consistent with maven core > ------------------------------------------------------------------- > > Key: MWRAPPER-23 > URL: https://issues.apache.org/jira/browse/MWRAPPER-23 > Project: Maven Wrapper > Issue Type: Improvement > Components: Maven Wrapper Jar > Reporter: James Z.M. Gao > Assignee: Robert Scholte > Priority: Minor > > New maven wrapper guesses the maven user home location via system props, > system envs > and at last the default location (~/.m2). This guessing order is the > convention of the gradle wrapper. > For maven, user home has a fixed location, i.e. ~/.m2, described > [here|https://maven.apache.org/settings.html#Settings_Details] -- This message was sent by Atlassian Jira (v8.20.1#820001)