[MNG-5365] Replace Aether's deprecated ConfigurationProperties with ConfigUtils

git-svn-id: https://svn.apache.org/repos/asf/maven/maven-3/trunk@1402701 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
Robert Scholte 2012-10-26 22:14:17 +00:00
parent 316bd0a055
commit 40d10ec9e4
3 changed files with 11 additions and 10 deletions

View File

@ -36,15 +36,11 @@ import org.codehaus.plexus.component.annotations.Component;
import org.codehaus.plexus.component.annotations.Requirement;
import org.codehaus.plexus.util.IOUtil;
import org.codehaus.plexus.util.StringUtils;
import org.sonatype.aether.ConfigurationProperties;
import org.sonatype.aether.RepositoryCache;
import org.sonatype.aether.RequestTrace;
import org.sonatype.aether.RepositoryEvent.EventType;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.RequestTrace;
import org.sonatype.aether.SyncContext;
import org.sonatype.aether.util.DefaultRequestTrace;
import org.sonatype.aether.util.listener.DefaultRepositoryEvent;
import org.sonatype.aether.util.metadata.DefaultMetadata;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.impl.MetadataResolver;
import org.sonatype.aether.impl.RepositoryEventDispatcher;
@ -66,6 +62,10 @@ import org.sonatype.aether.spi.locator.Service;
import org.sonatype.aether.spi.locator.ServiceLocator;
import org.sonatype.aether.spi.log.Logger;
import org.sonatype.aether.spi.log.NullLogger;
import org.sonatype.aether.util.ConfigUtils;
import org.sonatype.aether.util.DefaultRequestTrace;
import org.sonatype.aether.util.listener.DefaultRepositoryEvent;
import org.sonatype.aether.util.metadata.DefaultMetadata;
/**
* @author Benjamin Bentmann
@ -153,7 +153,8 @@ public class DefaultVersionResolver
Key cacheKey = null;
RepositoryCache cache = session.getCache();
if ( cache != null && !ConfigurationProperties.get( session, "aether.versionResolver.noCache", false ) )
if ( cache != null && !ConfigUtils.getBoolean( session, false, "aether.versionResolver.noCache" ) )
{
cacheKey = new Key( session, request );

View File

@ -24,12 +24,12 @@ import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import org.sonatype.aether.ConfigurationProperties;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.impl.MetadataGenerator;
import org.sonatype.aether.installation.InstallRequest;
import org.sonatype.aether.metadata.Metadata;
import org.sonatype.aether.util.ConfigUtils;
/**
* @author Benjamin Bentmann
@ -44,7 +44,7 @@ class LocalSnapshotMetadataGenerator
public LocalSnapshotMetadataGenerator( RepositorySystemSession session, InstallRequest request )
{
legacyFormat = ConfigurationProperties.get( session.getConfigProperties(), "maven.metadata.legacy", false );
legacyFormat = ConfigUtils.getBoolean( session.getConfigProperties(), false, "maven.metadata.legacy" );
snapshots = new LinkedHashMap<Object, LocalSnapshotMetadata>();
}

View File

@ -24,12 +24,12 @@ import java.util.Collections;
import java.util.LinkedHashMap;
import java.util.Map;
import org.sonatype.aether.ConfigurationProperties;
import org.sonatype.aether.RepositorySystemSession;
import org.sonatype.aether.artifact.Artifact;
import org.sonatype.aether.deployment.DeployRequest;
import org.sonatype.aether.impl.MetadataGenerator;
import org.sonatype.aether.metadata.Metadata;
import org.sonatype.aether.util.ConfigUtils;
/**
* @author Benjamin Bentmann
@ -44,7 +44,7 @@ class RemoteSnapshotMetadataGenerator
public RemoteSnapshotMetadataGenerator( RepositorySystemSession session, DeployRequest request )
{
legacyFormat = ConfigurationProperties.get( session.getConfigProperties(), "maven.metadata.legacy", false );
legacyFormat = ConfigUtils.getBoolean( session.getConfigProperties(), false, "maven.metadata.legacy" );
snapshots = new LinkedHashMap<Object, RemoteSnapshotMetadata>();