Groovy Grape imports aren't resolved by Eclipse
Asked Answered
S

3

7

groovy eclipse plugin version: 1.7.5.xx-20101020-1000-e36-release.

import com.jidesoft.swing.JideSplitButton

@Grab(group='com.jidesoft', module='jide-oss', version='[2.2.1,2.3.0)')
public class TestClassAnnotation {
    public static String testMethod () {
        return JideSplitButton.class.name
    }
}

new TestClassAnnotation().testMethod()

the first line error: Groovy:unable to resolve class com.jidesoft.swing.JideSplitButton

it can run as groovy shell, but the error warning is bore

Sizeable answered 21/12, 2010 at 0:47 Comment(0)
I
1

When I compile this in the editor, I get the same error as I do when I compile or run from the command line:

org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed:
General error during conversion: Error grabbing Grapes -- [unresolved dependency: com.jidesoft#jide-oss;[2.2.1,2.3.0): not found]

(and then a very long stack trace)

Is this what you are seeing?

Instauration answered 21/12, 2010 at 17:42 Comment(3)
no, it can compile and run exactly what I need. but the ide waring at the the first line error: Groovy:unable to resolve class com.jidesoft.swing.JideSplitButton.Sizeable
my ide is lastest version of STS, and then groovy pluginSizeable
Well, unfortunately, I can't reproduce the behavior that you are seeing. I'd recommend raising a bug on the issue tracker: jira.codehaus.org/browse/GRECLIPSEInstauration
I
0

I'm rather late to this question, but I wonder if
@Grab(group='com.jidesoft', module='jide-oss', version='[2.2.1,2.3.0)')
shouldn't be
@Grab(group='com.jidesoft', module='jide-oss', version='[2.2.1,2.3.0]')

It looks to me like a syntax error where groovy expects to be passed a list.

Inspiration answered 2/9, 2011 at 18:9 Comment(1)
Isn't that just a quoted version string, where ")" usually excludes the upper range?Heterocyclic
N
0

Try placing @Grab right above the import statement. Just like that:

 @Grab(group='com.jidesoft', module='jide-oss',version='[2.2.1,2.3.0]') 
 import com.jidesoft.swing.JideSplitButton

... your code continues here
Necrology answered 2/5, 2014 at 19:31 Comment(0)

© 2022 - 2024 — McMap. All rights reserved.