- html - 出于某种原因,IE8 对我的 Sass 文件中继承的 html5 CSS 不友好?
- JMeter 在响应断言中使用 span 标签的问题
- html - 在 :hover and :active? 上具有不同效果的 CSS 动画
- html - 相对于居中的 html 内容固定的 CSS 重复背景?
我正在尝试 mvn clean install
一个 maven 项目已经登陆我的盘子,但是我遇到了一个异常,我认为这可能是由于 Groovy 的版本冲突,这就是我得到的:
Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.3:testCompile (default) on project maven-myproject-plugin: Execution default of goal org.codehaus.gmaven:gmaven-plugin:1.3:testCompile failed: A required class was missing while executing org.codehaus.gmaven:gmaven-plugin:1.3:testCompile: groovy/lang/Closure
-e
跟踪旗帜 :
Caused by: java.lang.NoClassDefFoundError: groovy/lang/Closure
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:318)
at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:263)
at org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:957)
at org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:952)
at org.codehaus.groovy.control.ResolveVisitor.checkCyclicInheritence(ResolveVisitor.java:1309)
at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1286)
at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:148)
at org.codehaus.groovy.control.CompilationUnit$6.call(CompilationUnit.java:574)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:814)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:511)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:487)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:464)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:448)
at org.codehaus.gmaven.runtime.v1_7.ClassCompilerFeature$ClassCompilerImpl.compile(ClassCompilerFeature.java:148)
at org.codehaus.gmaven.plugin.compile.AbstractCompileMojo.compile(AbstractCompileMojo.java:200)
at org.codehaus.gmaven.plugin.compile.AbstractCompileMojo.process(AbstractCompileMojo.java:164)
at org.codehaus.gmaven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:60)
at org.codehaus.gmaven.plugin.compile.TestCompileMojo.doExecute(TestCompileMojo.java:90)
at org.codehaus.gmaven.plugin.MojoSupport.execute(MojoSupport.java:69)
at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:101)
... 20 more
Caused by: java.lang.ClassNotFoundException: groovy.lang.Closure
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:696)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:793)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 43 more
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.3</version>
<configuration>
<providerSelection>1.7</providerSelection>
</configuration>
<executions>
<execution>
<goals>
<goal>compile</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<dependencies>
<dependency>
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-1.7</artifactId>
<version>1.3</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.7.5</version>
</dependency>
</dependencies>
</plugin>
groovy-all
的版本和
gmaven-plugin
,并且我还尝试按照
previous SO question 中的建议设置 providerSelection
mvn -version
Apache Maven 3.0.4 (r1232337; 2012-01-17 08:44:56+0000)
Maven home: /Users/JElsey/Development/tools/apache-maven-3.0.4
Java version: 1.6.0_32, vendor: Apple Inc.
Java home: /Library/Java/JavaVirtualMachines/1.6.0_32-b05-420.jdk/Contents/Home
Default locale: en_US, platform encoding: MacRoman
OS name: "mac os x", version: "10.7.4", arch: "x86_64", family: "mac"
[FATAL ERROR] Container realm = plexus.core
urls[0] = file:/Users/JElsey/Development/tools/apache-maven-2.2.1/lib/maven-2.2.1-uber.jar
[INFO] ------------------------------------------------------------------------
[ERROR] FATAL ERROR
[INFO] ------------------------------------------------------------------------
[INFO] groovy/lang/Closure
groovy.lang.Closure
[INFO] ------------------------------------------------------------------------
[INFO] Trace
java.lang.NoClassDefFoundError: groovy/lang/Closure
at java.lang.Class.getDeclaredMethods0(Native Method)
at java.lang.Class.privateGetDeclaredMethods(Class.java:2427)
at java.lang.Class.getDeclaredMethods(Class.java:1791)
at org.codehaus.groovy.vmplugin.v5.Java5.configureClassNode(Java5.java:318)
at org.codehaus.groovy.ast.ClassNode.lazyClassInit(ClassNode.java:263)
at org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:957)
at org.codehaus.groovy.ast.ClassNode.getUnresolvedSuperClass(ClassNode.java:952)
at org.codehaus.groovy.control.ResolveVisitor.checkCyclicInheritence(ResolveVisitor.java:1309)
at org.codehaus.groovy.control.ResolveVisitor.visitClass(ResolveVisitor.java:1286)
at org.codehaus.groovy.control.ResolveVisitor.startResolving(ResolveVisitor.java:148)
at org.codehaus.groovy.control.CompilationUnit$6.call(CompilationUnit.java:574)
at org.codehaus.groovy.control.CompilationUnit.applyToSourceUnits(CompilationUnit.java:814)
at org.codehaus.groovy.control.CompilationUnit.doPhaseOperation(CompilationUnit.java:511)
at org.codehaus.groovy.control.CompilationUnit.processPhaseOperations(CompilationUnit.java:487)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:464)
at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:448)
at org.codehaus.gmaven.runtime.v1_7.ClassCompilerFeature$ClassCompilerImpl.compile(ClassCompilerFeature.java:148)
at org.codehaus.gmaven.plugin.compile.AbstractCompileMojo.compile(AbstractCompileMojo.java:200)
at org.codehaus.gmaven.plugin.compile.AbstractCompileMojo.process(AbstractCompileMojo.java:164)
at org.codehaus.gmaven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:60)
at org.codehaus.gmaven.plugin.compile.TestCompileMojo.doExecute(TestCompileMojo.java:90)
at org.codehaus.gmaven.plugin.MojoSupport.execute(MojoSupport.java:69)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:490)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:694)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:556)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:535)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:387)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:348)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:180)
at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:328)
at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:138)
at org.apache.maven.cli.MavenCli.main(MavenCli.java:362)
at org.apache.maven.cli.compat.CompatibleMain.main(CompatibleMain.java:60)
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
at java.lang.reflect.Method.invoke(Method.java:597)
at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
Caused by: java.lang.ClassNotFoundException: groovy.lang.Closure
at java.net.URLClassLoader$1.run(URLClassLoader.java:202)
at java.security.AccessController.doPrivileged(Native Method)
at java.net.URLClassLoader.findClass(URLClassLoader.java:190)
at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:696)
at groovy.lang.GroovyClassLoader.loadClass(GroovyClassLoader.java:793)
at java.lang.ClassLoader.loadClass(ClassLoader.java:247)
... 41 more
最佳答案
我没有看到您遇到的确切错误,但我发现 Groovy 1.8.7、gmaven-plugin 1.4 和 gmaven-runtime-1.8 是一个成功的组合。请注意,我必须包含 jansi 作为 this bug 的解决方法。在 mvn groovy:shell
.
将 Groovy 1.8.7 添加到您的依赖项中:
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.8.7</version>
</dependency>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.gmaven</groupId>
<artifactId>gmaven-plugin</artifactId>
<version>1.4</version>
<executions>
<execution>
<goals>
<goal>generateStubs</goal>
<goal>compile</goal>
<goal>generateTestStubs</goal>
<goal>testCompile</goal>
</goals>
</execution>
</executions>
<configuration>
<providerSelection>1.8</providerSelection>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.gmaven.runtime</groupId>
<artifactId>gmaven-runtime-1.8</artifactId>
<version>1.4</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-all</artifactId>
<version>1.8.7</version>
</dependency>
<dependency>
<groupId>org.fusesource.jansi</groupId>
<artifactId>jansi</artifactId>
<version>1.9</version>
</dependency>
</dependencies>
</plugin>
</plugins>
</build>
关于maven - 执行 org.codehaus.gmaven :gmaven-plugin:1. 3:testCompile:groovy/lang/Closure 时缺少必需的类,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/11827190/
所以 codehaus 关闭了(显然是在周末):https://www.codehaus.org/ 现在它在这里说“Maven:所有存储库都镜像到 Central,我们的 Nexus 由 Sonaty
我们有一些引用“http://enunciate.codehaus.org/schemas/enunciate-1.27.xsd”的 XML 文件',现在已经消失了。 我正在使用的当前子: https
eclipse 中这个被上帝遗忘的错误不会消失。我已经尝试了这里和其他地方提到的所有东西来摆脱它,但它不会消失,现在我不能在 eclipse 中使用 Web 服务实用程序,因为它提示这个“问题”,这显
我创建了一个服务 公共(public)类 JsonSpiceService 扩展了 SpringAndroidSpiceService{ @Override public Re
我正在使用 Java 11、Spring Boot 2.1.1 和 Apache CXF 3.2.7 公开导入 XSD 架构的 SOAP Web 服务。在 WSDL 中它显示为: 当我发送查询失败
仅当将“-p”添加到 org.codehaus.mojo:exec-maven-plugin:1.6.0:exec 插件时,以下 pom.xml 执行才会失败,删除此参数后它运行正常,但我需要争论,有
本文整理了Java中org.codehaus.xfire.XFireException类的一些代码示例,展示了XFireException类的具体用法。这些代码示例主要来源于Github/Stacko
我正在尝试使用NetBeans构建JavaFX项目,但是当我运行它时,我有一个this: Plugin org.codehaus.mojo:exec-maven-plugin:1.2.1 or one
关闭。这个问题不满足Stack Overflow guidelines .它目前不接受答案。 想改善这个问题吗?更新问题,使其成为 on-topic对于堆栈溢出。 3年前关闭。 Improve thi
本文整理了Java中org.codehaus.stax2.validation.XMLValidationSchema类的一些代码示例,展示了XMLValidationSchema类的具体用法。这些代
本文整理了Java中org.codehaus.stax2.validation.XMLValidator类的一些代码示例,展示了XMLValidator类的具体用法。这些代码示例主要来源于Github
本文整理了Java中org.codehaus.stax2.validation.XMLValidationException类的一些代码示例,展示了XMLValidationException类的具体
本文整理了Java中org.codehaus.xfire.client.XFireProxyFactory类的一些代码示例,展示了XFireProxyFactory类的具体用法。这些代码示例主要来源于
本文整理了Java中org.codehaus.cargo.util.XmlReplacement类的一些代码示例,展示了XmlReplacement类的具体用法。这些代码示例主要来源于Github/S
本文整理了Java中org.codehaus.cargo.util.XmlUtils类的一些代码示例,展示了XmlUtils类的具体用法。这些代码示例主要来源于Github/Stackoverflow
截至今天,我突然在一个我有一段时间没有打开但以前工作的旧项目中遇到错误。 错误:程序类型已经存在:org.codehaus.jackson.JsonParser$1 它随机发生在各种 org.code
如何为对象读取器应用反序列化功能 (FAIL_ON_UNKNOWN_PROPERTIES)?我知道如何为 objectMapper 完成它,但是如何在 codehaus jackson 中的 obje
我从一本书下载的一个项目中有以下 pom.xml... 我收到以下错误, 无法在 http://snapshots.repository.codehaus.org 中找到 org.codehaus.m
本文整理了Java中org.codehaus.enunciate.contract.jaxws.WebMethod类的一些代码示例,展示了WebMethod类的具体用法。这些代码示例主要来源于Gith
本文整理了Java中org.codehaus.xfire.XFireException.()方法的一些代码示例,展示了XFireException.()的具体用法。这些代码示例主要来源于Github/
我是一名优秀的程序员,十分优秀!