복붙노트

[SPRING] Maven- 현재 프로젝트와 플러그인 그룹에서 접두어 'spring-boot'에 대한 플러그인이 없습니다.

SPRING

Maven- 현재 프로젝트와 플러그인 그룹에서 접두어 'spring-boot'에 대한 플러그인이 없습니다.

Spring Tools Suite로 빌드 한 springboot 프로젝트를 빌드하려고합니다. $ 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`

Heres 내 pom.xml 플러그인

    <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 플러그인을 시도했는데 오류가 발생하지 않았습니다.

해결법

  1. ==============================

    1.응용 프로그램에 Spring Boot를 사용하고 있다면, 잊어 버리십시오.

    응용 프로그램에 Spring Boot를 사용하고 있다면, 잊어 버리십시오.

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

    이 줄을 놓치지 않고이 문제가 발생할 수 있습니다.

    <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>
    
  2. ==============================

    2.당신이

    당신이

    mvn spring-boot:run
    

    명령 줄에서 pom.xml 파일이 들어있는 디렉토리에 있는지 확인하십시오. 그렇지 않으면 현재 프로젝트 및 플러그인 그룹 오류에서 접두어 'spring-boot'에 대해 발견 된 No 플러그인으로 실행됩니다.

  3. ==============================

    3.pom에 다음을 추가하고 컴파일을 시도 할 수 있습니다.

    pom에 다음을 추가하고 컴파일을 시도 할 수 있습니다.

       <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>
    
  4. ==============================

    4.빌드에 spring-boot-maven-plugin을 추가하면 제 경우에 해결되었습니다.

    빌드에 spring-boot-maven-plugin을 추가하면 제 경우에 해결되었습니다.

    <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>  
    
  5. ==============================

    5.pom.xml 파일이있는 폴더에서 $ mvn spring-boot :를 실행하고이 응답을 참조하십시오. https://stackoverflow.com/a/33602837/4918021

    pom.xml 파일이있는 폴더에서 $ mvn spring-boot :를 실행하고이 응답을 참조하십시오. https://stackoverflow.com/a/33602837/4918021

  6. ==============================

    6.mvn spring-boot : run 명령을 사용할 때 디렉토리에 pom.xml이 있는지 확인하십시오. pom.xml 파일에 아무 것도 추가 할 필요가 없습니다.

    mvn spring-boot : run 명령을 사용할 때 디렉토리에 pom.xml이 있는지 확인하십시오. pom.xml 파일에 아무 것도 추가 할 필요가 없습니다.

  7. ==============================

    7.필자의 경우, 필자의 maven 변수 환경은 M2_HOME이었고, MAVEN_HOME으로 변경되어 일했습니다.

    필자의 경우, 필자의 maven 변수 환경은 M2_HOME이었고, MAVEN_HOME으로 변경되어 일했습니다.

    Tnx.

  8. from https://stackoverflow.com/questions/30855864/maven-no-plugin-found-for-prefix-spring-boot-in-the-current-project-and-in-th by cc-by-sa and MIT license