Maven依赖插件从远程存储库复制工件
我目前在部署war文件的服务器上安装了archiva远程存储库。我需要将war文件从远程存储库复制到服务器上的目录中。所以我像这样使用了maven依赖插件Maven依赖插件从远程存储库复制工件,maven,Maven,我目前在部署war文件的服务器上安装了archiva远程存储库。我需要将war文件从远程存储库复制到服务器上的目录中。所以我像这样使用了maven依赖插件 mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:copy \ -Dartifact=<groupId>:<artifactId>:<version>:war \ -DoutputDirectory=/home/me/some/directo
mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:copy \
-Dartifact=<groupId>:<artifactId>:<version>:war \
-DoutputDirectory=/home/me/some/directory
一切都正常。我刚刚遇到了一个类似的问题,但是来自Eclipse。也许这对你有帮助
我正在使用复制依赖项
目标
在我的pom中,我必须将远程回购定义为:
<repository>
<id>http://maven.xwiki.org</id>
<url>http://maven.xwiki.org/externals</url>
</repository>
http://maven.xwiki.org
http://maven.xwiki.org/externals
CLI中的Maven警告上述
id
中的“:/”字符,但是如果我将它们删除,Maven从Eclipse中无法找到远程repo中的依赖项。为什么不使用curl处理这些事情?@khmarbaise,因为Maven负责获取最新的快照。最后,我使用插件的get
目标来获取最新的快照,然后使用stat-linux-cmd检查文件是否已在本地repo中更新。如果日期已更改,我将war保存到目录中。
Unable to find artifact.
Could not find artifact <groupId>:<artifactId>:war:<version>
mvn org.apache.maven.plugins:maven-dependency-plugin:2.10:copy \
-Dartifact=junt:junit:4.11:jar \
-DoutputDirectory=/home/me/some/directory
<repository>
<id>http://maven.xwiki.org</id>
<url>http://maven.xwiki.org/externals</url>
</repository>