Roman Stumm created MCOMPILER-199:
-------------------------------------
Summary: Plugin 3.0 does not compile src/main/groovy if neither
src/main/java nor src/main/resources folders exist
Key: MCOMPILER-199
URL: https://jira.codehaus.org/browse/MCOMPILER-199
Project: Maven 2.x Compiler Plugin
Issue Type: Bug
Affects Versions: 3.0
Environment: mac os, jdk 1.6 and jdk 1.7, Apache Maven 3.0.3
(r1075438; 2011-02-28 18:31:09+0100)
Reporter: Roman Stumm
The previous version 2.5.1 compiled the project that only had groovy-sources,
but after switching to version 3.0, the created jar was empty and no sources
had been compiled.
project-layout
pom.xml
src
main
groovy
MyClass.groovy
After adding a dummy-file into src/main/resources, it works.
Example output of mvn -o compile with version 3.0
--------------------------------------------------
[INFO] --- groovy-eclipse-compiler:2.7.0-01:add-groovy-build-paths
(default-add-groovy-build-paths) @ myproject ---
[INFO] Adding /src/main/groovy to the list of source folders
[INFO] Adding /src/test/groovy to the list of test source folders
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ myproject
---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory ./src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:3.0:compile (default-compile) @ myproject ---
[INFO] Nothing to compile - all classes are up to date
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
Example output of mvn -o compile with version 2.5.1
---------------------------------------------------
[INFO] --- groovy-eclipse-compiler:2.7.0-01:add-groovy-build-paths
(default-add-groovy-build-paths) @ myproject ---
[INFO] Adding /src/main/groovy to the list of source folders
[INFO] Adding /src/test/groovy to the list of test source folders
[INFO]
[INFO] --- maven-resources-plugin:2.6:resources (default-resources) @ myproject
---
[INFO] Using 'UTF-8' encoding to copy filtered resources.
[INFO] skip non existing resourceDirectory
/Users/roman.stumm/projects/boxx-super/groovy-boxx/myproject/src/main/resources
[INFO]
[INFO] --- maven-compiler-plugin:2.5.1:compile (default-compile) @ myproject ---
[INFO] Using Groovy-Eclipse compiler to compile both Java and Groovy files
[INFO] Classpath: ....
[INFO] All args: [-cp, .... reading and writing
[11 .class files generated]
[INFO] Compilation complete.
The pom.xml
<properties>
<maven-compiler-version>3.0</maven-compiler-version> <!-- version 2.5.1
works -->
<groovy-compiler-version>2.7.0-01</groovy-compiler-version>
<groovy-eclipse-batch>2.0.4-04</groovy-eclipse-batch>
</properties>
...
<build>
<plugins>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>${maven-compiler-version}</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
<compilerId>groovy-eclipse-compiler</compilerId>
<verbose>true</verbose>
</configuration>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>${groovy-compiler-version}</version>
</dependency>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>${groovy-eclipse-batch}</version>
</dependency>
</dependencies>
</plugin>
<plugin>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-compiler</artifactId>
<version>${groovy-compiler-version}</version>
<extensions>true</extensions>
<dependencies>
<dependency>
<groupId>org.codehaus.groovy</groupId>
<artifactId>groovy-eclipse-batch</artifactId>
<version>${groovy-eclipse-batch}</version>
</dependency>
</dependencies>
</plugin>
...
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators:
https://jira.codehaus.org/secure/ContactAdministrators!default.jspa
For more information on JIRA, see: http://www.atlassian.com/software/jira