Details
-
Bug
-
Status: Closed
-
Minor
-
Resolution: Fixed
-
1.0-beta-5
-
None
-
None
-
eclipse 3.0 M7
Description
It seems that groovy builder uses wrong classpath since it cant' find any jars that are in the workspace.
It works fine if you use envirovment variables instead.
I checked the code and here is the place in GroovyProject.java that I think needs fix...
private void setClassPath(IJavaProject javaProject) throws JavaModelException, Exception {
IWorkspaceRoot root = javaProject.getProject().getWorkspace().getRoot();
IClasspathEntry[] cpEntries = javaProject.getResolvedClasspath(false);
StringBuffer classPath = new StringBuffer();
for (int i = 0; i < cpEntries.length; i++) {
IClasspathEntry entry = cpEntries[i];
if (entry.getEntryKind() == IClasspathEntry.CPE_LIBRARY) {
if(entry.getPath().getDevice()==null)
else
{ classPath.append(entry.getPath().toString() + ";"); } }
}
classPath.append(getOutputPath(javaProject) + ";");
GroovyPlugin.trace("groovy cp = " + classPath.toString());
compiler.setClasspath(classPath.toString());
}
what do you think?