在build.xml中添加了maven-jar依赖项和bellow-target。
<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-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/
您也可以使用ApacheIvy,或者简单地使用Ant的<exec>
任务来运行mvn
可执行文件,就像在命令行中一样。