gpt4 book ai didi

java - 我无法推送 - jar :0. 0.1-SNAPSHOT : Could not find artifact org. springframework :spring-test:jar:5. 1.4.BUILD-SNAPSHOT

转载 作者:行者123 更新时间:2023-11-30 05:43:43 24 4
gpt4 key购买 nike

我正在尝试推送我的代码,但出现此错误,并且我不明白我缺少添加什么内容,或者我是否使用了错误的版本。

这是我的错误:

jar:0.0.1-SNAPSHOT: 在 java-net-repo 中找不到 Artifact org.springframework:spring-test:jar:5.1.4.BUILD-SNAPSHOT ( https://maven.java.net/content/repositories/public/ )

这是我的 pom:

<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>2.0.1.RELEASE</version>
<relativePath/> <!-- lookup parent from repository -->
</parent>
<groupId>com.martinrico.berserker_v0</groupId>
<artifactId>berserker_v0</artifactId>
<version>4.1.1.RELEASE</version>
<name>berserker_v0</name>
<description>Demo project for Spring Boot</description>

<properties>
<java.version>1.8</java.version>
<jjwt.version>0.9.0</jjwt.version>
</properties>

<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-data-jpa</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-security</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>

<!-- For Working with Json Web Tokens (JWT) -->
<dependency>
<groupId>io.jsonwebtoken</groupId>
<artifactId>jjwt</artifactId>
<version>${jjwt.version}</version>
</dependency>

<!-- For Java 8 Date/Time Support -->
<dependency>
<groupId>com.fasterxml.jackson.datatype</groupId>
<artifactId>jackson-datatype-jsr310</artifactId>
</dependency>

<dependency>
<groupId>org.springframework.security</groupId>
<artifactId>spring-security-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>

<dependency>
<groupId>mysql</groupId>
<artifactId>mysql-connector-java</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.1.4.BUILD-SNAPSHOT</version>
<scope>compile</scope>
</dependency>

</dependencies>

<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
</plugin>
</plugins>
</build>

如有任何帮助,我们将不胜感激,提前致谢!

最佳答案

这是当前的 SNAPSHOT 依赖项,未发布到 Maven Central:

<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-test</artifactId>
<version>5.1.4.BUILD-SNAPSHOT</version>
<scope>compile</scope>
</dependency>

如果你确实需要这个(请注意每次 Maven 运行期间的变化,因为这是快照的特征),你必须另外使用 Spring 的快照存储库:

<repositories>
<repository>
<id>repository.spring.snapshot</id>
<name>Spring Snapshot Repository</name>
<url>http://repo.spring.io/snapshot</url>
</repository>
</repositories>

另请参阅 repo path itself 中的依赖项.

关于java - 我无法推送 - jar :0. 0.1-SNAPSHOT : Could not find artifact org. springframework :spring-test:jar:5. 1.4.BUILD-SNAPSHOT,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/55210817/

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