我在使用'pom.xml'spring-boot时遇到一些问题

问题描述 投票:0回答:1

像我的标题一样,我的spring-boot项目遇到一些问题。

我的错误消息:

Project build error: Non-resolvable parent POM for com.ta:TestAutomation:0.0.1-SNAPSHOT:
Failure to transfer org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from http://repo.spring.io/plugins-release/ was cached in the local repository, 
resolution will not be reattempted until the update interval of Spring Plugins has elapsed or updates are forced. 
Original error: Could not transfer artifact org.springframework.boot:spring-boot-starter-parent:pom:2.0.4.RELEASE from/to Spring Plugins (http://repo.spring.io/plugins-release/): 
Access denied to http://repo.spring.io/plugins-release/org/springframework/boot/spring-boot-starter-parent/2.0.4.RELEASE/spring-boot-starter-parent-2.0.4.RELEASE.pom. 
Error code 403, Forbidden and 'parent.relativePath' points at no local POM

还有我的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.ta</groupId>
    <artifactId>TestAutomation</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <packaging>war</packaging>

    <name>TestAutomation</name>
    <description>Test-automation project by BAEK SEUNGJIN</description>

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.0.4.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>
        <tiles.version>3.0.7</tiles.version>
    </properties>

    <repositories>
        <repository>
            <id>Spring Plugins</id>
            <url>http://repo.spring.io/plugins-release/</url>
        </repository>
    </repositories>

    <dependencies>


        <!-- spring base -->
        <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>org.springframework.boot</groupId>
            <artifactId>spring-boot-configuration-processor</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-devtools</artifactId>
            <optional>true</optional>
        </dependency>


        <!-- Tiles -->
        <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-jsp</artifactId>
            <version>${tiles.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.tiles</groupId>
            <artifactId>tiles-extras</artifactId>
            <version>${tiles.version}</version>
            <exclusions>
                <exclusion>
                    <groupId>org.apache.velocity</groupId>
                    <artifactId>velocity</artifactId>
                </exclusion>
                <exclusion>
                    <groupId>jboss</groupId>
                    <artifactId>javassist</artifactId>
                </exclusion>
            </exclusions>
        </dependency>

        <!-- jstl, jasper -->
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>jstl</artifactId>
        </dependency>
        <dependency>
            <groupId>org.apache.tomcat.embed</groupId>
            <artifactId>tomcat-embed-jasper</artifactId>
        </dependency>


        <!-- mybatis - jdbc - oracle -->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-jdbc</artifactId>
        </dependency>
        <dependency>
            <groupId>org.mybatis.spring.boot</groupId>
            <artifactId>mybatis-spring-boot-starter</artifactId>
            <version>1.1.1</version>
        </dependency>
        <dependency>
            <groupId>org.mybatis</groupId>
            <artifactId>mybatis-spring</artifactId>
            <version>1.3.0</version>
        </dependency>
        <dependency>
            <groupId>com.oracle</groupId>
            <artifactId>ojdbc6</artifactId>
            <version>11.2.0.3</version>
        </dependency>

        <!-- log4jdbc -->
        <dependency>
            <groupId>org.bgee.log4jdbc-log4j2</groupId>
            <artifactId>log4jdbc-log4j2-jdbc4.1</artifactId>
            <version>1.16</version>
        </dependency>

        <!-- selenium -->
        <dependency>
            <groupId>org.seleniumhq.selenium</groupId>
            <artifactId>selenium-java</artifactId>
        </dependency>

        <!-- guava -->
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <version>27.1-jre</version>
        </dependency>

        <!-- Quartz scheduler -->
        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz</artifactId>
        </dependency>

        <dependency>
            <groupId>org.quartz-scheduler</groupId>
            <artifactId>quartz-jobs</artifactId>
        </dependency>    
    </dependencies>

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

</project>

我不明白...这些错误发生了...刚刚发生。

去年,没有任何问题。

此项目正在真实服务器中运行项目。我必须做一些更新,但由于这个原因不能做。

有人知道解决方案吗?谢谢。

spring-boot maven pom.xml
1个回答
0
投票

类似防火墙问题。该文件已存在,除非您出于某种原因而被列入黑名单,否则Spring Maven存储库没有理由拒绝您对其的访问。

首先检查您要在其上运行构建版本的计算机是否已连接到Internet,以及是否有防火墙阻止来往于此的流量。

最有可能是您的问题。

© www.soinside.com 2019 - 2024. All rights reserved.