Commits

David Carr committed 9e5d5ad

publish: replace plexus-container-default with sisu-inject-plexus

It sounds like plexus-container-default is dead. Instead, use a shim over Guice.

https://issues.sonatype.org/browse/AETHER-100

  • Participants
  • Parent commits ada0664

Comments (0)

Files changed (2)

File build.gradle

     compile 'org.apache.maven.wagon:wagon-ssh:2.3'
     compile 'org.apache.maven.wagon:wagon-ssh-external:2.3'
     compile 'org.apache.maven.wagon:wagon-webdav-jackrabbit:2.3'
-    compile('org.codehaus.plexus:plexus-container-default:1.5.5') {
-        exclude group: 'junit'
-    }
+    compile 'org.sonatype.sisu:sisu-inject-plexus:2.3.2'
 
     compile 'org.lesscss:lesscss:1.3.0'
 

File src/main/java/us/carrclan/david/gradle/site/PublishSite.java

 import org.apache.maven.wagon.repository.Repository;
 import org.codehaus.plexus.DefaultPlexusContainer;
 import org.codehaus.plexus.PlexusContainer;
-import org.codehaus.plexus.PlexusContainerException;
 import org.codehaus.plexus.component.repository.exception.ComponentLookupException;
 import org.codehaus.plexus.context.Context;
 import org.codehaus.plexus.context.ContextException;
     private PlexusContainer acquirePlexusContainer() {
         if (plexusContainer != null) return plexusContainer;
         PlexusContainer newPlexusContainer = new DefaultPlexusContainer();
-        newPlexusContainer.addContextValue(CTX_CREATOR, getClass().getName());
+        newPlexusContainer.getContext().put(CTX_CREATOR, getClass().getName());
         return newPlexusContainer;
     }