gpt4 book ai didi

java - 无法解析以下 Artifact : javax. sql :jdbc-stdext:jar:2. 0、javax.transaction :jta:jar:1. 0.1B:

转载 作者:太空宇宙 更新时间:2023-11-04 09:31:14 25 4
gpt4 key购买 nike

使用 Maven 构建应用程序时出现以下错误。

The following artifacts could not be resolved: javax.sql:jdbc-stdext:jar:2.0, javax.transaction:jta:jar:1.0.1B: Failure to find javax.sql:jdbc-stdext:jar:2.0 in https://repo.maven.apache.org/maven2 was cached in the local repository, resolution will not be reattempted until the update interval of central has elapsed or updates are forced -> [Help 1]

我尝试在 pom.xml 中包含 javax.sql:jdbc-stdext 。但也不起作用

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>com.dpxpay</groupId>
<artifactId>uTransfercore</artifactId>
<version>0.0.1-SNAPSHOT</version>
<name>uTransfercore</name>
<description>uTransfer_core</description>
<build>
<sourceDirectory>src</sourceDirectory>
<resources>
<resource>
<directory>src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>

</build>
<dependencies>
<!-- https://mvnrepository.com/artifact/commons-beanutils/commons-beanutils -->
<dependency>
<groupId>commons-beanutils</groupId>
<artifactId>commons-beanutils</artifactId>
<version>1.9.0</version>
</dependency>

<!-- https://mvnrepository.com/artifact/jcs/jcs -->
<dependency>
<groupId>jcs</groupId>
<artifactId>jcs</artifactId>
<version>1.3</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-api -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-api</artifactId>
<version>1.7.12</version>
</dependency>

<!-- https://mvnrepository.com/artifact/org.slf4j/slf4j-log4j12 -->
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
<version>1.7.12</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.apache.struts.xwork</groupId>
<artifactId>xwork-core</artifactId>
<version>2.3.35</version>
</dependency>
<!-- https://mvnrepository.com/artifact/org.apache.struts/struts2-core -->
<dependency>
<groupId>org.apache.struts</groupId>
<artifactId>struts2-core</artifactId>
<version>2.3.35</version>
</dependency>

</dependencies>


<packaging>jar</packaging>
</project>

我希望它能够成功运行。但显示错误。

你能指出我做错了什么吗?我是 Maven 新手。提前致谢。

最佳答案

尝试添加mysql-connector的依赖:

        <dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<version>8.0.16</version>
</dependency>

此依赖项用作 jcs:jcs:1.3

的传递依赖项

关于java - 无法解析以下 Artifact : javax. sql :jdbc-stdext:jar:2. 0、javax.transaction :jta:jar:1. 0.1B:,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/57073720/

25 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com