Could not find artifact com.microsoft.sqlserver:sqljdbc4:jar:4.0 in central

  • 具体错误

    [ERROR] Failed to execute goal on project datalink-resource: Could not resolve dependencies for project com.leon.datalink:datalink-resource:jar:1.0.0: Could not find artifact com.microsoft.sqlserver:sqljdbc4:jar:4.0 in central (https://repo.maven.apache.org/maven2) -> [Help 1]
    [ERROR]
    [ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
    [ERROR] Re-run Maven using the -X switch to enable full debug logging.
    [ERROR]
    [ERROR] For more information about the errors and possible solutions, please read the following articles:
    [ERROR] [Help 1] http://cwiki.apache.org/confluence/display/MAVEN/DependencyResolutionException
    [ERROR]
    [ERROR] After correcting the problems, you can resume the build with the command
    [ERROR] mvn <args> -rf :datalink-resource
    weiyu@ubuntu22:~/work/datalink$

  • 解决办法(推荐)

pom.xml

错误:

复制代码
<dependency>
    <groupId>com.microsoft.sqlserver</groupId>
    <artifactId>sqljdbc4</artifactId>
</dependency>

改成

复制代码
<dependency>
    <groupId>com.microsoft.sqlserver</groupId>
    <artifactId>mssql-jdbc</artifactId>
    <version>12.10.0.jre11</version>
    <scope>compile</scope>
</dependency>
  • 其他解决办法(有问题)

手动下载:

https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc

https://mvnrepository.com/artifact/com.microsoft.sqlserver/mssql-jdbc/8.1.1.jre8

https://github.com/Microsoft/mssql-jdbc

相关推荐
你憨厚的老父亲突然1 分钟前
从码云上拉取项目并在idea配置npm时完整步骤
java·npm·intellij-idea
全栈凯哥14 分钟前
桥接模式(Bridge Pattern)详解
java·设计模式·桥接模式
PXM的算法星球17 分钟前
【软件工程】面向对象编程(OOP)概念详解
java·python·软件工程
两点王爷17 分钟前
springboot项目文件上传到服务器本机,返回访问地址
java·服务器·spring boot·文件上传
小吕学编程20 分钟前
ES练习册
java·前端·elasticsearch
qsmyhsgcs33 分钟前
Java程序员转人工智能入门学习路线图(2025版)
java·人工智能·学习·机器学习·算法工程师·人工智能入门·ai算法工程师
云心似我心^o^4051 小时前
使用POI和EasyExcel使用导入
java
我是大头鸟1 小时前
SpringMVC 使用thymeleaf 进行数据展示
java·springmvc·thymeleaf
小刘|1 小时前
JVM 自动内存管理
java·jvm·算法
2401_837088501 小时前
eclipse怎么导入junit4
java·junit·eclipse