Details
-
Type:
Bug
-
Status:
Closed
-
Priority:
Critical
-
Resolution: Fixed
-
Affects Version/s: 1.5.4, 1.5.5, 1.6-beta-1
-
Fix Version/s: 1.5.6, 1.6-beta-1
-
Component/s: None
-
Labels:None
-
Environment:cartesian join of [1.5.4, svn trunk] [windows, ubuntu]
-
Number of attachments :
Description
The -j option on the command line for groovy fails.
The attached patch fixes it in svn trunk. I'll let this bug set a few days for comments and then commit the patch to trunk and branches/GROOVY_1_5_X unless there is objection.
C:\temp>groovyc -j Foo.java Bar.groovy
org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, Compile error during compilation with javac.
C:\DOCUME~1\DANNO~1.FER\LOCALS~1\Temp\groovy-generated-46386-java-source\joint\Bar.java:3: package groovy.util does not exist
import groovy.util.*;
^
C:\DOCUME~1\DANNO~1.FER\LOCALS~1\Temp\groovy-generated-46386-java-source\joint\Bar.java:7: package groovy.lang does not exist
import groovy.lang.*;
^
C:\DOCUME~1\DANNO~1.FER\LOCALS~1\Temp\groovy-generated-46386-java-source\joint\Bar.java:12: package groovy.lang does not exist
groovy.lang.GroovyObject {
^
C:\DOCUME~1\DANNO~1.FER\LOCALS~1\Temp\groovy-generated-46386-java-source\joint\Bar.java:13: package groovy.lang does not exist
groovy.lang.MetaClass metaClass;
^
C:\DOCUME~1\DANNO~1.FER\LOCALS~1\Temp\groovy-generated-46386-java-source\joint\Bar.java:15: package groovy.lang does not exist
public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;}
^
C:\DOCUME~1\DANNO~1.FER\LOCALS~1\Temp\groovy-generated-46386-java-source\joint\Bar.java:21: package groovy.lang does not exist
public void setMetaClass(groovy.lang.MetaClass value) { }
^
C:\DOCUME~1\DANNO~1.FER\LOCALS~1\Temp\groovy-generated-46386-java-source\joint\Bar.java:15: package groovy.lang does not exist
public groovy.lang.MetaClass getMetaClass() { return (groovy.lang.MetaClass)null;}
^
7 errors
1 error
Foo.java
package joint;
class Foo {
Bar baz;
}
Bar.groovy
package joint class Bar { String s }
if this is a general problem, then why does it work one time and the other time it does not? I think it is interesting to note, that if Foo is an empty class, that the compilation will not fail then.