我按照jHipster网站上列出的指示进行操作 http://jhipster.github.io/creating_an_app.html
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中弹出的引用
<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>
答案 0 :(得分:2)
我认为目前的自动生成器存在一个错误。我能够通过使用jhipster sample project中的插件来解决这个问题。
<plugin>
<groupId>org.springframework.boot</groupId>
<artifactId>spring-boot-maven-plugin</artifactId>
<configuration>
<arguments>
<argument>--spring.profiles.active=prod</argument>
</arguments>
</configuration>
</plugin>
答案 1 :(得分:0)
我只是怀疑你将在你的例子中使用SNAPSHOT。
org.springframework:springloaded:jar:1.2.0.BUILD-SNAPSHOT
你应该用这个:
org.springframework:springloaded:jar:1.2.0.RELEASE
代替。因此,您需要相应地更改pom文件中的版本条目。
答案 2 :(得分:0)
您必须选择文件夹项目:
转到run
→debug configuration
→build maven
→browser workspace
。
最后选择你的项目文件夹。
答案 3 :(得分:0)
当您在jhipster设置阶段选择使用 gradle 时,也会显示相同的消息(有点明显)。 Maven没有抱怨丢失的pom.xml,但却产生了这个模糊的消息。
对于基于gradle的构建,命令是
gradlew bootRun
然后得到一些咖啡,因为它会下载负载!的东西