mirror of https://github.com/apache/maven.git
use local copy in bootstrap
git-svn-id: https://svn.apache.org/repos/asf/maven/components/trunk@280239 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
6d41274595
commit
d4df5302fb
|
@ -171,7 +171,8 @@ public class ArtifactDownloader
|
|||
{
|
||||
log( "Using metadata: " + file );
|
||||
|
||||
RepositoryMetadata metadata = RepositoryMetadata.read( file );
|
||||
RepositoryMetadata metadata;
|
||||
metadata = RepositoryMetadata.read( file );
|
||||
|
||||
if ( version.equals( metadata.getVersion() ) )
|
||||
{
|
||||
|
|
|
@ -167,7 +167,7 @@ public class RepositoryMetadata
|
|||
|
||||
public String constructVersion( String baseVersion )
|
||||
{
|
||||
if ( snapshotTimestamp != null )
|
||||
if ( snapshotTimestamp != null && !localCopy )
|
||||
{
|
||||
baseVersion = StringUtils.replace( baseVersion, "SNAPSHOT", snapshotTimestamp + "-" + snapshotBuildNumber );
|
||||
}
|
||||
|
@ -200,7 +200,14 @@ public class RepositoryMetadata
|
|||
{
|
||||
if ( "buildNumber".equals( rawName ) )
|
||||
{
|
||||
metadata.setSnapshotBuildNumber( Integer.valueOf( getBodyText() ).intValue() );
|
||||
try
|
||||
{
|
||||
metadata.setSnapshotBuildNumber( Integer.valueOf( getBodyText() ).intValue() );
|
||||
}
|
||||
catch ( NumberFormatException e )
|
||||
{
|
||||
// Ignore
|
||||
}
|
||||
}
|
||||
else if ( "timestamp".equals( rawName ) )
|
||||
{
|
||||
|
|
Loading…
Reference in New Issue