
You can also specify your favorite commands in settings for future execution.įor each plug-in you use with your project, the extension also provides you an easy way to access the goals within each plugin. You can then select a previous command from history. Right-click a project and select History.In the Command Palette, run Maven: History, then select a project and a command from its history.The extension also preserves the history of goals for each project, so you can quickly rerun the previous command, which is useful when you're running a long custom goal. Execute Maven commands and goalsīy right-clicking each Maven project in the Explorer, you can conveniently run Maven goals. You can also add dependencies through the project view, which calls the same Maven command.įurthermore, VS Code also supports showing dependencies in a tree view, which allows you to inspect all dependencies in your project at a single place and check for potential issues. You can also use the command Maven: Add a Dependency (or ) to help add a new dependency to pom.xml. The extension also enables you to generate effective POM. See how easy it is to add a new dependency to your pom.xml with those convenient features. The extension provides code snippets and auto completion for adding Maven dependencies based on local Maven repositories. You can do this by selecting the Resolve unknown type link shown on hover. The Maven extension also supports searching Maven Central to resolve unknown types in your source code.

Once a Maven project is loaded, the extension will be activated and it will automatically scan for pom.xml files in your workspace and displays all Maven projects and their modules in the side bar.

Install the Extension Pack for Java Exploring Maven project We recommend installing the Extension Pack for Java, which includes Maven support and other important Java development features. The Maven for Java extension for Visual Studio Code provides fully integrated Maven support, allowing you to explore Maven projects, execute Maven commands, and perform the goals of build lifecycle and plugins. Maven is a software tool that helps you manage Java projects and automate application builds. If you run into any issues when using the features below, you can contact us by entering an issue.

It covers the Maven for Java and Gradle for Java extensions as well as other tools. This document is an overview of how to work with your Java build tools in Visual Studio Code. Configure IntelliSense for cross-compiling.
