[ https://jira.codehaus.org/browse/MCOMPILER-21?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=311157#comment-311157 ]
Michael Panchenko commented on MCOMPILER-21: -------------------------------------------- Why you can't use http://maven.apache.org/ref/2.2.1/maven-core/apidocs/org/apache/maven/execution/MavenSession.html#getStartTime() http://maven.apache.org/ref/3.0.4/maven-core/apidocs/org/apache/maven/execution/MavenSession.html#getStartTime() to get build start time? Instead of that you use {code} + protected Date getBuildStartTime() + { + try + { + Method getRequestMethod = session.getClass().getMethod( "getRequest" ); + Object mavenExecutionRequest = getRequestMethod.invoke( session ); + Method getStartTimeMethod = mavenExecutionRequest.getClass().getMethod( "getStartTime" ); + Date buildStartTime = (Date) getStartTimeMethod.invoke( mavenExecutionRequest ); + return buildStartTime; + } + catch ( Exception e ) + { + getLog().debug( "unable to get start time for the current build: " + e.getMessage() ); + } + + return new Date(); + } {code} > compiler smarts > --------------- > > Key: MCOMPILER-21 > URL: https://jira.codehaus.org/browse/MCOMPILER-21 > Project: Maven 2.x Compiler Plugin > Issue Type: Bug > Reporter: Brett Porter > Assignee: Mark Struberg > Fix For: backlog > > Attachments: MCOMPILER-21.patch, MCOMPILER-21-v2.patch > > > there are probably other ways we can make the compiler stale check smarter. > List them out here if you think of them. > 1) if a snapshot was resolved to a newer version, rebuild everything. -- 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