IntelliJ Idea 14 在 grails 应用程序调试时出错
Posted
技术标签:
【中文标题】IntelliJ Idea 14 在 grails 应用程序调试时出错【英文标题】:IntelliJ Idea 14 giving error on grails application debug 【发布时间】:2015-07-05 09:58:51 【问题描述】:在 IntelliJ IDEA 升级到 14.1.2(从 14.1.1)后,我的 Grails 项目开始出现问题,突然我的 Grails 项目停止在调试模式下工作。我认为需要更改配置才能在较新版本中启用调试。
这是我得到的错误。
[INFO] Error stacktraces are turned on.
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD FAILURE
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 1.053 s
[INFO] Finished at: 2015-04-27T10:17:41+05:30
[INFO] Final Memory: 10M/244M
[INFO] ------------------------------------------------------------------------
[ERROR] Could not find goal 'run-app --stacktrace' in plugin org.grails:grails-maven-plugin:2.4.3 among available goals generate-all, exec, package-plugin, maven-war, package, init, maven-functional-test, help, run-app-https, console, create-service, run-app, war, validate, set-version, test-app, clean, list-plugins, maven-compile, generate-controller, maven-clean, generate-views, install-templates, maven-test, create-domain-class, init-plugin, upgrade, config-directories, create-unit-test, create-controller, create-pom, validate-plugin, maven-grails-app-war, run-war, create-script, create-tag-lib, create-integration-test -> [Help 1]
org.apache.maven.plugin.MojoNotFoundException: Could not find goal 'run-app --stacktrace' in plugin org.grails:grails-maven-plugin:2.4.3 among available goals generate-all, exec, package-plugin, maven-war, package, init, maven-functional-test, help, run-app-https, console, create-service, run-app, war, validate, set-version, test-app, clean, list-plugins, maven-compile, generate-controller, maven-clean, generate-views, install-templates, maven-test, create-domain-class, init-plugin, upgrade, config-directories, create-unit-test, create-controller, create-pom, validate-plugin, maven-grails-app-war, run-war, create-script, create-tag-lib, create-integration-test
at org.apache.maven.plugin.internal.DefaultMavenPluginManager.getMojoDescriptor(DefaultMavenPluginManager.java:273)
at org.apache.maven.plugin.DefaultBuildPluginManager.getMojoDescriptor(DefaultBuildPluginManager.java:240)
at org.apache.maven.lifecycle.internal.MojoDescriptorCreator.getMojoDescriptor(MojoDescriptorCreator.java:233)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:106)
at org.apache.maven.lifecycle.internal.DefaultLifecycleTaskSegmentCalculator.calculateTaskSegments(DefaultLifecycleTaskSegmentCalculator.java:86)
at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:85)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:361)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:155)
at org.apache.maven.cli.MavenCli.execute(MavenCli.java:584)
at org.apache.maven.cli.MavenCli.doMain(MavenCli.java:213)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:157)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:606)
at org.codehaus.plexus.classworlds.launcher.Launcher.launchEnhanced(Launcher.java:289)
at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:229)
at org.codehaus.plexus.classworlds.launcher.Launcher.mainWithExitCode(Launcher.java:415)
at org.codehaus.plexus.classworlds.launcher.Launcher.main(Launcher.java:356)
at org.codehaus.classworlds.Launcher.main(Launcher.java:46)
[ERROR]
[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:
【问题讨论】:
我看到了完全相同的行为。 你是否正确包含了 Grails SDK 和 Java JDK .. 也看看这个***.com/a/19778498/1850344 【参考方案1】:这是 IntelliJ 版本 14.1.2 中出现的错误:
https://youtrack.jetbrains.com/issue/IDEA-139568
您可以通过升级到 14.1.3 或更高版本来修复它。
【讨论】:
以上是关于IntelliJ Idea 14 在 grails 应用程序调试时出错的主要内容,如果未能解决你的问题,请参考以下文章
从 Intellij IDEA 开始的慢速 Grails 测试
IntelliJ IDEA 构建不完整的 Grails 战争
在 IntelliJ IDEA 9.0.x 中创建 Grails 应用程序无法提示“create-app”
IntelliJ IDEA 的零覆盖:带有 Spock 单元测试的 Grails
如何在 IntelliJ IDEA Grails 项目中为 groovy 方法获取 javadocs / groovydocs?