英文:
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
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
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论