我对Spring软件包org.springframework:springloaded:jar:2.1.6.RELEASE的搜索为空,所以我正在寻找有关我的构建有何问题的建议。我是Spring的新手,如果这是一个菜鸟错误,请抱歉。
目标是构建一个可以远程调试的简单Spring应用程序。如果我可以完成这项工作,那么我应该可以在更大的应用程序上进行远程调试。
打包应用程序时,通过Maven出现错误Failed to execute goal org.springframework.boot:spring-boot-maven-plugin:1.5.20.RELEASE:repackage (default) on project scott: Execution default of goal org.springframework.boot:spring-boot-maven-plugin:1.5.20.RELEASE:repackage failed: Plugin org.springframework.boot:spring-boot-maven-plugin:1.5.20.RELEASE or one of its dependencies could not be resolved: Could not find artifact org.springframework:springloaded:jar:2.1.6.RELEASE in central
在进行此构建尝试之前,我耗尽了我的仓库的缓存(〜/ .m2)。
这是我的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.ctl.foobar</groupId>
<artifactId>scott</artifactId>
<version>1.0-SNAPSHOT</version>
<packaging>jar</packaging>
<name>Spring Boot Blank Project (from https://github.com/making/spring-boot-blank)</name>
<parent>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-parent</artifactId>
<version>1.5.20.RELEASE</version>
<!-- version>1.2.7.RELEASE</version -->
</parent>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<start-class>scott.App</start-class>
<java.version>1.8</java.version>
<rest.assured.version>2.3.3</rest.assured.version>
</properties>
<dependencies>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-web</artifactId>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-starter-test</artifactId>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.jayway.restassured</groupId>
<artifactId>rest-assured</artifactId>
<version>${rest.assured.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-devtools</artifactId>
<optional>true</optional>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<excludeDevtools>false</excludeDevtools>
</configuration>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>2.1.6.RELEASE</version>
</dependency>
<dependency>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-loader-tools</artifactId>
<version>2.1.6.RELEASE</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<addResources>true</addResources>
<jvmArguments>
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
</jvmArguments>
</configuration>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>2.1.6.RELEASE</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
</project>
我的application.properties是
spring.thymeleaf.cache=false
spring.main.show-banner=false
logging.level.jdbc=OFF
logging.level.jdbc.sqltiming=DEBUG
logging.level.jdbc.resultsettable=DEBUG
spring.devtools.livereload.enabled=false
spring.devtools.restart.enabled=false
spring.devtools.remote.debug.enabled=true
任何建议,评论或评论将不胜感激。
答案 0 :(得分:0)
该死的,Chathuranga Chandrasekara是对的,我回去之后,这两个对pom的更改就建立了
我在依赖项部分添加了
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.8.RELEASE</version>
</dependency>
并将插件部分更改为
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<addResources>true</addResources>
<jvmArguments>
-Xdebug -Xrunjdwp:transport=dt_socket,server=y,suspend=y,address=5005
</jvmArguments>
</configuration>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>springloaded</artifactId>
<version>1.2.8.RELEASE</version>
</dependency>
</dependencies>
</plugin>
第一次尝试我一定错过了一些东西。
谢谢