2.重建索引:
重建maven本地库(Repository)索引index( window->show View->other->Maven->Meven Repositorise点击 OK 然后在视图中 点击localRepositorise右键Rubuild Index)
其实这一步相当于让maven重新对本地的Responsitory中的jar建立索引,以让我们搜索包的时候可以搜索到我们最新安装的jar。
idea:
idea要想能从本地maven库搜索到手动添加的jar,可以settings/maven/repositories/点击对应URL的update按钮
eclipse:
windows/show view/maven repositories/Local Repository 右击进行重新建索引
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
3.安装到指定仓库需要指定-DlocalRepositoryPath:
mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file -Dfile=path-to-your-artifact-jar \
-DgroupId=your.groupId \
-DartifactId=your-artifactId \
-Dversion=version \
-Dpackaging=jar \
-DlocalRepositoryPath=path-to-specific-local-repo
详细见:https://maven.apache.org/plugins/maven-install-plugin/examples/specific-local-repo.html
986



被折叠的 条评论
为什么被折叠?



