Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It does not recognize java.configuration.maven.userSettings #140

Closed
mrklc opened this issue Oct 23, 2018 · 2 comments
Closed

It does not recognize java.configuration.maven.userSettings #140

mrklc opened this issue Oct 23, 2018 · 2 comments
Labels
duplicate This issue or pull request already exists

Comments

@mrklc
Copy link

mrklc commented Oct 23, 2018

Describe the bug
I have a custom settings.xml in a custom location, say c:\settings.xml and I use the settings in Java configuration "java.configuration.maven.userSettings" to change the location. However, when I maven (mvn clean), it does NOT take the settings (proxy) in my settings.xml.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Settings'
  2. Find the java.configuration.maven.userSettings configuration (it is under Java configuration)
  3. Update it to my custom settings.xml absolute path (include the file name)
  4. Right click on the maven project and select clean
  5. The build will fail since proxy is required in my environment,

Expected behavior
The mvn shall use the settings.xml in the path sepcified in the java.configuration.maven.userSettings.

I have tried to put the settings.xml into the default location (C:\Users<user>.m2\settings.xml), the build will work.

Environments (please complete the following information as much as possible):
Apache Maven 3.5.2 (138edd61fd100ec658bfa2d307c43b76940a5d7d; 2017-10-18T18:58:13+11:00)
Maven home: C:\tools\apache-maven-3.5.2\bin..
Java version: 1.8.0_144, vendor: Oracle Corporation
Java home: C:\Program Files\Java\jre1.8.0_144
Default locale: en_AU, platform encoding: Cp1252
OS name: "windows 7", version: "6.1", arch: "amd64", family: "windows"

Version: 1.28.2 (user setup)
Commit: 7f3ce96ff4729c91352ae6def877e59c561f4850
Date: 2018-10-17T00:23:51.859Z
Electron: 2.0.9
Chrome: 61.0.3163.100
Node.js: 8.9.3
V8: 6.1.534.41
Architecture: x64

@Eskibear
Copy link
Member

For now, this maven extension works independently with the language server, so it never reads any java.* config.

Use extra parameters to specify your own settings file.

$ mvn --help | grep setting
 -gs,--global-settings <arg>            Alternate path for the global
                                        settings file
 -s,--settings <arg>                    Alternate path for the user
                                        settings file

In this extension we provide config entry maven.executable.options as a workaround. E.g.

"maven.executable.options": "-s c:\\settings.xml"

Make sure the filepath format is compatible with the terminal you use, here we won't format the content for your terminal.

Let me know if it works for you.

@Eskibear Eskibear added the duplicate This issue or pull request already exists label Oct 24, 2018
@Eskibear
Copy link
Member

I find it's duplicated with #33 . I'm closing it and please re-open if it doesn't work.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
duplicate This issue or pull request already exists
Projects
None yet
Development

No branches or pull requests

2 participants