[
https://issues.apache.org/jira/browse/MCOMPILER-211?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel
]
Andreas Gudian updated MCOMPILER-211:
-------------------------------------
Fix Version/s: 3.5
> Compiler plugin (3.x) fails in eclipse
> --------------------------------------
>
> Key: MCOMPILER-211
> URL: https://issues.apache.org/jira/browse/MCOMPILER-211
> Project: Maven Compiler Plugin
> Issue Type: Bug
> Environment: Maven-Compiler-Plugin: 3.1 (and maybe 3.0)
> Eclipse tycho compiler: 0.18.1
> Eclipse: Kepler 20130614-0229
> m2e: 1.4.0.20130601-0317
> Reporter: Denis Günther
> Assignee: Andreas Gudian
> Fix For: 3.5
>
>
> Hi there,
> A few days ago we updated our eclipse to the new kepler version (also m2e)
> and decided to raise the maven-compiler-plugin version to the current one
> (3.1). After changing that, everything seemed to work fine, till some
> developers mentioned compile errors in the projects.
> Since m2e only marked the pom.xml of the projects, without any useful
> exception, i debugged the problem and found a NullPointerException in the
> maven-compiler-plugin.
> Since version 3.x there is a method called "isDependencyChanged" in the
> "AbstractCompilerMojo" class. This method calls another method called
> "getBuildStartTime". The getBuildStartTime method works fine, making some
> reflection calls to the MavenExecutionRequest to get its start time.
> Unfortunatly this time (Date object) never will be set (only in eclipse using
> m2e, running maven seems to work fine), so getBuildStartTime will return
> null. The null-value will be handed over (line 1166) to the method
> "hasNewFile" which fails (line 1192) when asking for "getTime".
> I didn't test the compiler-plugin 3.0, but i checked the source and this part
> seemed to be identical. We switched back to version 2.5.1 where the method
> does not exist - eventhing works again.
> Here is the buggy definition of our parent pom.
> <pluginManagement>
> <plugins>
> <plugin>
> <artifactId>maven-compiler-plugin</artifactId>
> <version>3.1</version>
> <configuration>
> <compilerVersion>1.7</compilerVersion>
> <source>1.7</source>
> <target>1.7</target>
> <compilerId>jdt</compilerId>
> <compilerArguments>
> <verbose />
> </compilerArguments>
> </configuration>
> <dependencies>
> <dependency>
> <groupId>org.eclipse.tycho</groupId>
> <artifactId>tycho-compiler-jdt</artifactId>
> <version>0.18.1</version>
> </dependency>
> </dependencies>
> </plugin>
> </plugins>
> </pluginManagement>
> You also have to add a lifecycle mapping for m2e and change it from "ignore"
> to "execute". I didn't post this code since it comes with a quickfix.
> Be sure the parent pom is not in a open project when checking this problem.
> Just install the pom, close the project and refresh all other ones, using the
> pom. Sometimes everything works if the pom-project is checked out and open
> (not every time).
> kind regards
> Denis
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)