Author: dfabulich Date: Tue Apr 8 22:32:02 2014 New Revision: 1585858 URL: http://svn.apache.org/r1585858 Log: Build renamed and copied files; they count as modifications
Modified: maven/sandbox/trunk/shared/scm-changes-maven-extension/src/main/java/org/apache/maven/shared/scmchanges/MakeScmChanges.java Modified: maven/sandbox/trunk/shared/scm-changes-maven-extension/src/main/java/org/apache/maven/shared/scmchanges/MakeScmChanges.java URL: http://svn.apache.org/viewvc/maven/sandbox/trunk/shared/scm-changes-maven-extension/src/main/java/org/apache/maven/shared/scmchanges/MakeScmChanges.java?rev=1585858&r1=1585857&r2=1585858&view=diff ============================================================================== --- maven/sandbox/trunk/shared/scm-changes-maven-extension/src/main/java/org/apache/maven/shared/scmchanges/MakeScmChanges.java (original) +++ maven/sandbox/trunk/shared/scm-changes-maven-extension/src/main/java/org/apache/maven/shared/scmchanges/MakeScmChanges.java Tue Apr 8 22:32:02 2014 @@ -94,7 +94,7 @@ public class MakeScmChanges { logger.debug( changedScmFile.toString() ); ScmFileStatus status = changedScmFile.getStatus(); - if ( !status.isStatus() ) // isStatus means "isUnknown or isDiff" + if ( !isDiffStatus( status ) ) { logger.debug( "Not a diff: " + status ); continue; @@ -219,7 +219,6 @@ public class MakeScmChanges } } - @SuppressWarnings( "unchecked" ) List<ScmFile> getChangedFilesFromScm( File baseDir ) throws MavenExecutionException { @@ -236,4 +235,17 @@ public class MakeScmChanges return (List<ScmFile>) result.getChangedFiles(); } + + boolean isDiffStatus( ScmFileStatus status ) + { + if ( status.isStatus() // Added, deleted, modified, or Unknown + || ScmFileStatus.RENAMED.equals( status ) + || ScmFileStatus.COPIED.equals( status ) + || ScmFileStatus.CONFLICT.equals( status ) + ) + { + return true; + } + return false; + } }