Maven- No plugin found for prefix 'spring-boot' in the current project and in the plugin groups

后端 未结 11 1999
心在旅途
心在旅途 2020-12-02 14:56

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

Downlo         


        
相关标签:
11条回答
  • 2020-12-02 15:39

    Make sure pom.xml exist in the directory, when using the mvn spring-boot:run command. No need to add any thing in the pom.xml file.

    0 讨论(0)
  • 2020-12-02 15:44

    Adding spring-boot-maven-plugin in the build resolved it in my case

    <build>
        <finalName>mysample-web</finalName>
        <plugins>
        <plugin>
            <groupId>org.springframework.boot</groupId>
            <artifactId>spring-boot-maven-plugin</artifactId>
            <dependencies>
                <dependency>
                    <groupId>org.springframework</groupId>
                    <artifactId>springloaded</artifactId>
                    <version>1.2.1.RELEASE</version>
                </dependency>
            </dependencies>
        </plugin>
        </plugins>
    </build>  
    
    0 讨论(0)
  • 2020-12-02 15:44

    Instead of using the full plugin name (with groupId) like described in Bartosz's answer, you could add

    <pluginGroups>
        <pluginGroup>org.springframework.boot</pluginGroup>
    </pluginGroups>
    

    to your .m2/settings.xml.

    0 讨论(0)
  • 2020-12-02 15:49

    Use mvn spring-boot:run. No mvn sprint-boot:run Error Writing.

    0 讨论(0)
  • 2020-12-02 15:52

    You might want to add the following to your pom and try compiling

       <repositories>
            <repository>
                <id>spring-snapshots</id>
                <url>http://repo.spring.io/libs-snapshot</url>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </repository>
        </repositories>
        <pluginRepositories>
            <pluginRepository>
                <id>spring-snapshots</id>
                <url>http://repo.spring.io/libs-snapshot</url>
                <snapshots>
                    <enabled>true</enabled>
                </snapshots>
            </pluginRepository>
        </pluginRepositories>
    
    0 讨论(0)
提交回复
热议问题