首先,我将maven 3安装到/path/ to /maven并配置为/path/to/maven/conf/seting.xml,
<localRepository>/path/to/repository</localRepository>然后在Eclipse3.7.2forJavaEE上安装m2eclipse,并在下面配置它,
preferences->maven->
installation->"/path/to/maven"
userSettings->"/path/to/maven/conf/setting.xml"
localRepository->"/path/to/repository"在通过m2eclipse构建索引之后,在/path/to/存储库和/path/to/home/.m2/存储库下面都生成了一个重复的.cache目录,
.cache/
└── [4.0K] m2e
└── [4.0K] 1.2.0
└── ....
├── [ 64M] nexus-maven-repository-index.gz
└── [1.1K] nexus-maven-repository-index.propertiesmvn CLI和m2eclispe (不是并行的),那么对上述索引的副作用是什么?发布于 2012-11-28 02:44:08
有两个存储库是不常见的。m2e和cli都应该指向相同的回购。验证maven的eclipse设置。
发布于 2012-11-28 07:57:54
拥有重复的存储库可能是由格式错误的settings.xml造成的。例如,如果它包含错误(比如一些未关闭的标记),m2eclipse将忽略它,并使用默认值生成一个新的内存中设置模型。
在命令行中,检查mvn help:effective-settings是否正确执行。
缓存的索引仅由m2e使用,因此在使用m2e和maven CLI时不会损坏。
https://stackoverflow.com/questions/13593098
复制相似问题