build.xml文件中的Maven依赖项无法下载

问题描述 投票:0回答:1

[在具有波纹管目标的build.xml中添加了Maven jar依赖项。

<artifact:dependencies pathId="dependency.classpath">
     <dependency groupId="org.glassfish.metro" artifactId="webservices-rt" version="2.4.3"/>
</artifact:dependencies>

在构建期间低于错误

    [artifact:dependencies] 1) org.glassfish.metro:webservices-rt:jar:2.4.3
[artifact:dependencies] 
[artifact:dependencies]   Try downloading the file manually from the project website.
[artifact:dependencies] 
[artifact:dependencies]   Then, install it using the command: 
[artifact:dependencies]       mvn install:install-file -DgroupId=org.glassfish.metro -DartifactId=webservices-rt -Dversion=2.4.3 -Dpackaging=jar -Dfile=/path/to/file
[artifact:dependencies] 
[artifact:dependencies]   Alternatively, if you host your own repository you can deploy the file there: 
[artifact:dependencies]       mvn deploy:deploy-file -DgroupId=org.glassfish.metro -DartifactId=webservices-rt -Dversion=2.4.3 -Dpackaging=jar -Dfile=/path/to/file -Durl=[url] -DrepositoryId=[id]
[artifact:dependencies] 
[artifact:dependencies]   Path to dependency: 
[artifact:dependencies]     1) org.apache.maven:super-pom:pom:2.0
[artifact:dependencies]     2) org.glassfish.metro:webservices-rt:jar:2.4.3
maven build ant
1个回答
0
投票

[maven-ant-tasks]插件已被放弃了好几年。请注意页面顶部附近的红色大消息:https://maven.apache.org/ant-tasks/

现在失败了,因为Maven Central最近切换到HTTPS,所以maven-ant-tasks尝试使用的默认存储库URL返回401错误。 Apache建议立即使用resolver-ant-tasks https://maven.apache.org/resolver-ant-tasks/

您也可以使用Apache Ivy,或仅使用Ant的<exec>任务来运行mvn可执行文件,就像在命令行中一样。

© www.soinside.com 2019 - 2024. All rights reserved.