在下载ws4j依赖项时,Maven出现了缺失的pom错误。

huangapple go评论68阅读模式
英文:

Missing pom errror in maven while downloading ws4j dependency

问题

我想在我的项目中使用ws4j。而且我不能一直连接到互联网。因此,大部分时间我使用dependency:get命令将依赖项下载到本地仓库,然后在项目中使用它。
就像我尝试下载ws4j-1.0.1一样。但是在下载时出现了错误。它说缺少edu.cmu.lti:ws4j:jar:1.0.1的POM。但是在仓库中有一个POM文件。请查看链接ws4j仓库。但为什么我会收到错误消息。

我使用的命令是mvn dependency:get -Dartifact=edu.cmu.lti:ws4j:1.0.1

我使用的是Maven 版本3.6.3

请有人帮助解决这个问题。

英文:

I want to use ws4j for my project. And i can't able to connect to the internet all the time. So, most of time i download dependency to local repository using dependency:get command. Then i use it in project.
like that i tried download ws4j-1.0.1. But i get a error while downloading. It says Missing POM for edu.cmu.lti:ws4j:jar:1.0.1. But there is a pom file in the repository. see the url ws4j repository. But why i get the error.

The command i used was mvn dependency:get -Dartifact=edu.cmu.lti:ws4j:1.0.1

The image of the error i get

在下载ws4j依赖项时,Maven出现了缺失的pom错误。

I am using maven version 3.6.3

Please, someone help to solve this issue.

答案1

得分: 1

mvn dependency:get -Dartifact=edu.cmu.lti:ws4j:1.0.1

这个命令试图从 https://repo.maven.apache.org/maven2/ 下载依赖包,由于在该地址未找到依赖包,因此下载失败。
你需要指定参数 "-DremoteRepositories" 以从远程仓库获取它。

例如:mvn dependency:get -Dartifact=org.apache.maven:maven-core:2.2.1:jar:sources -DremoteRepositories=https://repo.maven.apache.org/maven2 -Ddest=/tmp/myfile.jar

请参考 https://maven.apache.org/plugins/maven-dependency-plugin/usage.html

英文:

mvn dependency:get -Dartifact=edu.cmu.lti:ws4j:1.0.1

This tries to download the dependency from https://repo.maven.apache.org/maven2/ and since it does not find the dependency there, it fails.
You need to specify "-DremoteRepositories" to fetch it from a remote repository.

For example: mvn dependency:get -Dartifact=org.apache.maven:maven-core:2.2.1:jar:sources -DremoteRepositories=https://repo.maven.apache.org/maven2 -Ddest=/tmp/myfile.jar

Please refer https://maven.apache.org/plugins/maven-dependency-plugin/usage.html

huangapple
  • 本文由 发表于 2020年8月20日 22:16:13
  • 转载请务必保留本文链接:https://go.coder-hub.com/63507059.html
匿名

发表评论

匿名网友

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen:

确定