无法解析依赖关系antlr:antlr:2.7.7

时间:2019-10-31 14:15:25

标签: java maven

我正在为一个学校项目工作,我正在尝试使用Spring Boot与MySql建立连接,但是在我对IntelliJ项目添加依赖项之后,我立即收到此错误antlr:antlr:2.7.7。这是我的pom.xml文件:

    <parent>
        <groupId>org.springframework.boot</groupId>
        <artifactId>spring-boot-starter-parent</artifactId>
        <version>2.1.7.RELEASE</version>
        <relativePath/> <!-- lookup parent from repository -->
    </parent>
    <groupId>com.example</groupId>
    <artifactId>accessing-data-mysql</artifactId>
    <version>0.0.1-SNAPSHOT</version>
    <name>accessing-data-mysql</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-data-jpa</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <dependency>
            <groupId>mysql</groupId>
            <artifactId>mysql-connector-java</artifactId>
            <scope>runtime</scope>
        </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>

1 个答案:

答案 0 :(得分:0)

我会说达菲的话。您将获得这样的层次结构:

enter image description here

如果在生成层次结构时遇到问题,请在构建时共享您的堆栈跟踪,我们可以找到哪个jar要求antlr库。