在基本操作系统上编译/运行grails app 3.2.5时出错

在基本操作系统上编译/运行grails app 3.2.5时出错,grails,Grails,我成功地创建了版本为3.1.10、3.2.0、3.2.3、3.2.4的grails项目 当我使用3.2.5、3.2.6或3.2.7时,我会出现如下错误: Download https://repo.grails.org/grails/core/org/grails/grails-test/3.2.6/grails-test-3.2.6.jar | Error Failed to compile CreateScaffoldController.groovy: startup failed: Cr

我成功地创建了版本为3.1.103.2.03.2.33.2.4的grails项目

当我使用3.2.53.2.63.2.7时,我会出现如下错误:

Download https://repo.grails.org/grails/core/org/grails/grails-test/3.2.6/grails-test-3.2.6.jar
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
 (Use --stacktrace to see the full trace)
| Error Command [compile] error: null (Use --stacktrace to see the full trace)
我的环境:

$ java -version
java version "1.7.0_80"
Java(TM) SE Runtime Environment (build 1.7.0_80-b15)
Java HotSpot(TM) 64-Bit Server VM (build 24.80-b11, mixed mode)
我使用的是sdkdo manager grails版本:

$sdk使用grails 3.x.x

当使用3.2.53.2.63.2.7时,会出现问题

报告所有版本的步骤:

$ sdk use grails 3.x.x
$ grails create-app g3xx
$ cd g3xx
$ grails compile
使用3.2.5

*g325 $ grails compile --stacktrace
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
 (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error

    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy:48)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:44)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
| Error Command [compile] error: null (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NullPointerException
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy:83)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:46)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Command [compile] error: null*
g326 $ grails compile --stacktrace
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
 (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error

    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy:48)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:44)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
| Error Command [compile] error: null (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NullPointerException
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy:83)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:46)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Command [compile] error: null
Unzipping /home/adriano/.gradle/wrapper/dists/gradle-3.4.1-bin/71zneekfcxxu7l9p7nr2sc65s/gradle-3.4.1-bin.zip to /home/adriano/.gradle/wrapper/dists/gradle-3.4.1-bin/71zneekfcxxu7l9p7nr2sc65s
Set executable permissions for: /home/adriano/.gradle/wrapper/dists/gradle-3.4.1-bin/71zneekfcxxu7l9p7nr2sc65s/gradle-3.4.1/bin/gradle

CONFIGURE SUCCESSFUL

Total time: 5 mins 24.911 secs
:compileJava NO-SOURCE
:compileGroovy FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileGroovy'.
> javax/servlet/http/HttpServletRequest

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 13.131 secs
| Error Gradle build terminated with error: javax.servlet.http.HttpServletRequest (Use --stacktrace to see the full trace)
使用3.2.6

*g325 $ grails compile --stacktrace
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
 (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error

    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy:48)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:44)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
| Error Command [compile] error: null (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NullPointerException
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy:83)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:46)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Command [compile] error: null*
g326 $ grails compile --stacktrace
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
 (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error

    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy:48)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:44)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
| Error Command [compile] error: null (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NullPointerException
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy:83)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:46)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Command [compile] error: null
Unzipping /home/adriano/.gradle/wrapper/dists/gradle-3.4.1-bin/71zneekfcxxu7l9p7nr2sc65s/gradle-3.4.1-bin.zip to /home/adriano/.gradle/wrapper/dists/gradle-3.4.1-bin/71zneekfcxxu7l9p7nr2sc65s
Set executable permissions for: /home/adriano/.gradle/wrapper/dists/gradle-3.4.1-bin/71zneekfcxxu7l9p7nr2sc65s/gradle-3.4.1/bin/gradle

CONFIGURE SUCCESSFUL

Total time: 5 mins 24.911 secs
:compileJava NO-SOURCE
:compileGroovy FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileGroovy'.
> javax/servlet/http/HttpServletRequest

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 13.131 secs
| Error Gradle build terminated with error: javax.servlet.http.HttpServletRequest (Use --stacktrace to see the full trace)
使用3.2.7

*g325 $ grails compile --stacktrace
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
 (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error

    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy:48)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:44)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
| Error Command [compile] error: null (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NullPointerException
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy:83)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:46)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Command [compile] error: null*
g326 $ grails compile --stacktrace
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
 (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error

    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy:48)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.readCommandFile(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:44)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Failed to compile CreateScaffoldController.groovy: startup failed:
CreateScaffoldController.groovy: -1: unable to resolve class org.springframework.beans.factory.annotation.Autowired
 @ line -1, column -1.
1 error
| Error Command [compile] error: null (NOTE: Stack trace has been filtered. Use --verbose to see entire trace.)
java.lang.NullPointerException
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy:83)
    at org.grails.cli.profile.commands.factory.GroovyScriptCommandFactory.createCommand(GroovyScriptCommandFactory.groovy)
    at org.grails.cli.profile.commands.factory.ResourceResolvingCommandFactory.findCommands(ResourceResolvingCommandFactory.groovy:46)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy:86)
    at org.grails.cli.profile.commands.CommandRegistry.findCommands(CommandRegistry.groovy)
    at org.grails.cli.profile.AbstractProfile.getCommands(AbstractProfile.groovy:438)
    at org.grails.cli.profile.repository.AbstractJarProfileRepository$JarProfile.getCommands(AbstractJarProfileRepository.groovy:130)
    at org.grails.cli.profile.AbstractProfile.handleCommand(AbstractProfile.groovy:468)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:377)
    at org.grails.cli.GrailsCli.handleCommand(GrailsCli.groovy:350)
    at org.grails.cli.GrailsCli.execute(GrailsCli.groovy:271)
    at org.grails.cli.GrailsCli.main(GrailsCli.groovy:159)
| Error Command [compile] error: null
Unzipping /home/adriano/.gradle/wrapper/dists/gradle-3.4.1-bin/71zneekfcxxu7l9p7nr2sc65s/gradle-3.4.1-bin.zip to /home/adriano/.gradle/wrapper/dists/gradle-3.4.1-bin/71zneekfcxxu7l9p7nr2sc65s
Set executable permissions for: /home/adriano/.gradle/wrapper/dists/gradle-3.4.1-bin/71zneekfcxxu7l9p7nr2sc65s/gradle-3.4.1/bin/gradle

CONFIGURE SUCCESSFUL

Total time: 5 mins 24.911 secs
:compileJava NO-SOURCE
:compileGroovy FAILED

FAILURE: Build failed with an exception.

* What went wrong:
Execution failed for task ':compileGroovy'.
> javax/servlet/http/HttpServletRequest

* Try:
Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.

BUILD FAILED

Total time: 13.131 secs
| Error Gradle build terminated with error: javax.servlet.http.HttpServletRequest (Use --stacktrace to see the full trace)

检查您的依赖项,它们有一些不正确的地方,导致Servlet API和Spring JAR不在编译类路径上。运行
gradle dependencies
将帮助您识别问题。

您可以使用java8吗?谢谢您的评论/帮助。对于j8,同样的问题是:(.
$gradle dependencies
没有返回任何问题。我正在使用sdkman的gradle 3.0。
构建成功的总时间:3.142秒
我认为这是一个环境问题,我有另一台PC,具有相同的操作系统,相同的JAVA版本,工作正常。在删除.m2后,.m2文件夹有任何问题,一切正常。我正在尝试simul解决了这个问题。