Search in sources :

Example 1 with MavenContext

use of org.eclipse.tycho.core.shared.MavenContext in project tycho by eclipse.

the class VerifierServiceImplTest method setup.

@Before
public void setup() {
    subject = new VerifierServiceImpl();
    logger = new ErrorStoreMemoryLog();
    MavenContext mavenContext = new MavenContextImpl(null, logger);
    subject.setMavenContext(mavenContext);
}
Also used : MavenContextImpl(org.eclipse.tycho.core.shared.MavenContextImpl) MavenContext(org.eclipse.tycho.core.shared.MavenContext) VerifierServiceImpl(org.eclipse.tycho.p2.tools.verifier.VerifierServiceImpl) Before(org.junit.Before)

Example 2 with MavenContext

use of org.eclipse.tycho.core.shared.MavenContext in project tycho by eclipse.

the class RemoteAgentMavenMirrorsTest method initSubject.

@Before
public void initSubject() throws Exception {
    File localRepository = tempManager.newFolder("localRepo");
    MavenContext mavenContext = new MavenContextImpl(localRepository, OFFLINE, logVerifier.getLogger(), new Properties());
    mavenRepositorySettings = new MavenRepositorySettingsStub();
    subject = new RemoteAgent(mavenContext, mavenRepositorySettings, OFFLINE);
}
Also used : MavenContextImpl(org.eclipse.tycho.core.shared.MavenContextImpl) MavenContext(org.eclipse.tycho.core.shared.MavenContext) MavenRepositorySettingsStub(org.eclipse.tycho.p2.remote.testutil.MavenRepositorySettingsStub) Properties(java.util.Properties) File(java.io.File) Before(org.junit.Before)

Example 3 with MavenContext

use of org.eclipse.tycho.core.shared.MavenContext in project tycho by eclipse.

the class MavenContextConfigurator method afterFrameworkStarted.

@Override
public void afterFrameworkStarted(EmbeddedEquinox framework) {
    MavenSession session = context.getSession();
    File localRepoRoot = new File(session.getLocalRepository().getBasedir());
    MavenLoggerAdapter mavenLogger = new MavenLoggerAdapter(logger, false);
    Properties globalProps = getGlobalProperties(session);
    MavenContext mavenContext = new MavenContextImpl(localRepoRoot, session.isOffline(), mavenLogger, globalProps);
    framework.registerService(MavenContext.class, mavenContext);
}
Also used : MavenSession(org.apache.maven.execution.MavenSession) MavenContextImpl(org.eclipse.tycho.core.shared.MavenContextImpl) MavenLoggerAdapter(org.eclipse.tycho.osgi.adapters.MavenLoggerAdapter) MavenContext(org.eclipse.tycho.core.shared.MavenContext) Properties(java.util.Properties) File(java.io.File)

Example 4 with MavenContext

use of org.eclipse.tycho.core.shared.MavenContext in project tycho by eclipse.

the class MirrorApplicationServiceTest method initTestContext.

@Before
public void initTestContext() throws Exception {
    destinationRepo = new DestinationRepositoryDescriptor(tempFolder.newFolder("dest"), DEFAULT_NAME);
    File projectFolder = tempFolder.getRoot();
    ReactorProjectIdentities currentProject = new ReactorProjectIdentitiesStub(projectFolder);
    context = new BuildContext(currentProject, DEFAULT_QUALIFIER, DEFAULT_ENVIRONMENTS);
    subject = new MirrorApplicationServiceImpl();
    MavenContext mavenContext = new MavenContextImpl(null, logVerifier.getLogger());
    subject.setMavenContext(mavenContext);
}
Also used : MavenContextImpl(org.eclipse.tycho.core.shared.MavenContextImpl) BuildContext(org.eclipse.tycho.p2.tools.BuildContext) MavenContext(org.eclipse.tycho.core.shared.MavenContext) ReactorProjectIdentitiesStub(org.eclipse.tycho.test.util.ReactorProjectIdentitiesStub) ReactorProjectIdentities(org.eclipse.tycho.ReactorProjectIdentities) File(java.io.File) DestinationRepositoryDescriptor(org.eclipse.tycho.p2.tools.DestinationRepositoryDescriptor) Before(org.junit.Before)

Example 5 with MavenContext

use of org.eclipse.tycho.core.shared.MavenContext in project tycho by eclipse.

the class MirrorStandaloneTest method initTestContext.

@Before
public void initTestContext() throws Exception {
    destinationRepo = new DestinationRepositoryDescriptor(tempFolder.newFolder("dest"), DEFAULT_NAME);
    subject = new MirrorApplicationServiceImpl();
    MavenContext mavenContext = new MavenContextImpl(null, logVerifier.getLogger());
    subject.setMavenContext(mavenContext);
    targetFolder = new BuildOutputDirectory(tempFolder.getRoot());
}
Also used : MavenContextImpl(org.eclipse.tycho.core.shared.MavenContextImpl) MavenContext(org.eclipse.tycho.core.shared.MavenContext) BuildOutputDirectory(org.eclipse.tycho.BuildOutputDirectory) DestinationRepositoryDescriptor(org.eclipse.tycho.p2.tools.DestinationRepositoryDescriptor) Before(org.junit.Before)

Aggregations

MavenContext (org.eclipse.tycho.core.shared.MavenContext)5 MavenContextImpl (org.eclipse.tycho.core.shared.MavenContextImpl)5 Before (org.junit.Before)4 File (java.io.File)3 Properties (java.util.Properties)2 DestinationRepositoryDescriptor (org.eclipse.tycho.p2.tools.DestinationRepositoryDescriptor)2 MavenSession (org.apache.maven.execution.MavenSession)1 BuildOutputDirectory (org.eclipse.tycho.BuildOutputDirectory)1 ReactorProjectIdentities (org.eclipse.tycho.ReactorProjectIdentities)1 MavenLoggerAdapter (org.eclipse.tycho.osgi.adapters.MavenLoggerAdapter)1 MavenRepositorySettingsStub (org.eclipse.tycho.p2.remote.testutil.MavenRepositorySettingsStub)1 BuildContext (org.eclipse.tycho.p2.tools.BuildContext)1 VerifierServiceImpl (org.eclipse.tycho.p2.tools.verifier.VerifierServiceImpl)1 ReactorProjectIdentitiesStub (org.eclipse.tycho.test.util.ReactorProjectIdentitiesStub)1