Vic*_*usa 39 windows windows-vista windows-7 maven
在Windows中,maven下载C:\Documents And Settings\MyUser\.m2文件夹(或C:\Users\MyUser\.m2)中的所有内容.有一些方法可以更改它使用的文件夹吗?特别我想将它设置为在Documents And Settings/ Users文件夹中的任何位置下载.
Dav*_*vid 71
看看你settings.xml的M2_HOME/conf(见本关于设置M2_HOME环境变量的细节).您可以添加(或取消注释)以下部分:
<!-- localRepository
| The path to the local repository maven will use to store artifacts.
|
| Default: ~/.m2/repository
-->
<localRepository>/path/to/local/repo</localRepository>
Run Code Online (Sandbox Code Playgroud)
正如已经注释掉的部分所暗示的那样.在那里,您应该能够改变路径以达到您想要的效果.
对于Eclipse IDE
如果您使用本地maven作为Eclispe中的M2插件中的Maven安装,那么编辑settings.xml对我来说还不够.该插件仍然使用默认的{user.home} /.m2作为存储库位置.
我必须转到:Windows > Preferences > Maven > User Settings并指向全局设置和/或用户设置输入字段中的本地maven的settings.xml文件.单击"应用"将开始在正确的目标中存储工件.
| 归档时间: |
|
| 查看次数: |
38065 次 |
| 最近记录: |