o update for changes in Aether APIs

This commit is contained in:
Jason van Zyl 2013-02-16 22:48:55 -05:00
parent 137cbd8a97
commit de40fe19a8
6 changed files with 8 additions and 8 deletions

View File

@ -361,7 +361,7 @@ public abstract class AbstractArtifactComponentTestCase
session.setDependencyGraphTransformer( transformer );
LocalRepository localRepo = new LocalRepository( localRepository().getBasedir() );
session.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( localRepo ) );
session.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( session, localRepo ) );
return session;
}

View File

@ -124,7 +124,7 @@ public class LegacyRepositorySystemTest
DefaultRepositorySystemSession session = new DefaultRepositorySystemSession();
LocalRepository localRepo = new LocalRepository( request.getLocalRepository().getBasedir() );
session.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( localRepo ) );
session.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( session, localRepo ) );
LegacySupport legacySupport = lookup( LegacySupport.class );
legacySupport.setSession( new MavenSession( getContainer(), session, new DefaultMavenExecutionRequest(),
new DefaultMavenExecutionResult() ) );

View File

@ -389,18 +389,18 @@ public class DefaultMaven
logger.warn( "Disabling enhanced local repository: using legacy is stronlgy discouraged to ensure build reproducibility." );
try
{
session.setLocalRepositoryManager( simpleLocalRepositoryManagerFactory.newInstance( localRepo ) );
session.setLocalRepositoryManager( simpleLocalRepositoryManagerFactory.newInstance( session, localRepo ) );
}
catch ( NoLocalRepositoryManagerException e )
{
logger.warn( "Failed to configure legacy local repository: back to default" );
session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( localRepo ) );
session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( session, localRepo ) );
}
}
else
{
session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( localRepo ) );
session.setLocalRepositoryManager( repoSystem.newLocalRepositoryManager( session, localRepo ) );
}
if ( request.getWorkspaceReader() != null )

View File

@ -166,7 +166,7 @@ public abstract class AbstractCoreMavenComponentTestCase
File localRepoDir = new File( request.getLocalRepository().getBasedir() );
LocalRepository localRepo = new LocalRepository( localRepoDir );
DefaultRepositorySystemSession session = MavenRepositorySystemUtils.newSession();
session.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( localRepo ) );
session.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( session, localRepo ) );
request.setRepositorySession( session );
}

View File

@ -1853,7 +1853,7 @@ public class PomConstructionTest
DefaultRepositorySystemSession repoSession = MavenRepositorySystemUtils.newSession();
LocalRepository localRepo = new LocalRepository( config.getLocalRepository().getBasedir() );
repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( localRepo ) );
repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( repoSession, localRepo ) );
config.setRepositorySession( repoSession );
return new PomTestWrapper( pomFile, projectBuilder.build( pomFile, config ).getProject() );

View File

@ -126,7 +126,7 @@ public class PomConstructionWithSettingsTest
DefaultRepositorySystemSession repoSession = MavenRepositorySystemUtils.newSession();
LocalRepository localRepo = new LocalRepository( config.getLocalRepository().getBasedir() );
repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( localRepo ) );
repoSession.setLocalRepositoryManager( new SimpleLocalRepositoryManagerFactory().newInstance( repoSession, localRepo ) );
config.setRepositorySession( repoSession );
return new PomTestWrapper( pomFile, projectBuilder.build( pomFile, config ).getProject() );