问题描述
在netbeans中,当我转到工具"->选项"->"Java"->"Maven"面板时Maven主页:捆绑 Maven主页
In netbeans when I go to Tools->Options->Java->Maven panel is showingMaven Home: BundeledMaven Home
但是我在Netbeans 8.0.2中找不到maven本地存储库路径在哪里,就像在Netbeans 7.0.1中可以看到的那样
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
在我的系统中.m2文件夹位于C:\Users\acs\.m2
In my system .m2 folder is located at C:\Users\acs\.m2
但是在C:\Users\acs\AppData\Roaming\NetBeans\8.0.2\config\Preferences\org\netbeans\modules\maven
现在我已经安装了apache-maven(以前尚未在sysetm上安装),并将MAVEN HOME路径设置为netbeans中的C:\ Users \ acs \ apache-maven-3.3.9
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
然后想知道netbeans Maven本地存储库路径当前位于什么位置.但是我无法在8.0.2中找到它
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?
推荐答案
使用外部Maven安装,本地存储库位于(默认情况下)
Using external Maven installations, the local repository is at (by default)
${user.home}/.m2/repository
您还可以设置另一个本地存储库目录路径,更改
You also can set another local repository dir path, changing
全局设置
${maven.home}/conf/settings.xml
或
用户设置
${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>
如果这样做,则使用此Maven和此全局/用户设置的任何项目都将使用此存储库作为本地存储库.
If you do so, any project that use this Maven and this global/user settings, will use this repository as local repository.
这篇关于找不到在NetBeans 8.0.2中设置Maven本地存储库路径的位置的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!