Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Compile only groovy files #183

Closed
danielburrell opened this issue Jun 21, 2016 · 1 comment
Closed

Compile only groovy files #183

danielburrell opened this issue Jun 21, 2016 · 1 comment

Comments

@danielburrell
Copy link

danielburrell commented Jun 21, 2016

Is it possible for groovy-eclipse-compiler to compile just groovy code rather than both java and groovy?

I want the regular java compiler to be invoked for java (src/main/java, src/test/java), and the groovy-eclipse-compiler used exclusively for anything in src/main/groovy or src/test/groovy. I can't find an example of this on the wiki.
<plugin> <artifactId>maven-compiler-plugin</artifactId> <version>3.5.1</version> <configuration> <compilerId>groovy-eclipse-compiler</compilerId> </configuration> <dependencies> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-eclipse-compiler</artifactId> <version>2.9.1-01</version> </dependency> <!-- for 2.8.0-01 and later you must have an explicit dependency on groovy-eclipse-batch --> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-eclipse-batch</artifactId> <version>2.3.7-01</version> </dependency> </dependencies> </plugin>

@eric-milles
Copy link
Member

Groovy does not compile Java. It delegates this task to javac in a typical command-line or Ant setting and to ecj in an Eclipse or maven setting. If you want total isolation in a maven setting, you should put Java sources in src/main/java and Groovy/Java interdependent sources in src/main/groovy.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants