- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
固定
大家好,我现在可以正常工作了。原来我想念Groovy插件(感谢Peter)。请参阅下面的答案。原始文章留给引用。
我们是新来的grails,所有事物都在发展。我已经尝试过使用gradle来构建grails应用程序的最简单的情况,但是无论我尝试执行什么命令(具有讽刺意味的是,“createWrapper”有效但没有帮助)都得到了:
$ gradle testDynamic properties are deprecated: http://gradle.org/docs/current/dsl/org.gradle.api.plugins.ExtraPropertiesExtension.htmlDeprecated dynamic property: "grailsVersion" on "root project 'IMPACT'", value: "2.0.4".:testFAILURE: Build failed with an exception.* What went wrong:Execution failed for task ':test'.> groovy/lang/GroovyObject* Try:Run with --stacktrace option to get the stack trace. Run with --info or --debug option to get more log output.BUILD FAILEDTotal time: 4.867 secs
It makes no difference which command I use, the output is always the same.
Gradle build.gradle file is as follows:
ext.grailsVersion = '2.0.4'
task createWrapper(type: Wrapper) {
gradleVersion = '1.0'
}
buildscript {
repositories {
maven {
url 'http://repo.grails.org/grails/core/'
}
}
dependencies {
classpath 'org.grails:grails-gradle-plugin:1.1.1-SNAPSHOT',
"org.grails:grails-bootstrap:2.0.4"
}
}
apply plugin: 'groovy'
apply plugin: 'grails'
repositories {
mavenCentral()
maven { url 'http://repo.grails.org/grails/core/' }
maven { url 'http://repo.grails.org/grails/plugins/' }
}
dependencies {
compile "org.grails:grails:2.0.4",
"org.grails:grails-core:2.0.4",
"org.grails:grails-hibernate:2.0.4",
"org.grails:grails-logging:2.0.4",
"org.grails:grails-plugin-controllers:2.0.4",
"org.grails:grails-plugin-services:2.0.4",
"org.grails:grails-plugin-domain-class:2.0.4",
"org.grails:grails-plugin-datasource:2.0.4",
"org.grails:grails-plugin-i18n:2.0.4",
"org.grails:grails-spring:2.0.4",
"org.grails.plugins:spring-security-core:1.2.7.3",
"org.grails.plugins:spring-security-ldap:1.0.6"
}
> $ gradle --stacktrace test :test> > FAILURE: Build failed with an exception.> > * What went wrong: Execution failed for task ':test'.> > groovy/lang/GroovyObject> > * Try: Run with --info or --debug option to get more log output.> > * Exception is:> > org.gradle.api.tasks.TaskExecutionException: Execution failed for task> ':test'. at> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:68)> at> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.execute(ExecuteActionsTaskExecuter.java:46)> at> org.gradle.api.internal.tasks.execution.PostExecutionAnalysisTaskExecuter.execute(PostExecutionAnalysisTaskExecuter.java:34)> at> org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter$1.run(CacheLockHandlingTaskExecuter.java:34)> at> org.gradle.cache.internal.DefaultCacheAccess$2.create(DefaultCacheAccess.java:200)> at> org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:172)> at> org.gradle.cache.internal.DefaultCacheAccess.longRunningOperation(DefaultCacheAccess.java:198)> at> org.gradle.cache.internal.DefaultPersistentDirectoryStore.longRunningOperation(DefaultPersistentDirectoryStore.java:111)> at> org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.longRunningOperation(DefaultTaskArtifactStateCacheAccess.java:83)> at> org.gradle.api.internal.changedetection.CacheLockHandlingTaskExecuter.execute(CacheLockHandlingTaskExecuter.java:32)> at> org.gradle.api.internal.tasks.execution.SkipUpToDateTaskExecuter.execute(SkipUpToDateTaskExecuter.java:55)> at> org.gradle.api.internal.tasks.execution.ValidatingTaskExecuter.execute(ValidatingTaskExecuter.java:57)> at> org.gradle.api.internal.tasks.execution.SkipEmptySourceFilesTaskExecuter.execute(SkipEmptySourceFilesTaskExecuter.java:41)> at> org.gradle.api.internal.tasks.execution.SkipTaskWithNoActionsExecuter.execute(SkipTaskWithNoActionsExecuter.java:51)> at> org.gradle.api.internal.tasks.execution.SkipOnlyIfTaskExecuter.execute(SkipOnlyIfTaskExecuter.java:52)> at> org.gradle.api.internal.tasks.execution.ExecuteAtMostOnceTaskExecuter.execute(ExecuteAtMostOnceTaskExecuter.java:42)> at> org.gradle.api.internal.AbstractTask.executeWithoutThrowingTaskFailure(AbstractTask.java:247)> at> org.gradle.execution.DefaultTaskGraphExecuter.executeTask(DefaultTaskGraphExecuter.java:192)> at> org.gradle.execution.DefaultTaskGraphExecuter.doExecute(DefaultTaskGraphExecuter.java:177)> at> org.gradle.execution.DefaultTaskGraphExecuter.execute(DefaultTaskGraphExecuter.java:83)> at> org.gradle.execution.SelectedTaskExecutionAction.execute(SelectedTaskExecutionAction.java:36)> at> org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)> at> org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)> at> org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)> at> org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter$1.run(TaskCacheLockHandlingBuildExecuter.java:31)> at> org.gradle.cache.internal.DefaultCacheAccess$1.create(DefaultCacheAccess.java:111)> at> org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:126)> at> org.gradle.cache.internal.DefaultCacheAccess.useCache(DefaultCacheAccess.java:109)> at> org.gradle.cache.internal.DefaultPersistentDirectoryStore.useCache(DefaultPersistentDirectoryStore.java:103)> at> org.gradle.api.internal.changedetection.DefaultTaskArtifactStateCacheAccess.useCache(DefaultTaskArtifactStateCacheAccess.java:79)> at> org.gradle.api.internal.changedetection.TaskCacheLockHandlingBuildExecuter.execute(TaskCacheLockHandlingBuildExecuter.java:29)> at> org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)> at> org.gradle.execution.DefaultBuildExecuter.access$200(DefaultBuildExecuter.java:23)> at> org.gradle.execution.DefaultBuildExecuter$2.proceed(DefaultBuildExecuter.java:67)> at> org.gradle.execution.DryRunBuildExecutionAction.execute(DryRunBuildExecutionAction.java:32)> at> org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:61)> at> org.gradle.execution.DefaultBuildExecuter.execute(DefaultBuildExecuter.java:54)> at> org.gradle.initialization.DefaultGradleLauncher.doBuildStages(DefaultGradleLauncher.java:155)> at> org.gradle.initialization.DefaultGradleLauncher.doBuild(DefaultGradleLauncher.java:110)> at> org.gradle.initialization.DefaultGradleLauncher.run(DefaultGradleLauncher.java:78)> at> org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:42)> at> org.gradle.launcher.cli.RunBuildAction.execute(RunBuildAction.java:28)> at> org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:201)> at> org.gradle.launcher.cli.CommandLineActionFactory$ParseAndBuildAction.execute(CommandLineActionFactory.java:174)> at> org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:170)> at> org.gradle.launcher.cli.CommandLineActionFactory$WithLogging.execute(CommandLineActionFactory.java:139)> at> org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:31)> at> org.gradle.launcher.exec.ExceptionReportingAction.execute(ExceptionReportingAction.java:20)> at org.gradle.launcher.Main.doAction(Main.java:48) at> org.gradle.launcher.exec.EntryPoint.run(EntryPoint.java:45) at> org.gradle.launcher.Main.main(Main.java:39) at> org.gradle.launcher.ProcessBootstrap.runNoExit(ProcessBootstrap.java:50)> at org.gradle.launcher.ProcessBootstrap.run(ProcessBootstrap.java:32)> at org.gradle.launcher.GradleMain.main(GradleMain.java:24) Caused by:> java.lang.NoClassDefFoundError: groovy/lang/GroovyObject at> org.grails.launcher.RootLoader.oldFindClass(RootLoader.java:143) at> org.grails.launcher.RootLoader.loadClass(RootLoader.java:115) at> org.grails.launcher.GrailsLauncher.(GrailsLauncher.java:70) at> org.grails.gradle.plugin.GrailsTask.createLauncher(GrailsTask.groovy:107)> at> org.grails.gradle.plugin.GrailsTask.executeCommand(GrailsTask.groovy:56)> at> org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:196)> at> org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:102)> at> org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:99)> at org.grails.gradle.plugin.GrailsTask_Decorated.invokeMethod(Unknown> Source) at> org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23) at> org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$4.execute(AnnotationProcessingTaskFactory.java:150)> at> org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$4.execute(AnnotationProcessingTaskFactory.java:145)> at> org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:477)> at> org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:466)> at> org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:60)> ... 53 more Caused by: java.lang.ClassNotFoundException:> groovy.lang.GroovyObject at> org.grails.launcher.RootLoader.findClass(RootLoader.java:147) at> org.grails.launcher.RootLoader.loadClass(RootLoader.java:119) ... 68> more> > > BUILD FAILED> > Total time: 5.534 secs
Any pointers or comments greatly appreciated.
Snippet from --debug output:
09:17:15.191 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.NoClassDefFoundError: groovy/lang/GroovyObject
09:17:15.191 [ERROR] [org.gradle.BuildExceptionReporter] at org.grails.launcher.RootLoader.oldFindClass(RootLoader.java:143)
09:17:15.192 [ERROR] [org.gradle.BuildExceptionReporter] at org.grails.launcher.RootLoader.loadClass(RootLoader.java:115)
09:17:15.192 [ERROR] [org.gradle.BuildExceptionReporter] at org.grails.launcher.GrailsLauncher.<init>(GrailsLauncher.java:70)
09:17:15.192 [ERROR] [org.gradle.BuildExceptionReporter] at org.grails.gradle.plugin.GrailsTask.createLauncher(GrailsTask.groovy:107)
09:17:15.192 [ERROR] [org.gradle.BuildExceptionReporter] at org.grails.gradle.plugin.GrailsTask.executeCommand(GrailsTask.groovy:56)
09:17:15.192 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.BeanDynamicObject$MetaClassAdapter.invokeMethod(BeanDynamicObject.java:196)
09:17:15.193 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.BeanDynamicObject.invokeMethod(BeanDynamicObject.java:102)
09:17:15.193 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.CompositeDynamicObject.invokeMethod(CompositeDynamicObject.java:99)
09:17:15.193 [ERROR] [org.gradle.BuildExceptionReporter] at org.grails.gradle.plugin.GrailsTask_Decorated.invokeMethod(Unknown Source)
09:17:15.193 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.util.ReflectionUtil.invoke(ReflectionUtil.groovy:23)
09:17:15.193 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$4.execute(AnnotationProcessingTaskFactory.java:150)
09:17:15.193 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.project.taskfactory.AnnotationProcessingTaskFactory$4.execute(AnnotationProcessingTaskFactory.java:145)
09:17:15.193 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:477)
09:17:15.194 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.AbstractTask$TaskActionWrapper.execute(AbstractTask.java:466)
09:17:15.194 [ERROR] [org.gradle.BuildExceptionReporter] at org.gradle.api.internal.tasks.execution.ExecuteActionsTaskExecuter.executeActions(ExecuteActionsTaskExecuter.java:60)
09:17:15.194 [ERROR] [org.gradle.BuildExceptionReporter] ... 53 more
09:17:15.194 [ERROR] [org.gradle.BuildExceptionReporter] Caused by: java.lang.ClassNotFoundException: groovy.lang.GroovyObject
09:17:15.194 [ERROR] [org.gradle.BuildExceptionReporter] at org.grails.launcher.RootLoader.findClass(RootLoader.java:147)
09:17:15.194 [ERROR] [org.gradle.BuildExceptionReporter] at org.grails.launcher.RootLoader.loadClass(RootLoader.java:119)
09:17:15.194 [ERROR] [org.gradle.BuildExceptionReporter] ... 68 more
09:17:15.194 [ERROR] [org.gradle.BuildExceptionReporter]
09:17:15.195 [LIFECYCLE] [org.gradle.BuildResultLogger]
09:17:15.195 [LIFECYCLE] [org.gradle.BuildResultLogger] BUILD FAILED
最佳答案
坏消息-下面的文件通过运行测试来部分解决了问题,但是在将构建版本打包到WAR中时失败了。我只能假定grails或groovy部分中缺少依赖项。我在底部有一个更简单的工作版本,该版本在本地可用于测试和打包。不幸的是,它仍然不能与最新的Jenkins插件一起使用。
感谢Peter Ledbrook和Peter Niederwieser为您解决我的问题所提供的帮助。
已更正的gradle文件是:以下文件允许测试运行(等级测试),但在打包过程中失败并出现相同的错误(等级 war ):
ext.grailsVersion = '2.0.4'
task createWrapper(type: Wrapper) {
gradleVersion = '1.0'
}
apply plugin: 'groovy'
repositories {
mavenCentral()
}
dependencies {
groovy group: 'org.codehaus.groovy', name: 'groovy-all', version: '1.8.6'
}
buildscript {
repositories {
maven { url {'http://repo.grails.org/grails/core/'} }
}
dependencies {
classpath 'org.grails:grails-gradle-plugin:1.1.1-SNAPSHOT',
"org.grails:grails-bootstrap:2.0.4"
}
}
apply plugin: 'grails'
repositories {
mavenCentral()
maven { url 'http://repo.grails.org/grails/core/' }
maven { url 'http://repo.grails.org/grails/plugins/' }
}
dependencies {
compile "org.grails:grails:2.0.4",
"org.grails:grails-core:2.0.4",
"org.grails:grails-hibernate:2.0.4",
"org.grails:grails-logging:2.0.4",
"org.grails:grails-plugin-controllers:2.0.4",
"org.grails:grails-plugin-services:2.0.4",
"org.grails:grails-plugin-domain-class:2.0.4",
"org.grails:grails-plugin-datasource:2.0.4",
"org.grails:grails-plugin-i18n:2.0.4",
"org.grails:grails-spring:2.0.4",
"org.grails.plugins:spring-security-core:1.2.7.3",
"org.grails.plugins:spring-security-ldap:1.0.6"
}
task createWrapper(type: Wrapper) {
gradleVersion = '1.0'
}
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath 'com.connorgarvey.gradle:gradle-grails-wrapper:1.0'
}
}
apply plugin: 'grails'
grails {
version '2.0.4'
}
关于grails - Gradle Grails总是失败,并带有> groovy/lang/GroovyObject,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11475644/
Closed. This question does not meet Stack Overflow guidelines。它当前不接受答案。 想改善这个问题吗?更新问题,以便将其作为on-topic
我们正在尝试使用 https://grails.org/plugin/jms用于 jms 集成。但我们无法解决它。 环顾四周,我能够验证它是否存在于这个 repo 中: http://repo.gra
我有许多集成测试在grails 3中失败(而在grails 2中通过),因为它无法解析导入: grails.test.MockUtils grails.test.Grails模拟 我找不到有关应如何迁
有没有办法在 Grails 站点上发生 Grails 错误时向自己发送详细信息? 设置它的最佳方法是什么?在一个地方? (试图保持干燥) 我想包括产生错误的 URL。 最佳答案 . 如果您打算捕获项目
我有一个 grails 应用程序,其中包含一些被序列化为 JSON 的域对象。在另一个 java/groovy 项目中,我想使用这些域对象。如果我发布一个插件,看起来只有其他 grails 应用程序可
我正在尝试为 Grails 编写一个插件,该插件将根据我们在遗留数据库中设计的特殊 View 自动生成我的域类。我基本上只是想节省一些时间手动编写使域类工作所需的所有映射内容。 我是否可以从自定义 A
我正在尝试编写一个可以在多个 Grails 应用程序中重用的插件。该插件基本上应该是 spring security core 的包装器和 ldap 插件。 这意味着它应该包含: 用户/角色的域类 S
我有一个应用程序,我在其中使用 Spring Security 和 grails 旋律。我计划在生产环境中运行 grails melody,但不希望访问者访问它。我应该如何做到这一点?我尝试在 gra
我只是继承了一个现有的应用程序,而我注意到的第一件事是我必须在每个“grails run-app”之前进行“grails clean”操作,否则会出错。创建该项目的人说,他们还有其他几个具有类似设置的
我有一个自定义 toString我的枚举中的方法: enum TaxRate implements Serializable { RATE23(23.0), ... priva
我正在创建一个 Grails 插件作为复杂产品的包装器。该产品对其他产品(如 hibernate)有很多依赖性。问题是,grails 有一些相同的依赖项,但版本不同。 例如。 Grails -> 休眠
当我掉进 grails 服务的兔子洞时,我目前正在将业务逻辑从 Controller 方法转移到服务。我的服务中有以下方法: Job closeJobOpportunity(Job op, Emplo
我只收到默认验证器消息。我究竟做错了什么? class Questao { static hasMany = [alternativas:Alternativa] static constraints
Closed. This question needs to be more focused 。它目前不接受答案。 想改善这个问题吗?更新问题,使其仅通过 editing this post 关注一个
特定版本的 Grails 支持多长时间?一般的 VMWare 支持策略似乎是支持当前版本和一个版本。我无法找到任何关于支持多长时间版本的 Grails 特定信息,通用 VMWare 策略是否适用? 最
我有一个通过 grails 交互模式运行的 grails 应用程序。此应用程序包含服务、tagLibs、gsps 等,但最重要的是它包含 src/groovy 文件夹中的 groovy 文件。 这些
LinkedIn 的人们一直在以一种有趣的方式使用 Play 来处理需要由许多不同组件组成的页面:http://engineering.linkedin.com/play/composable-and
我在 Grails 应用程序中使用 Servlet 3.0 异步渲染。我收到以下错误。 | Error 2014-04-29 11:10:24,125 [Actor Thread 28] ERROR
我看了Controller.groovy源代码,看起来 CRUD 操作不是事务性的(至少是明确的)。 如果我是对的,这是否意味着不应该在生产中按原样使用动态脚手架?有没有办法使它具有事务性(即我可以修
我如何基本上对字符串数据类型字段执行唯一约束。 class User{ String username String Email static hasMany = [roles:Roles
我是一名优秀的程序员,十分优秀!