microsoft / vscode-maven Goto Github PK
View Code? Open in Web Editor NEWVSCode extension "Maven for Java"
Home Page: https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven
License: Other
VSCode extension "Maven for Java"
Home Page: https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven
License: Other
Result:
The B project will not automatically be added to the sidebar
Describe the bug
When opening vscode Maven Projects take about 11 seconds to appear.
To Reproduce
pom.xml
files.Expected behavior
Would a second or two be acceptable?
Environments (please complete the following information as much as possible):
Screenshots
If applicable, add screenshots to help explain your problem.
Additional context
Add any other context about the problem here.
Provide an edit entry for users to edit wrong commands or edit those commands that the corresponding pom file doesn't exist.
Inside the explorer view, list the dependencies and allow add/upgrade/remove operations.
This is requested by the users while @yaohaizh already had some changes made at language server side. Please check where the best place for such feature is.
Hi,
I've opened a folder which have previously successfully built with Maven and run through Eclipse.
When scanning the folder for Maven projects I get:
"No whitespace between attributes Line: 0 Column: 105 Char: x"
I've tried a fresh clone so the workspace is clean and I get the same result. I've also tried setting the Maven path in my VS Code User settings.
I'm using Windows 10.
Help please.
Describe the bug
Open a multi-root workspace with multiple maven projects, I want one of the projects to use its own mvnw file and others use the environment maven path. But when I search using 'maven' keyword in specified folder settings, there are only two maven settings and I can't find 'maven.executable.path'
To Reproduce
Environments (please complete the following information as much as possible):
If I open a folder containing a multi-module Maven project (well ... all my projects are multi-module), VS Code correctly parses the POM files and sets up the classpath. If I then save the environment as a workspace I should, in theory, be able to load that environment using "Open Workspace...". Instead VS Code seems to be missing some part of the previous workspace's configuration. It's pretty common for the classpath to be incomplete - clicking on some files results in a notification indicating that my Java file isn't on the classpath so only syntax checking will be performed. I originally noticed this because if the classpath doesn't include a test class, running the tests from the test explorer results in an error pop-up that says "Reduce of empty array with no initial value"
The saved workspace doesn't have anything surprising in it - though I'll admit I don't know what it should look like. Since it's very small, here is the contents of that file:
{
"folders": [
{
"path": "/home/smoyer1/git/selesy/hibp-client"
}
],
"settings": {
"java.configuration.updateBuildConfiguration": "automatic"
}
}
I'm using:
Apache Maven 3.3.9
Maven home: /usr/share/maven
Java version: 1.8.0_151, vendor: Oracle Corporation
Java home: /usr/lib/jvm/java-8-openjdk-amd64/jre
Default locale: en_US, platform encoding: UTF-8
OS name: "linux", version: "4.4.0-116-generic", arch: "amd64", family: "unix"
https://github.com/Microsoft/vscode-maven/blob/develop/package.json#L139
here false == true
can be repleaced with never
I am new to maven but have been having issues with version 3.5.3, when I was on 3.5.2 the plugin worked perfectly but every-since I upgraded with brew to 3.5.3 the maven plugin in vscode shows me this: command 'maven.archetype.generate' not found. I know that if i use man archetype:generate it will work with the terminal, but its the plugin that wont work. I made sure to route where my maven path is in settings in vs studio just in case.. path: /usr/local/Cellar/maven/3.5.3/libexec. its where i had it with version 3.5.2, I just changed it to 3.5.3: anyway, let me know if you can help with this issue. would be glad to have the plugin working rather than keep getting command 'maven.archetype.generate' not found
Steps:
clean
, it launches an integrated terminal.maven.terminal.customEnv
in settings.
"maven.terminal.customEnv": [
{
"environmentVariable": "testName",
"value": "testValue"
}
]
Brought by @biezhi
This is not necessarily a problem of THIS extension. But we are looking for a fix cross the whole vscode-java solution.
我因错误修改了.classpath,导致项目无法运行。
接下来,我把.classpath以及.project删除了。
然后重启。vscode会根据pom.xml生成.classpath跟.project文件
但是重启,仅仅生成了.project文件。
第二次打开的时候。生成了.vscode\launch.test.json。并没有生成.classpath文件。
第三次打开会生成.classpath但是无法运行我的单元测试.
第四打开就完全可以了。
I use bash (windows subsystem) as default terminal, compile maven project will be error:
mvn -f "d:\workspace\lts-core\pom.xml" compile
wsh@WSH-T303UA:/mnt/d/workspace$ mvn -f "d:\workspace\lts-core\pom.xml" compile
[INFO] Scanning for projects...
[ERROR] [ERROR] Some problems were encountered while processing the POMs:
[FATAL] Non-readable POM /mnt/d/workspace/d:\workspace\lts-core\pom.xml: /mnt/d/workspace/d:\workspace\lts-core\pom.xml (No such file or directory) @
@
use this command will be correct:
mvn -f "/mnt/d/workspace/lts-core/pom.xml" compile
Please be compatible with bash.
Installing an archetype and updating the local-catalog to contain said archetype does not cause it to appear in the list of available archetypes from the Maven: Generate from Maven Archetype command. I have verified that my archetype is correctly installed by cat'ng the local-catalog as well as generating a project using the archetype from the command line.
OS: Debian Stretch
Describe the bug
The current working directory is wrong when pom.xml is in subdirectory of root. This causes path issues when executing a spring-boot:run
command. Can you cd
over to the directory of the pom.xml
as default behavior?
As a comparison, when you execute a maven goal in Intellij it defaults the working directory to the same directory as the pom.xml
file.
When generating projects from archetypes, users have to know exactly what archetype to use. But Maven central does not have a good mechanism for users to discover what's best for their needs. Download numbers are hidden so we cannot tell how popular one package is. The whole experience is frustrating.
Suggest improving the experience by providing a better recommendation mechanism for users to find archetypes. We actually can maintain a list of download numbers initiated from our extension and do recommendation based on that. This is only one way to consider.
The recommendation can also apply to all the scenarios when users look for dependencies.
When trying to install the plugin, the following message always appears
Couldn't find a compatible version of Maven for Java with this version of Code.
I downgraded my maven from version 3.5.3 to 3.5.2 but didn't help.
Has anyone having the same issue?
Project: https://github.com/Microsoft/todo-app-java-on-azure.git
Repro steps:
My default workflow is to run "clean install". To do this I have to do the following things
Open the command prompt and navigate to "Maven: Run Goal"
Select Project
Either a) Select the custom goal from history OR b) select custom goal and write it again
It would benefit me to have a way to save off custom goals in a way that they are treated as "first class citizens" IE accessed in a way similar or identical to the standard goals ("install, deploy") are
Support to set JAVA_HOME from java.home
in extension redhat.java
, and add extra environment variables before execute maven commands in terminal. @jeffgbutler
Support to put popular archetypes ahead according to collected anonymous data. @Eskibear
Allow to append default options for mvn commands #14 @Eskibear
Whenever I'm working in a folder that doesn't contain a pom.xml or when I don't have a folder open, the 'Maven Projects' section still appears. Can this section be hidden an only shown when a pom.xml file is detected?
Originally raised at Eskibear/vscode-maven#41 by @blassmegod .
Would be nice to have a flag to enable or disable the online use of maven, so that it can cut down on network usage (mvn -o).
Current workaround:
For the moment you have a workaround by running custom goals, adding -o manually for your commonly used commands.
usage: mvn [options] [<goal(s)>] [<phase(s)>]
e.g.
{
"maven.defaultOptions": "-O -q"
}
Command clean
will finally trigger:
mvn -f <pom.xml path> -O -q clean
Describe the bug
Set value of maven.executable.path to mvnw/mvnw.cmd path and save, get below error.
But in fact, for the maven wrapper, we can succefully execute maven command .
To Reproduce
Expected behavior
No error.
Environments :
I can't find where should I set my custom settings.xml
per project. This is the usage of mvn -s
option.
Could this be implemented project-wide?
Maven Projects view should hide if the project isn't Maven-enabled. I added when
to the package.json
:
"views": {
"explorer": [
{
"id": "mavenProjects",
"name": "Maven Projects",
"when": "workspaceContains:pom.xml"
}
which succeeds in hiding when I don't have a Maven project, but doesn't show in the view contributions list when I load my Java project containing a pom.xml
.
This also require maven.executable.path to be a resource scope configuration, so it will auto resolve issue #79
Describe the bug
I have a workspace with multiple maven projects. When I have a terminal open in project A, and I wish to run a maven goal in project B, I use the context menu over the "Maven projects" side window and click the desired goal. A new maven terminal windows open in the root of project A to run maven in project B.
adrian@MY-LAPTOP:~/projects/my-project-A$ "./mvnw" clean -f "/home/adrian/projects/my-project-B/pom.xml"
While the thing work, it's confusing that the terminal ends up open in the other project's directory.
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I expected the maven terminal to be open in the root of the actual project I'm running the goal for.
Environments (please complete the following information as much as possible):
Currently, to run maven commands, you have to use the maven tree. It would be great to be able to run these commands from the command palette.
Describe the bug
I have my settings like this, to use the maven wrapper that comes from start.spring.io projects:
"maven.executable.path": "./mvnw",
This works smoothly, but after upgrading to last release, because of the new validation, I get:
Unable to execute Maven commands.
Error:
Command failed: "./mvnw" --version
/bin/sh: 1: ./mvnw: not found
To Reproduce
Steps to reproduce the behavior:
Expected behavior
I know the goal for the plugin is to support maven and not the maven wrapper, but I think it's commonly used, so I would like to see if there is a valid workaround or if maybe the command for validation "./mvnw" --version
could be run in the project's root.
Thoughts?
Hi,
Is there any support for using mvnDebug instead of mvn? At present I have just added the following setting to use mvnDebug from my PATH.
"maven.executable.path": "mvnDebug"
Not sure if there is a downside of this?
Use case is that I want to be able to use the jetty-maven-plugin and debug my servlet code. So I run mvnDebug jetty:run and then I can attach the vscode debugger.
Thanks
Chris
A declarative, efficient, and flexible JavaScript library for building user interfaces.
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google ❤️ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.