Java教程

Plugin ‘org.springframework.boot:spring-boot-maven-plugin:‘ not found

本文主要是介绍Plugin ‘org.springframework.boot:spring-boot-maven-plugin:‘ not found,对大家解决编程问题具有一定的参考价值,需要的程序猿们随着小编来一起学习吧!

Plugin ‘org.springframework.boot:spring-boot-maven-plugin:’ not found报错解决方法:

我自己的代码:

 <dependencies>
<!--        web场景启动器-->
        <dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-starter-web</artifactId>
        </dependency>

        <!-- springboot单元测试 -->
        <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>

    <build>
        <plugins>

            <!-- 打包插件 -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>

许多文章里面说到如下这种解决方式:

往里面添加

<version>2.2.6.RELEASE</version>
                <executions>
                    <execution>
                        <goals>
                            <goal>repackage</goal>
                        </goals>
                    </execution>
                </executions>

img

我用了这种方式后发现没用,不过有些小伙伴应该有用。如果没用可以尝试我下面这一种。

然后呢,emmm,依然是没能解决spring-boot-maven-plugin not found的问题,Re import也不起作用,很是郁闷。

最后去继续找资料,然后看到一篇博主写的。去maven中央仓库里翻到了最新版本的jar包依赖:

https://mvnrepository.com/artifact/org.springframework.boot/spring-boot-maven-plugin

<dependency>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <version>2.4.0</version>
        </dependency>

添加到依赖里,再Re import就可以了,至此解决问题!

最后你的问题就解决了哦

这篇关于Plugin ‘org.springframework.boot:spring-boot-maven-plugin:‘ not found的文章就介绍到这儿,希望我们推荐的文章对大家有所帮助,也希望大家多多支持为之网!