Warm tip: This article is reproduced from serverfault.com, please click

How can I handle the error about groovy during maven compile?

发布于 2020-11-27 05:36:43

guys.

I have some source codes using groovy. During maven compiling, I have error message like below.

urls[23] = file:/C:/Users/joyoungchan/.m2/repository/org/codehaus/plexus/plexus-compiler-manager/2.8.4/plexus-compiler-manager-2.8.4.jar
urls[24] = file:/C:/Users/joyoungchan/.m2/repository/org/codehaus/plexus/plexus-compiler-javac/2.8.4/plexus-compiler-javac-2.8.4.jar
Number of foreign imports: 1
  import: Entry[import  from realm ClassRealm[maven.api, parent: null]]

  -----------------------------------------------------

at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:169)
... 21 more
Caused by: java.lang.NoClassDefFoundError: Could not initialize class org.codehaus.groovy.vmplugin.v7.Java7
     at org.codehaus.groovy.vmplugin.VMPluginFactory.<clinit>(VMPluginFactory.java:43)
     at org.codehaus.groovy.ast.ClassHelper.makeCached(ClassHelper.java:158)
     at org.codehaus.groovy.ast.ClassHelper.<clinit>(ClassHelper.java:81)

But, I have the library for org.codehaus.groovy.vmplugin.v7.Java7 in classpath.

I carried out the process without any special settings related to maven.

Please let me know solution for this issue. Thank you.

Questioner
이성규
Viewed
0
이성규 2020-11-29 15:23:47

I solved this issue. This issue was caused by sts version. Thank you for your help.