Search in sources :

Example 1 with MavenLoggerAdapter

use of org.eclipse.tycho.osgi.adapters.MavenLoggerAdapter 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 2 with MavenLoggerAdapter

use of org.eclipse.tycho.osgi.adapters.MavenLoggerAdapter in project tycho by eclipse.

the class P2DependencyResolver method resolveDependencies.

@Override
public DependencyArtifacts resolveDependencies(final MavenSession session, final MavenProject project, TargetPlatform targetPlatform, List<ReactorProject> reactorProjects, DependencyResolverConfiguration resolverConfiguration) {
    if (targetPlatform == null) {
        targetPlatform = TychoProjectUtils.getTargetPlatform(project);
    }
    // TODO 364134 For compatibility reasons, target-platform-configuration includes settings for the dependency resolution
    // --> split this information logically, e.g. through two distinct interfaces
    TargetPlatformConfiguration configuration = TychoProjectUtils.getTargetPlatformConfiguration(project);
    P2Resolver osgiResolverImpl = resolverFactory.createResolver(new MavenLoggerAdapter(getLogger(), DebugUtils.isDebugEnabled(session, project)));
    return doResolveDependencies(session, project, reactorProjects, resolverConfiguration, targetPlatform, osgiResolverImpl, configuration);
}
Also used : MavenLoggerAdapter(org.eclipse.tycho.osgi.adapters.MavenLoggerAdapter) P2Resolver(org.eclipse.tycho.p2.resolver.facade.P2Resolver) TargetPlatformConfiguration(org.eclipse.tycho.core.TargetPlatformConfiguration)

Aggregations

MavenLoggerAdapter (org.eclipse.tycho.osgi.adapters.MavenLoggerAdapter)2 File (java.io.File)1 Properties (java.util.Properties)1 MavenSession (org.apache.maven.execution.MavenSession)1 TargetPlatformConfiguration (org.eclipse.tycho.core.TargetPlatformConfiguration)1 MavenContext (org.eclipse.tycho.core.shared.MavenContext)1 MavenContextImpl (org.eclipse.tycho.core.shared.MavenContextImpl)1 P2Resolver (org.eclipse.tycho.p2.resolver.facade.P2Resolver)1