|
|
1
2
|
|
|
2
2
我不确定是否有Maven插件来处理这个问题,但是使用 Maven Ant tasks 为此目的。您不需要maven或pom文件,只需要ant和这个构建文件:
使用如下命令行可以实现您想要的操作:
它的灵感来自于 excellent blog post. |
|
|
3
0
你的意思是一种不向 XML ? 因为通过向您的 XML Maven依赖项管理自动从指定的存储库中检索工件,并将其安装到本地存储库。
|
|
|
4
0
我将研究如何将Maven依赖插件与Maven安装插件结合使用。 |
|
|
5
0
我使用下面的shell脚本安装一个commons日志替换,但在这种情况下,我已经准备好了JAR: #! /bin/sh
mvn install:install-file \
-DgroupId=commons-logging \
-DartifactId=commons-logging \
-Dversion=99.0-does-not-exist \
-Dpackaging=jar \
-DcreateChecksum=true \
-DpomFile=commons-logging-99.0-does-not-exist.pom \
-Dfile=commons-logging-99.0-does-not-exist.jar
mvn install:install-file \
-DgroupId=commons-logging \
-DartifactId=commons-logging-api \
-Dversion=99.0-does-not-exist \
-Dpackaging=jar \
-DcreateChecksum=true \
-DpomFile=commons-logging-api-99.0-does-not-exist.pom \
-Dfile=commons-logging-api-99.0-does-not-exist.jar
当你说“本地存储库”时,你的意思是你自己的,作为一个个体,比如说Unix上~/.m2中的那个,还是你的公司存储库?这是一个不同的问题。对于前者,我有点紧张;只需将条目添加到您的pom中即可。对于后者,请检查存储库服务器的文档以了解如何获取Central的副本。 |