2

我按照 http://jhipster.github.io/creating_an_app.html下 jHipster 网站上列出的说明进行操作

yo jhipster

mvn spring-boot:run

Downloading: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml
Downloading: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml
Downloaded: http://repo.maven.apache.org/maven2/org/apache/maven/plugins/maven-metadata.xml (13 KB at 53.3 KB/sec)
Downloaded: http://repo.maven.apache.org/maven2/org/codehaus/mojo/maven-metadata.xml (22 KB at 93.3 KB/sec)
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.382 s
[INFO] Finished at: 2014-05-03T21:45:53-05:00
[INFO] Final Memory: 8M/81M
[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/jgs/.m2/repository), central (http://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 中 springloaded 的参考

        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-surefire-plugin</artifactId>
            <configuration>
                <argLine>-XX:MaxPermSize=128m -Xmx256m</argLine>
                <forkCount>1</forkCount>
                <reuseForks>false</reuseForks>
                <!-- Force alphabetical order to have a reproducible build -->
                <runOrder>alphabetical</runOrder>
                <classpathDependencyExcludes>
                    <classpathDependencyExclude>org.springsource.loaded:springloaded</classpathDependencyExclude>
                </classpathDependencyExcludes>
            </configuration>
        </plugin>
4

4 回答 4

2

我认为当前的 yeoman 生成器中存在错误。我能够通过使用jhipster 示例项目中的插件来解决这个问题。

                <plugin>
                    <groupId>org.springframework.boot</groupId>
                    <artifactId>spring-boot-maven-plugin</artifactId>
                    <configuration>
                        <arguments>
                            <argument>--spring.profiles.active=prod</argument>
                        </arguments>
                    </configuration>
                </plugin>
于 2014-05-21T15:29:35.943 回答
0

我只是怀疑您是否会按照您的示例中的要求使用 SNAPSHOT。

org.springframework:springloaded:jar:1.2.0.BUILD-SNAPSHOT

你应该使用这个:

org.springframework:springloaded:jar:1.2.0.RELEASE 

反而。因此,您需要相应地更改 pom 文件中的版本条目。

于 2014-05-02T15:49:06.970 回答
0

您必须只选择您的文件夹项目:

转到rundebug configurationbuild mavenbrowser workspace

最后选择您的项目文件夹。

于 2015-06-27T14:26:13.927 回答
0

当您在 jhipster 设置阶段选择使用gradle时,也会显示相同的消息(有点明显)。Maven 并没有抱怨缺少 pom.xml,而是生成了这个晦涩的消息。

对于基于 gradle 的构建,命令是

gradlew bootRun

然后得到一些咖啡因为它会下载负载!的东西

于 2015-07-20T19:12:14.540 回答