
- MAVEN INSTALL DEPENDENCIES LOCALLY INSTALL
- MAVEN INSTALL DEPENDENCIES LOCALLY FULL
- MAVEN INSTALL DEPENDENCIES LOCALLY WINDOWS
Leave the default option Maven as your build tool and click Next. Select Java Enterprise from the options on the left. Otherwise, select File | New | Project from the main menu. If no project is currently opened in IntelliJ IDEA, click New Project on the welcome screen. The version of Java specified in the pom.xml file overrides the version specified in the JDK for Importer option, located in the Maven settings.Ĭreate a Java EE project with Maven as a build tool IntelliJ IDEA creates a Maven project with the pom.xml file that includes compiler and target versions of Java, dedicated Maven tool window, and all the necessary dependencies to start your work. Also, you can check the archetype properties. If you are creating a project using a Maven archetype, IntelliJ IDEA displays the Maven settings that you can use to set the Maven home directory and Maven repositories. By default, this field is specified automatically.įor more information on Maven coordinates, see Maven naming conventions. On the next page of the wizard, specify the following Maven coordinates that are added to the pom.xml file: Specify project's SDK (JDK) or use the default one and an archetype if you want to use a predefined project template (configure your own archetype by clicking Add Archetype). Select Maven from the options on the left. If no project is currently open in IntelliJ IDEA, click New Project on the Welcome screen.
MAVEN INSTALL DEPENDENCIES LOCALLY INSTALL
If you want to use a custom Maven version that is not bundled with IntelliJ IDEA, you need to install it locally. For more information, refer to the WSL section. You can also create a Maven project and store it in the WSL environment or open it from the WSL file system. You can easily create a new Maven project, open and sync an existing one, add a Maven support to any existing IntelliJ IDEA project, configure and manage a multi-module project. Removes the dependencies without downloading them again.IntelliJ IDEA supports a fully-functional integration with Maven that helps you automate your building process. mvn dependency:purge-local-repository -DreResolve=false
MAVEN INSTALL DEPENDENCIES LOCALLY WINDOWS
Like this on windows Documents and Settings\your username\.m2 or $HOME/.m2 on LinuxĪt least on the current maven version you need to add the switch -DreResolve=false if you intend to remove the dependencies from your local repo without re-downloading them. While there is a maven command you can execute to do this, it's easier to just delete the files manually from the repository. The documentation for manualIncludes (with an s) should be read as well. Note: Older versions of the maven dependency plugin had a manual-purge-local-repository goal, which is now (version 2.8) implied by the use of manualInclude.
MAVEN INSTALL DEPENDENCIES LOCALLY FULL
The full documentation is in the maven-dependency-plugin spec. If you are running with a non-standard cache location, or on multiple platforms, these are more reliable than deleting files "by hand". The documentation implies that this does not remove transitive dependencies by default. For example, from the command line: mvn dependency:purge-local-repository -DmanualInclude="groupId:artifactId. If you want to explicitly remove a single artifact from the cache, use purge-local-repository with the manualInclude parameter.

Also transitive dependencies will be purged (locally) as well, by default.

This should be used as part of a project phase because it applies to the dependencies for the containing project. Optionally, you may re-resolve them from the remote repositories at the same time. The goal purge-local-repository, on the standard Maven dependency plugin, will remove the locally installed dependencies of this project from your cache.

Although deleting files manually works, there is an official way of removing dependencies of your project from your local (cache) repository and optionally re-resolving them from remote repositories.
