Permalink
Browse files

Fix compilation errors

  • Loading branch information...
1 parent e7027d2 commit ccdaeab851d63377ca2a1cbcbb7954cbe037e2c0 @jsievers jsievers committed Nov 14, 2011
@@ -22,9 +22,7 @@
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
import org.apache.maven.project.MavenProject;
-import org.codehaus.plexus.logging.Logger;
import org.eclipse.tycho.equinox.EquinoxServiceFactory;
-import org.eclipse.tycho.osgi.adapters.MavenLoggerAdapter;
import org.eclipse.tycho.p2.tools.DestinationRepositoryDescriptor;
import org.eclipse.tycho.p2.tools.FacadeException;
import org.eclipse.tycho.p2.tools.RepositoryReferences;
@@ -48,9 +46,6 @@
/** @component */
private EquinoxServiceFactory p2;
- /** @component */
- private Logger logger;
-
/**
* Source repositori(es) to mirror from.
*
@@ -167,8 +162,7 @@ public void execute() throws MojoExecutionException, MojoFailureException {
getLog().info("Mirroring to " + destination + "...");
try {
mirrorService.mirrorStandalone(sourceDescriptor, destinationDescriptor, createIUDescriptions(),
- createMirrorOptions(), new File(project.getBuild().getDirectory()), new MavenLoggerAdapter(logger,
- false));
+ createMirrorOptions(), new File(project.getBuild().getDirectory()));
} catch (final FacadeException e) {
throw new MojoExecutionException("Error during mirroring", e);
}
@@ -19,31 +19,21 @@
import java.util.Map;
import java.util.Properties;
-import org.apache.maven.execution.MavenSession;
import org.apache.maven.plugin.AbstractMojo;
import org.apache.maven.plugin.MojoExecutionException;
import org.apache.maven.plugin.MojoFailureException;
-import org.codehaus.plexus.logging.Logger;
import org.eclipse.tycho.core.utils.ExecutionEnvironmentUtils;
import org.eclipse.tycho.core.utils.PlatformPropertiesUtils;
import org.eclipse.tycho.equinox.EquinoxServiceFactory;
-import org.eclipse.tycho.osgi.adapters.MavenLoggerAdapter;
import org.eclipse.tycho.p2.resolver.facade.P2Resolver;
import org.eclipse.tycho.p2.resolver.facade.P2ResolverFactory;
import org.eclipse.tycho.p2.resolver.facade.ResolutionContext;
public abstract class AbstractUpdateMojo extends AbstractMojo {
- /**
- * @parameter expression="${session}"
- */
- protected MavenSession session;
/** @component */
protected EquinoxServiceFactory equinox;
- /** @component */
- private Logger logger;
-
protected P2Resolver p2;
protected ResolutionContext resolutionContext;
@@ -63,10 +53,8 @@ public void execute() throws MojoExecutionException, MojoFailureException {
private void createResolver() {
P2ResolverFactory factory = equinox.getService(P2ResolverFactory.class);
- MavenLoggerAdapter loggerAdapter = new MavenLoggerAdapter(logger, false);
- p2 = factory.createResolver(loggerAdapter);
- File localMavenRepositoryRoot = new File(session.getLocalRepository().getBasedir());
- resolutionContext = factory.createResolutionContext(localMavenRepositoryRoot, false, false, loggerAdapter);
+ p2 = factory.createResolver();
+ resolutionContext = factory.createResolutionContext(false);
}
protected List<Map<String, String>> getEnvironments() {

0 comments on commit ccdaeab

Please sign in to comment.