「已注销」 2020-05-16 15:30 采纳率: 0%
浏览 3134

用IDEA创建Maven项目时导入MyBatis依赖错误?【已解决,方案在底部】

pom.xml文件:

<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
         xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>

    <groupId>org.example</groupId>
    <artifactId>untitled</artifactId>
    <version>1.0-SNAPSHOT</version>
    <dependencies>
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-typehandlers-jsr310</artifactId>
            <version>3.4.2</version>
        </dependency>
    </dependencies>
</project>

本地maven的setting.xml文件部分内容:

<localRepository>D:/apache-maven-3.6.3/conf/repository</localRepository>

...
...

  <mirrors>
     <mirror>
        <id>nexus-aliyun</id>
        <mirrorOf>central</mirrorOf>
        <name>Nexus aliyun</name>
        <url>http://maven.aliyun.com/nexus/content/groups/public</url>
     </mirror>
  </mirrors>

本地maven有安装:

图片说明

IDEA的Maven设置项:

图片说明

报错:

Could not transfer artifact org.mybatis:mybatis-typehandlers-jsr310:pom:3.4.2 from/to nexus-aliyun (http://maven.aliyun.com/nexus/content/groups/public">): Illegal character in path at index 51: http://maven.aliyun.com/nexus/content/groups/public">/org/mybatis/mybatis-typehandlers-jsr310/3.4.2/mybatis-typehandlers-jsr310-3.4.2.pom


【解决办法】
直接去阿里云maven仓库官网(https://maven.aliyun.com/mvn/view),搜索并下载所需的mybatis版本,再解压,然后将整个文件夹复制到本地maven的本地仓库。

  • 写回答

2条回答 默认 最新

  • weixin_57101991 2023-02-21 13:30
    关注

    感谢

    评论

报告相同问题?

悬赏问题

  • ¥500 火焰左右视图、视差(基于双目相机)
  • ¥100 set_link_state
  • ¥15 虚幻5 UE美术毛发渲染
  • ¥15 CVRP 图论 物流运输优化
  • ¥15 Tableau online 嵌入ppt失败
  • ¥100 支付宝网页转账系统不识别账号
  • ¥15 基于单片机的靶位控制系统
  • ¥15 真我手机蓝牙传输进度消息被关闭了,怎么打开?(关键词-消息通知)
  • ¥15 装 pytorch 的时候出了好多问题,遇到这种情况怎么处理?
  • ¥20 IOS游览器某宝手机网页版自动立即购买JavaScript脚本