mirror of https://github.com/apache/maven.git
o update for changes in Aether APIs
This commit is contained in:
parent
137cbd8a97
commit
de40fe19a8
|
@ -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;
|
||||
}
|
||||
|
|
|
@ -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() ) );
|
||||
|
|
|
@ -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 )
|
||||
|
|
|
@ -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 );
|
||||
}
|
||||
|
||||
|
|
|
@ -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() );
|
||||
|
|
|
@ -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() );
|
||||
|
|
Loading…
Reference in New Issue