0

Spent a lot of time on this issue. Couldn't find and way to fix this issue on my own. I tried deleting my local repo and reinstall, adding plugin repositories in my pom etc... To my surprise I have another project which uses same spring-boot-maven-plugin 1.2.3 and that project doesn't error out but run fine.

Running mvn spring-boot:run errors out No plugin found for prefix 'spring-boot' in the current project and in the plugin groups

running with mvn -e option shows an exception below

org.apache.maven.plugin.prefix.NoPluginFoundForPrefixException: 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/auhuman/.m2/repository)

But my local repository has this plugin as below.

ls ~/.m2/repository/org/springframework/boot/spring-boot-maven-plugin/1.2.3.RELEASE/

_remote.repositories                    spring-boot-maven-plugin-1.2.3.RELEASE.jar.sha1     spring-boot-maven-plugin-1.2.3.RELEASE.pom.sha1
spring-boot-maven-plugin-1.2.3.RELEASE.jar      spring-boot-maven-plugin-1.2.3.RELEASE.pom
spring-boot-maven-plugin-1.2.3.RELEASE.jar.lastUpdated  spring-boot-maven-plugin-1.2.3.RELEASE.pom.lastUpdated

my pom.xml has

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

<build>
        <plugins>
            <!-- Spring Boot Maven -->
            <plugin>
                <groupId>org.springframework.boot</groupId>
                <artifactId>spring-boot-maven-plugin</artifactId>
            </plugin>
        </plugins>
</build>
auhuman
  • 962
  • 2
  • 13
  • 34

2 Answers2

2

The reason is that you did not run "mvn spring-boot:run" under the directory that contains the pom.xml with spring-boot.

Andrew
  • 784
  • 9
  • 15
0

Can you check if there is a spring-boot folder in /Users/auhuman/.m2/repository/org/springframework/boot?

If not try to run mvn clean install

Maciek
  • 112
  • 4
  • Yes. It is there. ls ~/.m2/repository/org/springframework/boot/ spring-boot spring-boot-starter-cache spring-boot-actuator spring-boot-starter-data-jpa spring-boot-autoconfigure spring-boot-starter-jdbc spring-boot-dependencies spring-boot-starter-logging spring-boot-loader-tools spring-boot-starter-parent spring-boot-maven-plugin spring-boot-starter-test spring-boot-parent spring-boot-starter-tomcat spring-boot-starter spring-boot-starter-web spring-boot-starter-actuator spring-boot-starters spring-boot-starter-amqp spring-boot-tools spring-boot-starter-aop – auhuman May 09 '17 at 18:47