Maven-在当前项目和插件组中找不到前缀“spring-boot"的插件 [英] Maven- No plugin found for prefix 'spring-boot' in the current project and in the plugin groups

查看:73
本文介绍了Maven-在当前项目和插件组中找不到前缀“spring-boot"的插件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在尝试构建一个使用 Spring Tools Suite 构建的 springboot 项目.执行 $mvn spring-boot:run

I am trying to build a springboot project I built with Spring Tools Suite. I get the following error when I execute $mvn spring-boot:run

Downloading: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded: https://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 14.0 KB/sec)
Downloaded: https://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (20 KB at 21.8 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 2.032 s
[INFO] Finished at: 2015-06-15T17:46:50-04:00
[INFO] Final Memory: 11M/123M
[INFO] ------------------------------------------------------------------------
[ERROR] No plugin found for prefix 'spring-boot' in the current project and in the plugin groups [org.apache.maven.plugins, org.codehaus.mojo] available from the repositories [local (/Users/admin/.m2/repository), central (https://repo.maven.apache.org/maven2)] -> [Help 1]
[ERROR] 
[ERROR] To see the full stack trace of the errors, re-run Maven with the -e switch.
[ERROR] Re-run Maven using the -X switch to enable full debug logging.
[ERROR] 
[ERROR] For more information about the errors and possible solutions, please read the following articles:
[ERROR] [Help 1]     http://cwiki.apache.org/confluence/display/MAVEN/NoPluginFoundForPrefixException`

这是我的 pom.xml 插件

Heres my pom.xml plugin

    <build>
    <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <configuration>
                <arguments>
                    <argument>--spring.profiles.active=dev</argument>
                </arguments>
            </configuration>
        </plugin>
    </plugins>
</build>

我尝试了上面的 jhipster 插件,但错误没有改变.

I tried the jhipster plugin above and no change in the error.

推荐答案

如果你使用 Spring Boot 做应用,忘记添加

If you are using Spring Boot for application, forgetting to add

<parent>
    <groupId>org.springframework.boot</groupId>
    <artifactId>spring-boot-starter-parent</artifactId>
    <version>1.2.7.RELEASE</version>
 </parent>

可能导致此问题,以及缺少这些行

can cause this issue, as well as missing these lines

<repositories>
    <repository>
        <id>spring-releases</id>
        <url>https://repo.spring.io/libs-release</url>
    </repository>
</repositories>
<pluginRepositories>
    <pluginRepository>
        <id>spring-releases</id>
        <url>https://repo.spring.io/libs-release</url>
    </pluginRepository>
</pluginRepositories>

这篇关于Maven-在当前项目和插件组中找不到前缀“spring-boot"的插件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆