axis2 maven报错Could not find artifact org.apache.axis2:axis2:jar:1.7.9
Could not find artifact org.apache.axis2:axis2:jar:1.8.2 in aliyunmaven (https://maven.aliyun.com/repository/public/)
一开始以为是镜像的问题,但是换成中央仓库也没用
https://repo.maven.apache.org/maven2/org/apache/axis2/axis2/1.7.9/
实际上,这个目录里确实没有jar,只有pom
原因是从1.6开始apache改变了axis2的打包方式,不再提供axis2.jar,这个项目只作为父项目使用
你应该依赖具体的子项目,比如axis2-jaxws等
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-jaxws</artifactId>
<version>1.7.9</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-adb</artifactId>
<version>1.7.9</version>
</dependency>
<dependency>
<groupId>org.apache.axis2</groupId>
<artifactId>axis2-transport-local</artifactId>
<version>1.7.9</version>
</dependency>
如过你一定要依赖这个父项目,用来开发axis2本身,那么应该将type指定为pom避免报错
<dependency> <groupId>org.apache.axis2</groupId> <artifactId>axis2</artifactId> <version>1.7.9</version> <type>pom</type> </dependency>
浙公网安备 33010602011771号