axis2 maven报错Could not find artifact org.apache.axis2:axis2:jar:1.7.9

发布时间 2023-06-11 11:53:12作者: lll888

Could not find artifact org.apache.axis2:axis2:jar:1.8.2 in aliyunmaven (https://maven.aliyun.com/repository/public/)

一开始以为是镜像的问题,但是换成中央仓库也没用

实际上,这个目录里确实没有jar,只有pom

原因是apache改变了axis2的打包方式,不再提供axis2.jar,这个项目只作为父项目使用

你应该依赖具体的子项目,比如axis2-jaxws

<dependency>
      <groupId>org.apache.axis2</groupId>
      <artifactId>axis2-jaxws</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>