You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@maven.apache.org by be...@apache.org on 2009/12/29 11:58:04 UTC

svn commit: r894349 - /maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java

Author: bentmann
Date: Tue Dec 29 10:58:04 2009
New Revision: 894349

URL: http://svn.apache.org/viewvc?rev=894349&view=rev
Log:
[MNG-4368] DefaultArtifactInstaller should only overwrite files if timestamp has changed

o Improved logging to make optimization visible to end-user

Modified:
    maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java

Modified: maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java
URL: http://svn.apache.org/viewvc/maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java?rev=894349&r1=894348&r2=894349&view=diff
==============================================================================
--- maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java (original)
+++ maven/maven-3/trunk/maven-compat/src/main/java/org/apache/maven/artifact/installer/DefaultArtifactInstaller.java Tue Dec 29 10:58:04 2009
@@ -80,20 +80,20 @@
                 destination.getParentFile().mkdirs();
             }
 
-            getLogger().info( "Installing " + source.getPath() + " to " + destination );
-
             boolean copy =
                 !destination.exists() || "pom".equals( artifact.getType() )
                     || source.lastModified() != destination.lastModified() || source.length() != destination.length();
 
             if ( copy )
             {
+                getLogger().info( "Installing " + source + " to " + destination );
+
                 FileUtils.copyFile( source, destination );
                 destination.setLastModified( source.lastModified() );
             }
             else
             {
-                getLogger().debug( "Skipped re-installation of " + destination + ", seems unchanged" );
+                getLogger().info( "Skipped re-installing " + source + " to " + destination + ", seems unchanged" );
             }
 
             // must be after the artifact is installed