首页 文章

通过Maven添加DB2 JDBC驱动程序

提问于
浏览
1

我试图通过JDBC驱动程序连接到DB2数据库 . 我在我的pom.xml中添加了以下条目

<!-- https://mvnrepository.com/artifact/com.ibm.db2/db2jcc_license_cu -->
<dependency>
    <groupId>com.ibm.db2</groupId>
    <artifactId>db2jcc_license_cu</artifactId>
    <version>9.7</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.ibm.db2/db2jcc -->
<dependency>
    <groupId>com.ibm.db2</groupId>
    <artifactId>db2jcc</artifactId>
    <version>8.1</version>
</dependency>

<!-- https://mvnrepository.com/artifact/com.ibm.db2.jcc/db2jcc4 -->
<dependency>
    <groupId>com.ibm.db2.jcc</groupId>
    <artifactId>db2jcc4</artifactId>
    <version>10.1</version>
</dependency>

但是maven构建失败了以下问题

[INFO] Downloading from : https://repo.maven.apache.org/maven2/com/ibm/db2/db2jcc_license_cu/9.7/db2jcc_license_cu-9.7.pom
    [WARNING] The POM for com.ibm.db2:db2jcc_license_cu:jar:9.7 is missing, no dependency information available
    [INFO] Downloading from : https://repo.maven.apache.org/maven2/com/ibm/db2/db2jcc/8.1/db2jcc-8.1.pom
    [WARNING] The POM for com.ibm.db2:db2jcc:jar:8.1 is missing, no dependency information available
    [INFO] Downloading from : https://repo.maven.apache.org/maven2/com/ibm/db2/jcc/db2jcc4/10.1/db2jcc4-10.1.pom
    [WARNING] The POM for com.ibm.db2.jcc:db2jcc4:jar:10.1 is missing, no dependency information available
[ERROR] Failed to execute goal on project <somename>: Could not resolve dependencies for project

我应该如何在maven中添加DB2驱动程序的依赖项?

1 回答

相关问题