I am trying to understand the correct configuration of Java and the Groovy project in Maven by compiling the source files using groovy -eclipse-compiler.
According to the plugin , if you have files in src/main/java and src/test/java , the compiler should find both Java and Groovy by default.
The build setting, as in the example, makes target/classes empty.
<build> ... <plugins> <plugin> <artifactId>maven-compiler-plugin</artifactId> <version>2.3.2</version> <configuration> <compilerId>groovy-eclipse-compiler</compilerId> </configuration> <dependencies> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-eclipse-compiler</artifactId> <version>2.7.0-01</version> </dependency> </dependencies> </plugin> ... </plugins> </build>
The only way I worked with is to use build-helper-maven-plugin . This is an option that is also used in Archetype:
mvn archetype:generate \ -DarchetypeGroupId=org.codehaus.groovy \ -DarchetypeArtifactId=groovy-eclipse-quickstart \ -DarchetypeVersion=2.5.2-SNAPSHOT \ -DgroupId=foo \ -DartifactId=bar \ -Dversion=1 \ -DinteractiveMode=false \ -DarchetypeRepository=https://nexus.codehaus.org/content/repositories/snapshots/
So is this page out of date? Are there few Java files in the src folder?
source share