Warning: file_get_contents(/data/phpspider/zhask/data//catemap/2/jquery/69.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Spring InteliJ-新导入的maven项目获得;“无法解决”;错误_Spring_Spring Boot_Maven_Intellij Idea_Spring Repositories - Fatal编程技术网

Spring InteliJ-新导入的maven项目获得;“无法解决”;错误

Spring InteliJ-新导入的maven项目获得;“无法解决”;错误,spring,spring-boot,maven,intellij-idea,spring-repositories,Spring,Spring Boot,Maven,Intellij Idea,Spring Repositories,我刚刚开始学习如何使用Spring框架进行开发。我将一个由“”创建的新Java Maven项目导入IntelliJ 我不断地发现这些错误: Cannot resolve org.objenesis:objenesis:2.6 Cannot resolve org.assertj:assertj-core:3.13.2 Cannot resolve org.hamcrest:hamcrest:2.1 Cannot resolve net.bytebuddy:byte-buddy:1.10.8 Ca

我刚刚开始学习如何使用Spring框架进行开发。我将一个由“”创建的新Java Maven项目导入IntelliJ

我不断地发现这些错误:

Cannot resolve org.objenesis:objenesis:2.6
Cannot resolve org.assertj:assertj-core:3.13.2
Cannot resolve org.hamcrest:hamcrest:2.1
Cannot resolve net.bytebuddy:byte-buddy:1.10.8
Cannot resolve net.bytebuddy:byte-buddy-agent:1.10.8
Cannot resolve org.springframework:spring-jcl:5.2.4.RELEASE
Cannot resolve org.springframework:spring-test:5.2.4.RELEASE
Cannot resolve org.xmlunit:xmlunit-core:2.6.3
Cannot resolve org.mockito:mockito-core:3.1.0
Cannot resolve org.mockito:mockito-junit-jupiter:3.1.0
这是我的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 https://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.2.5.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>demo</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>demo</name>
    <description>Demo project for Spring Boot</description>

    <properties>
        <java.version>1.8</java.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>
            <exclusions>
                <exclusion>
                    <groupId>org.junit.vintage</groupId>
                    <artifactId>junit-vintage-engine</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
    </dependencies>

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

</project>

4.0.0
org.springframework.boot
spring启动程序父级
2.2.5.1发布
com.example
演示
0.0.1-快照
演示
SpringBoot的演示项目
1.8
org.springframework.boot
SpringBootStarterWeb
org.springframework.boot
弹簧起动试验
测试
org.junit.vintage
朱尼特老式发动机
org.springframework.boot
springbootmaven插件

有什么问题吗?如何解决它?

首先尝试在普通命令行上构建…@khmarbaise这是什么意思?我是如何做到的?在您的计算机上打开一个控制台并在其中运行您的构建..通过
mvn clean package
…您有自定义的settings.xml吗?或者IntelliJ是否设置为“脱机模式”?(maven工具窗口中“m”旁边的切换按钮)