vishal munde
vishal munde

Reputation: 343

Can not find where maven local repository path in netbeans 8.0.2 is set

In netbeans when I go to Tools->Options->Java->Maven panel is showing Maven Home: Bundeled Maven Home

But I can not find in Netbeans 8.0.2 that where is the maven local repository path is as it can be seen in Netbeans 7.0.1

Maven local repository in 7.0.1

In my system .m2 folder is located at C:\Users\acs\.m2

But there is another repository at C:\Users\acs\AppData\Roaming\NetBeans\8.0.2\config\Preferences\org\netbeans\modules\maven

Now I have installed apache-maven(which have not installed previously on sysetm) and set the MAVEN HOME path to C:\Users\acs\apache-maven-3.3.9 in netbeans

And then wanted to know that currently at what location netbeans Maven local repository path is. But I am unable to find it in 8.0.2

Does anyone know how to find it?

Upvotes: 4

Views: 11888

Answers (2)

Laiv
Laiv

Reputation: 316

Using external Maven installations, the local repository is (by default) in

${user.home}/.m2/repository

Check out Maven Settings or Maven Mini Guide

You can set another local repository dir path, changing

Global settings

${maven.home}/conf/settings.xml

or

User settings

${user.home}/.m2/settings.xml



<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      https://maven.apache.org/xsd/settings-1.0.0.xsd">
  <localRepository>/any_other_dir/repository</localRepository>
  
  ...
</settings>

If you do so, any project that use this Maven and this global/user settings, will use this repository as local repository.

Upvotes: 5

vishal munde
vishal munde

Reputation: 343

Found the way.

In Project Explorer window within Netbeans you will find services tab.

Goto: services->maven repositories->local->right click->properties

You will get the Local Repository path which netbeans is using.

Upvotes: 5

Related Questions