Author: brett Date: Wed Sep 28 03:12:38 2005 New Revision: 292156 URL: http://svn.apache.org/viewcvs?rev=292156&view=rev Log: remove legacy metadata handling
Modified: maven/components/trunk/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java maven/components/trunk/maven-mboot2/src/main/java/download/ArtifactDownloader.java Modified: maven/components/trunk/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java?rev=292156&r1=292155&r2=292156&view=diff ============================================================================== --- maven/components/trunk/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java (original) +++ maven/components/trunk/maven-core-it-verifier/src/main/java/org/apache/maven/it/Verifier.java Wed Sep 28 03:12:38 2005 @@ -237,10 +237,6 @@ int startIndex = newLine.indexOf( ' ' ); command = newLine.substring( 0, startIndex ); - if ( "rm".equals( command ) ) - { - l.add( newLine.substring( 0, index ) + "SNAPSHOT.version.txt" ); - } filespec = newLine.substring( startIndex + 1, endIndex ); } Modified: maven/components/trunk/maven-mboot2/src/main/java/download/ArtifactDownloader.java URL: http://svn.apache.org/viewcvs/maven/components/trunk/maven-mboot2/src/main/java/download/ArtifactDownloader.java?rev=292156&r1=292155&r2=292156&view=diff ============================================================================== --- maven/components/trunk/maven-mboot2/src/main/java/download/ArtifactDownloader.java (original) +++ maven/components/trunk/maven-mboot2/src/main/java/download/ArtifactDownloader.java Wed Sep 28 03:12:38 2005 @@ -2,7 +2,6 @@ import model.Dependency; import model.Repository; -import util.FileUtils; import java.io.File; import java.io.FileNotFoundException; @@ -158,7 +157,6 @@ remoteFile.delete(); } - boolean legacy = false; File file = localFile; if ( remoteFile.exists() ) { @@ -167,57 +165,8 @@ file = remoteFile; } } - else - { - log( "WARNING: attempting to use legacy metadata" ); - - filename = getSnapshotMetadataFile( destinationFile.getName(), "SNAPSHOT.version.txt" ); - File f = localRepository.getMetadataFile( dep.getGroupId(), dep.getArtifactId(), - dep.getVersion(), dep.getType(), filename ); - metadataPath = remoteRepo.getMetadataPath( dep.getGroupId(), dep.getArtifactId(), - dep.getVersion(), dep.getType(), filename ); - metaUrl = remoteRepo.getBasedir() + "/" + metadataPath; - log( "Downloading " + metaUrl ); - try - { - HttpUtils.getFile( metaUrl, f, ignoreErrors, true, proxyHost, proxyPort, proxyUserName, - proxyPassword, false ); - } - catch ( IOException e ) - { - log( "WARNING: remote SNAPSHOT version not found, using local: " + e.getMessage() ); - f.delete(); - } - - if ( f.exists() ) - { - if ( !localFile.exists() || localFile.lastModified() < f.lastModified() ) - { - version = FileUtils.fileRead( f ); - log( "Resolved version: " + version ); - dep.setResolvedVersion( version ); - if ( !version.endsWith( "SNAPSHOT" ) ) - { - String ver = version.substring( - version.lastIndexOf( "-", version.lastIndexOf( "-" ) - 1 ) + 1 ); - String extension = url.substring( url.length() - 4 ); - url = getSnapshotMetadataFile( url, ver + extension ); - } - else if ( destinationFile.exists() ) - { - // It's already there - return true; - } - legacy = true; - } - } - else - { - log( "WARNING: local SNAPSHOT version not found, using default" ); - } - } - if ( !legacy && file.exists() ) + if ( file.exists() ) { log( "Using metadata: " + file ); --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]