Details
-
Type:
Improvement
-
Status:
Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: 0.9.4
-
Fix Version/s: None
-
Component/s: Help Wanted, Maven Embedder
-
Labels:None
Description
Global settings are by default set to MAVEN_INSTALL_DIR\conf\settings.xml and we cannot change it.
We can do it in the comand line of maven with -Dorg.apache.maven.global-settings=...
In our case we use it to store environment settings (repositories & co)
Users settings are used for private data used by developpers (credentials & co).
Extracting global settings from maven installation help us to change maven releases without modifying the original packaging.
Issue Links
- depends upon
-
MNG-3611
allow to pass in location of global settings file to maven cli
-
- is duplicated by
-
MNGECLIPSE-877
allow alternate location of global settings file
-
- relates to
-
MNG-3914
Add CLI option to control location of global settings from command line
-
Starting in Maven 2.1 (the snapshots of which are used by m2eclipse), there are two ways to achieve this:
1. you can set the location of the global settings file in the MavenExecutionRequest.setGlobalSettingsFile(..) method, and then pass it into the embedder instance.
2. If you're using an external maven installation - and this works in 2.0.x - you can use the approach that Arnaud suggested: -Dorg.apache.maven.global-settings=/path/to/settings.xml