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

Create Maven Project does not work. #771

Closed
Kambaa opened this issue Jan 2, 2022 · 4 comments
Closed

Create Maven Project does not work. #771

Kambaa opened this issue Jan 2, 2022 · 4 comments
Assignees
Labels
bug Something isn't working
Milestone

Comments

@Kambaa
Copy link

Kambaa commented Jan 2, 2022

Describe the bug
Maven options for custom "settings.xml" file does not work when trying to create a new maven project.

To Reproduce
Steps to reproduce the behavior:

  1. Go to 'Any workspace'
  2. Click on 'Right clicking on the selected folder and selecting Create maven project'
  3. Doing the steps to 'create to create a new maven archtype project'
  4. See the problem as the image error, in the command line section no particular options are added to the running command.
    resim

Expected behavior
running maven(as well as java) commands from command list (opened with ctrl+shift+p) should have extra arguments described in the Options.json file(or stuff set up in the extension settings). meaning take a look at vscode's terminal window's last lines:
resim
where is the -gs <settings.xml path> or other given parameters set up in the setting.json??

Environments:

  • OS: Windows 10
  • VS Code version: Version: 1.63.2
    Commit: 899d46d82c4c95423fb7e10e68eba52050e30ba3
    Date: 2021-12-15T09:40:02.816Z
    Electron: 13.5.2
    Chromium: 91.0.4472.164
    Node.js: 14.16.0
    V8: 9.1.269.39-electron.0
    OS: Windows_NT x64 10.0.19042
  • Extension version 11.430.106 (installed with Java extension pack 10.802.438)

Screenshots
See the 4th step in To reproduce.

Additional context
In the screenshot, Because of the default "work" settings of maven, i needed to change the settings.json file to default settings.xml by settings up the vscode settings as seen in the upper "Settings.json" tab. I tried various things, using maven.settingsFile , maven.executable.options but no avail. Please don't mind the duplicate lines of the same configuration as i am cleaning it up right now.
I am trying to test if i can swicth to vscode and test out if a java dev enviroment can set up quickly, so far, scaaaary 😨

@Eskibear
Copy link
Member

Eskibear commented Jan 4, 2022

About maven.settingsFile part, #768 would probably fix the issue.

@Eskibear Eskibear self-assigned this Jan 4, 2022
@Eskibear Eskibear added the bug Something isn't working label Jan 4, 2022
@Eskibear Eskibear added this to the January 2022 milestone Jan 5, 2022
@Kambaa
Copy link
Author

Kambaa commented Jan 18, 2022

Hello again,
After leaving the issue as is, and clearing my head for some time, i returned and tried it again, it seems maven.settingsFile option does not work for plugin. So for now, i have to manually change settings.xml file myself.

resim

Also, trying to add the argument on the maven.executable.path setting breaks the command somehow. So after trying and trying, i did made it work somehow but, as you can see in the image below, running command opens in a new command line (it was hard to pause fast closing terminal and take a screenshot! :) )
resim
I will be looking forward to the fix and make myself a nice, portable, java vscode enviroment.

Thank you for your patience and have a wonderful year.

@Eskibear
Copy link
Member

#776 does fix the settings file issue, appending -s <mavenSettingsFile> to the command. You'll see it in the next version.

running command opens in a new command line

This is windows/powershell's behavior when you specify full path of mvn without providing its file extension .cmd. Specifying mvn.cmd instead of mvn would probably work. See below:

PS C:\Users\username> & "C:\apache-maven-3.8.1\bin\mvn" --help
PS C:\Users\username> & "C:\apache-maven-3.8.1\bin\mvn.cmd" --help

usage: mvn [options] [<goal(s)>] [<phase(s)>]

Options:
 -am,--also-make                        If project list is specified, also
...

@Kambaa
Copy link
Author

Kambaa commented Jan 21, 2022

Thank you for your time. Have a nice day.

@Kambaa Kambaa closed this as completed Jan 21, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants