Fixed PlexusRepositorySystemFactory to properly configure underlying Guice injector now that aether-core has JSR-330 annos
Project: http://git-wip-us.apache.org/repos/asf/maven-aether/repo Commit: http://git-wip-us.apache.org/repos/asf/maven-aether/commit/e78739f4 Tree: http://git-wip-us.apache.org/repos/asf/maven-aether/tree/e78739f4 Diff: http://git-wip-us.apache.org/repos/asf/maven-aether/diff/e78739f4 Branch: refs/heads/demo Commit: e78739f442082c84429de7633cb8103eecc3998c Parents: 9322458 Author: Benjamin Bentmann <bentm...@sonatype.com> Authored: Sun Feb 5 18:06:45 2012 +0100 Committer: Benjamin Bentmann <bentm...@sonatype.com> Committed: Sun Feb 5 18:06:45 2012 +0100 ---------------------------------------------------------------------- .../aether/examples/plexus/PlexusRepositorySystemFactory.java | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/maven-aether/blob/e78739f4/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/plexus/PlexusRepositorySystemFactory.java ---------------------------------------------------------------------- diff --git a/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/plexus/PlexusRepositorySystemFactory.java b/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/plexus/PlexusRepositorySystemFactory.java index fbed875..7f8fd6e 100644 --- a/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/plexus/PlexusRepositorySystemFactory.java +++ b/aether-demo-snippets/src/main/java/org/eclipse/aether/examples/plexus/PlexusRepositorySystemFactory.java @@ -1,5 +1,5 @@ /******************************************************************************* - * Copyright (c) 2010, 2011 Sonatype, Inc. + * Copyright (c) 2010, 2012 Sonatype, Inc. * All rights reserved. This program and the accompanying materials * are made available under the terms of the Eclipse Public License v1.0 * which accompanies this distribution, and is available at @@ -10,6 +10,8 @@ *******************************************************************************/ package org.eclipse.aether.examples.plexus; +import org.codehaus.plexus.ContainerConfiguration; +import org.codehaus.plexus.DefaultContainerConfiguration; import org.codehaus.plexus.DefaultPlexusContainer; import org.eclipse.aether.RepositorySystem; @@ -27,7 +29,8 @@ public class PlexusRepositorySystemFactory */ try { - return new DefaultPlexusContainer().lookup( RepositorySystem.class ); + ContainerConfiguration config = new DefaultContainerConfiguration().setAutoWiring( true ); + return new DefaultPlexusContainer( config ).lookup( RepositorySystem.class ); } catch ( Exception e ) {