首页 文章

使用STS的Spring Boot Maven项目构建错误

提问于
浏览
0

我在STS中创建一个新的Spring启动项目时收到以下错误消息

project build error: Non-resolvable parent POM for com.test:security:1.3.8-SNAPSHOT: Failure to transfer 
 org.springframework.boot:spring-boot-starter-parent:pom:1.3.8.RELEASE from 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. Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:1.3.8.RELEASE 
 from/to central (https://repo.maven.apache.org/maven2): connect timed out and 'parent.relativePath' points at no local POM

的pom.xml

http://maven.apache.org/xsd/maven-4.0.0.xsd"> 4.0.0
**<groupId>com.test</groupId>
<artifactId>security</artifactId>
<version>1.3.8-SNAPSHOT</version>
<packaging>jar</packaging>

        <name>security</name>
        <description>Demo project for Spring Boot</description>

        <parent>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-parent</artifactId>
            <version>1.3.8.RELEASE</version>
            <relativePath/> <!-- lookup parent from repository -->
        </parent>

        <properties>
            <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
            <project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding>
            <java.version>1.8</java.version>
        </properties>

        <dependencies>
            <dependency>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-starter-security</artifactId>
            </dependency>

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

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


    </project>** 

对于每个Spring启动项目,我收到上述错误消息 .

2 回答

相关问题