groovy-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Keegan Witt <>
Subject Re: Are GMavenPlus stubs compiled?
Date Tue, 24 Nov 2015 18:29:05 GMT
Yes, the stubs are compiled together with the Java sources so that Javac
has classes for the Groovy sources to compile against.

If I recall correctly, there were some bugs both introduced and fixed in
Groovy's stub generation.  It probably works in IntelliJ because I believe
they use a bundled version of Groovy to do the compilation, whereas
GMavenPlus uses the version of Groovy you declare as a dependency to do the
compilation.  If you are not able to reproduce the problem in Gradle or
Groovyc Ant, then I'm mistaken and it may be a GMavenPlus bug.  If I get
time tonight I'll try to experiment with that version of Groovy and see
whether this seems to be the case.  Otherwise, I'd check the Jira release
notes for fixes to stubs with imports and try a different Groovy version.


On Tue, Nov 24, 2015 at 8:46 AM, Winnebeck, Jason <> wrote:

> Our team just moved from Groovy 2.3.3 to 2.3.5. In our code there was a
> star import that referenced a class in the same package (import X.* instead
> of import*). The project compiles from IntelliJ but not from
> Maven (using gmavenplus-plugin 1.2) – the error actually comes from the
> Java compiler, probably Java always needs fully qualified name.
> OK, so this is probably a minor bug in Groovy, but I’m not worried about
> that as I can fully qualify the import. What I’m wondering is why javac was
> trying to compile this stub in the first place? The class with the import
> is a groovy class and as far as I can tell is only referenced by other
> Groovy files. Is it typical/expected that Maven compiles all of the stubs
> with javac? The fact that the project builds from a clean source from
> IntelliJ suggests it’s not strictly required that javac runs on that stub.
> *Jason Winnebeck*
> *Software Engineer III Contractor - IT Software Development | Windstream*
> 600 Willowbrook Office Park, Rochester, NY 14450
> |
> o: 585.794-4585
> ------------------------------
> This email message and any attachments are for the sole use of the
> intended recipient(s). Any unauthorized review, use, disclosure or
> distribution is prohibited. If you are not the intended recipient, please
> contact the sender by reply email and destroy all copies of the original
> message and any attachments.

View raw message