[英]How to install library to external maven repository
in your company we are using archiva as our maven repository. 在您的公司中,我们使用archiva作为我们的Maven存储库。 How I can install there some library which is not mavenized remotely ?
我如何在那里安装一些不是远程存储的库? In my local repository I can do something like this:
在我的本地存储库中,我可以执行以下操作:
mvn install:install-file -D groupId=cz.i -D artifactId=sql-processor \
-D version=1.0 -D packaging=jar \
-D file=~/programy/cro/lib/sql-processor.jar
When I want to add some maven project to our archiva, I can run this command: mvn:deploy
. 当我想向我们的架构中添加一些Maven项目时,可以运行以下命令:
mvn:deploy
。 But I have no idea how to install just library there 但是我不知道如何在那里安装库
You're closer than you think - just replace install:install-file
with deploy:deploy-file
and add a bit of sugar, as can be read here : 您比想像中的要近得多-只需将
install:install-file
替换为deploy:deploy-file
并添加一点糖即可,如此处所示 :
mvn deploy:deploy-file -DgroupId=cz.i \
-DartifactId=sql-processor \
-Dversion=1.0 \
-Dpackaging=jar \
-Dfile=~/programy/cro/lib/sql-processor.jar \
-DrepositoryId=<id-to-archiva-map-on-server-section-of-settings.xml> \
-Durl=<your-archiva-URL>
As you - correctly - state, this should only be used for "non-mavenized" external artifacts, otherwise mvn deploy
is the way to go. 正确地说,这仅应用于“未修复”的外部工件,否则,执行
mvn deploy
即可。
Cheers, 干杯,
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.