Author: ltheussl Date: Fri Jul 21 10:23:35 2006 New Revision: 424392 URL: http://svn.apache.org/viewvc?rev=424392&view=rev Log: PR: MAVEN-1384 Log info message if snapshot download is skipped.
Modified: maven/maven-1/core/trunk/src/java/org/apache/maven/verifier/DependencyVerifier.java maven/maven-1/core/trunk/src/messages/messages.properties Modified: maven/maven-1/core/trunk/src/java/org/apache/maven/verifier/DependencyVerifier.java URL: http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/java/org/apache/maven/verifier/DependencyVerifier.java?rev=424392&r1=424391&r2=424392&view=diff ============================================================================== --- maven/maven-1/core/trunk/src/java/org/apache/maven/verifier/DependencyVerifier.java (original) +++ maven/maven-1/core/trunk/src/java/org/apache/maven/verifier/DependencyVerifier.java Fri Jul 21 10:23:35 2006 @@ -405,6 +405,7 @@ String remotePath = artifact.getUrlPath(); File temp = new File( destination + ".tmp" ); temp.deleteOnExit(); + boolean downloaded = false; try { @@ -421,8 +422,14 @@ // reset the retry flag. retry = false; - wagon.getIfNewer( remotePath, temp, destination.lastModified() ); + downloaded = wagon.getIfNewer( remotePath, temp, destination.lastModified() ); + if ( !downloaded && firstRun ) + { + log.info( getMessage( "skip.download.message" ) ); + } + if ( downloaded ) + { // keep the checksum files from showing up on the download monitor... if ( listener != null ) { @@ -481,6 +488,7 @@ sha1TryException ); } } + } // Artifact was found, continue checking additional remote repos (if any) // in case there is a newer version (i.e. snapshots) in another repo @@ -546,7 +554,7 @@ } } - if ( !temp.exists() ) + if ( !temp.exists() && downloaded ) { log.debug( "Downloaded file does not exist: " + temp ); artifactFound = false; @@ -558,7 +566,7 @@ // So we will attempt to do a File.renameTo for efficiency and atomicity, if this fails // then we will use a brute force copy and delete the temporary file. - if ( !temp.renameTo( destination ) ) + if ( !temp.renameTo( destination ) && downloaded ) { try { Modified: maven/maven-1/core/trunk/src/messages/messages.properties URL: http://svn.apache.org/viewvc/maven/maven-1/core/trunk/src/messages/messages.properties?rev=424392&r1=424391&r2=424392&view=diff ============================================================================== --- maven/maven-1/core/trunk/src/messages/messages.properties (original) +++ maven/maven-1/core/trunk/src/messages/messages.properties Fri Jul 21 10:23:35 2006 @@ -28,7 +28,8 @@ multiple.unsatisfied.dependency.error=The build cannot continue because of the following unsatisfied dependencies: offline.snapshot.warning=You are working offline so the build will continue, but ${1} may be out of date! download.message=Attempting to download ${1}. -satisfy.project.message=Trying to get missing dependencies required by ${1}: +skip.download.message=Skipping download as local copy is up to date! +satisfy.project.message=Trying to get missing/snapshot dependencies required by ${1}: plugin.loading.error=The plugin ${1} could not be loaded. empty.descriptor.error=The ${1} file you specified has zero length. checksum.verification.error=The follow artifact is corrupt: ${1}.