{"id":20026288,"url":"https://github.com/microsoft/vscode-maven","last_synced_at":"2025-05-16T12:11:05.494Z","repository":{"id":37359475,"uuid":"116921700","full_name":"microsoft/vscode-maven","owner":"microsoft","description":"VSCode extension \"Maven for Java\"","archived":false,"fork":false,"pushed_at":"2025-03-22T03:21:48.000Z","size":19201,"stargazers_count":184,"open_issues_count":106,"forks_count":92,"subscribers_count":16,"default_branch":"main","last_synced_at":"2025-04-12T06:18:50.689Z","etag":null,"topics":["java-support","maven","microsoft","vscode-extension"],"latest_commit_sha":null,"homepage":"https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven","language":"TypeScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/microsoft.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":"LICENSE.txt","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":"SUPPORT.md","governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-01-10T07:10:39.000Z","updated_at":"2025-04-04T02:05:17.000Z","dependencies_parsed_at":"2023-02-12T07:30:45.950Z","dependency_job_id":"e5678d03-fffb-4e15-aea2-b7cc8c86bf65","html_url":"https://github.com/microsoft/vscode-maven","commit_stats":null,"previous_names":[],"tags_count":91,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-maven","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-maven/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-maven/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/microsoft%2Fvscode-maven/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/microsoft","download_url":"https://codeload.github.com/microsoft/vscode-maven/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248525140,"owners_count":21118620,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["java-support","maven","microsoft","vscode-extension"],"created_at":"2024-11-13T09:06:06.757Z","updated_at":"2025-04-12T06:19:02.684Z","avatar_url":"https://github.com/microsoft.png","language":"TypeScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Maven for Java\n\n[![Marketplace Version](https://img.shields.io/visual-studio-marketplace/v/vscjava.vscode-maven.svg)](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven)\n[![Installs](https://img.shields.io/visual-studio-marketplace/i/vscjava.vscode-maven.svg)](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven)\n[![Rating](https://img.shields.io/visual-studio-marketplace/r/vscjava.vscode-maven.svg)](https://marketplace.visualstudio.com/items?itemName=vscjava.vscode-maven)\n[![Build status](https://dev.azure.com/mseng/VSJava/_apis/build/status/microsoft.vscode-maven-CI)](https://dev.azure.com/mseng/VSJava/_build/latest?definitionId=11975)\n\n## Features\n\nMaven extension for VS Code. It provides a project explorer and shortcuts to execute Maven commands, improving user experience for Java developers who use Maven.\n\n* Support to generate projects from Maven Archetype.\n* Support to generate effective POM.\n* Provide shortcuts to common goals, plugin goals and customized commands.\n* Preserve command history to fast re-run.\n\n\n## Requirements\n* Java\n* Maven / Maven Wrapper\n\nFor troubleshooting, please refer to the page [HERE](Troubleshooting.md).\n\n## Basic Usage\n\u003cdetails open\u003e\n\u003csummary\u003eMaven Explorer\u003c/summary\u003e\n\nThe extension scans `pom.xml` in your workspace, and displays all Maven projects and their modules in the sidebar.\n\n![Screenshot](images/explorer.png)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRun Plugin Goals\u003c/summary\u003e\n\nThe extension parse effective-pom of Maven projects, and displays all plugins and plugin goals hierarchically.\n\n![Screenshot](images/plugin.gif)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003ePOM File Editing\u003c/summary\u003e\n\nThe extension provides Maven specific completion suggestions when editing POM files, including snippets and artifact hints.\n\n![Screenshot](images/completion.gif)\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eRe-Run Historical Commands\u003c/summary\u003e\n\nIt preserves history of goals for each project, so you can fast re-run previous long commands, e.g. `mvn \u003cgoals\u003e -Dparam1=value1 -Dparam2=value2 -Dparam3=value3 ...`\nThere are 2 entries for it:\n* Command Palette -\u003e select `Maven: History ...` -\u003e Select a project -\u003e Select command from the history\n* Right-click on a project -\u003e Click `History ...` -\u003e Select command from the history\n\n![Screenshot](images/history.gif)\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eArchetype Related\u003c/summary\u003e\n\n### Generate from Maven Archetype\nThe extension loads archetypes listed in local/remote catalog. After selection, the extension sends `mvn archetype:generate -D...` to terminal.\nThere are 2 entries for it:\n* Command Palette -\u003e select `Maven: Generate from Maven Archetype`\n* Right-click on a folder -\u003e Click `Generate from Maven Archetype`\n\n![Screenshot](images/archetype.gif)\n\n### Update Maven Archetype Catalog\nWith following steps, you can update the **local cache** of Maven **remote catalog**. It takes some time to download meta data from Maven central repository.\n\nCommand Palette -\u003e select `Maven: Update Maven Archetype Catalog`.\n\n\u003c/details\u003e\n\n## Additional Configurations\n\n\u003cdetails\u003e\n\u003csummary\u003eJAVA_HOME and Other Environment Variables\u003c/summary\u003e\n\nThis extension executes Maven by opening a terminal session and then calling Maven in that session.\nMaven requires the JAVA_HOME environment variable to be set. Maven will also look for other variables such as MAVEN_OPTS. If you prefer not to set those variables permanently you can configure them, or any other environment variable, in settings:\n\n```json\n{\n    \"maven.terminal.customEnv\": [\n        {\n            \"environmentVariable\": \"MAVEN_OPTS\",               // variable name\n            \"value\": \"-Xms1024m -Xmx4096m\"                     // value\n        },\n        {\n            \"environmentVariable\": \"JAVA_HOME\",                // variable name\n            \"value\": \"C:\\\\Program Files\\\\Java\\\\jdk-9.0.4\"      // value\n        }\n    ]\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eSpecial Handling for JAVA_HOME\u003c/summary\u003e\n\nIf you have Red Hat's Java Language Support extension installed, then you can specify JAVA_HOME in settings for that extension:\n\n```json\n{\n    \"java.home\": \"C:\\\\Program Files\\\\Java\\\\jdk-9.0.4\"      // Red Hat Java Language Support Setting\n}\n```\n\nThis extension (Maven for Java) can reuse that setting if you desire:\n\n```json\n{\n    \"maven.terminal.useJavaHome\": true      // Use the Red Hat Java Language Support Setting for JAVA_HOME\n}\n```\n\nWith this support, you can specify JAVA_HOME in one place and you do not need to use the `maven.terminal.customEnv` setting unless\nyou have other environment variables to set.\n\nIf you have JAVA_HOME configured through the `maven.terminal.customEnv` setting, and also specify to reuse the Red Hat setting, then the value from `maven.terminal.customEnv` will take precedence.\n\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eDefault Options for Maven Command\u003c/summary\u003e\nThe usage of Maven executable is:\n\n\u003e usage: mvn [options] [\u003cgoal(s)\u003e] [\u003cphase(s)\u003e]\n\nYou can use `maven.executable.options` to specify default **options** for all your Maven commands executed in current project.\n```json\n{\n    \"maven.executable.options\": \"-o -s ./settings.xml\"      // work offline and use an alternative settings file. Can also be defined as an array of strings, e.g. [\"-o\", \"-s ./settings.xml\"]\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eFolder Exclusion for Searching POM Files\u003c/summary\u003e\n\nTo speed up the searching of Maven projects, you can exclude folders in settings:\n\n```json\n{\n    \"maven.excludedFolders\": [\n        \"**/.*\",                // exclude hidden folders\n        \"**/node_modules\",      // exclude node modules to speed up\n        \"**/target\"             // exclude duplicated pom file in target folder\n    ]\n}\n```\n\u003c/details\u003e\n\n\u003cdetails\u003e\n\u003csummary\u003eCustomize Favorite Maven Commands\u003c/summary\u003e\n\nSpecify a favorite command in settings:\n\n```json\n{\n    \"maven.terminal.favorites\": [\n        {\n            \"alias\": \"full-build without tests\",\n            \"command\": \"clean package -DskipTests\"\n        }\n    ]\n}\n```\n\nNow right-click on an project item, and then click `Favorite ...`. The option `full-build without tests` should show up.\n\n\u003c/details\u003e\n\n## Settings\n\n| Name | Description | Default Value |\n|---|---|---|\n| `maven.dependency.enableConflictDiagnostics` | Specify whether to show diagnostics for conflict dependencies. | `true` |\n| `maven.excludedFolders` | Specifies file path pattern of folders to exclude while searching for Maven projects. | `[ \"**/.*\", \"**/node_modules\", \"**/target\", \"**/bin\", \"**/archetype-resources\" ]` |\n| `maven.executable.preferMavenWrapper` | Specifies whether you prefer to use Maven wrapper. If true, it tries using 'mvnw' by walking up the parent folders. If false, or 'mvnw' is not found, it tries 'mvn' in PATH instead. | `true` |\n| `maven.executable.path` | Specifies absolute path of your 'mvn' executable. When this value is empty, it tries using 'mvn' or 'mvnw' according to the value of 'maven.executable.preferMavenWrapper'. E.g. `/usr/local/apache-maven-3.6.0/bin/mvn` | ` ` |\n| `maven.executable.options` | Specifies default options for all mvn commands. E.g. `-o -DskipTests` | ` ` |\n| `maven.explorer.projectName` | Format of project node name shown in Maven explorer. | `${project.name}` |\n| `maven.projectOpenBehavior` | \"Default method of opening newly created project. | `\"Interactive\"` |\n| `maven.pomfile.autoUpdateEffectivePOM` | Specifies whether to update effective-pom automatically whenever changes detected. | `false` |\n| `maven.pomfile.globPattern` | Specifies the glob pattern used to look for pom.xml files. | `**/pom.xml` |\n| `maven.pomfile.prefetchEffectivePom` | Specifies whether to prefetch effective pom on startup. | `false` |\n| `maven.terminal.useJavaHome` | If this value is true, and if the setting java.home has a value, then the environment variable JAVA_HOME will be set to the value of java.home when a new terminal window is created. | `false` |\n| `maven.terminal.customEnv` | Specifies an array of environment variable names and values. These environment variable values will be added before Maven is executed. \u003cbr /\u003e `environmentVariable`: Name of the environment variable to set. \u003cbr /\u003e `value`: Value of the environment variable to set. | `[]` |\n| `maven.terminal.favorites` | Specify pre-defined favorite commands to execute. \u003cbr /\u003e `alias`: A short name for the command. \u003cbr /\u003e `command`: Content of the favorite command. | `[]` |\n| `maven.view` | Specifies the way of viewing Maven projects. Possible values: `flat`, `hierarchical`. | `flat` |\n| `maven.settingsFile` | Specifies the absolute path of Maven `settings.xml` file. If not specified, `~/.m2/settings.xml` is used. | `null` |\n| `maven.showInExplorerContextMenu` | If this value is true, add a command to create Maven Projects in the Explorer context menu for folders. | `true` |\n\n## Data/Telemetry\n\nVS Code collects usage data and sends it to Microsoft to help improve our products and services. Read our [privacy statement](http://go.microsoft.com/fwlink/?LinkId=521839) to learn more. If you don’t wish to send usage data to Microsoft, you can set the `telemetry.enableTelemetry` setting to `false`. Learn more in our [FAQ](https://code.visualstudio.com/docs/supporting/faq#_how-to-disable-telemetry-reporting).\n\n## Contributing\n\nThis project has adopted the [Microsoft Open Source Code of Conduct](https://opensource.microsoft.com/codeofconduct/). For more information see the [Code of Conduct FAQ](https://opensource.microsoft.com/codeofconduct/faq/) or contact [opencode@microsoft.com](mailto:opencode@microsoft.com) with any additional questions or comments.\n\n## Release Notes\n\nRefer to [CHANGELOG](CHANGELOG.md)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fvscode-maven","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmicrosoft%2Fvscode-maven","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmicrosoft%2Fvscode-maven/lists"}