title: Using Maven3.1, RepositorySystemSession and RepositorySystem are not injected and remain null
body: <p>My question is very much related to this <a href="https://stackoverflow.com/questions/21612945/how-to-use-aether-eclipse-in-maven-plugins-using-api-3-1-1">one</a></p>
  
  <p>But I can't get it working. Hopefully some more eyes on it will help</p>
  
  <p>My environment</p>
  
  <pre><code>Apache Maven 3.1.1 (0728685237757ffbf44136acec0402957f723d9a; 2013-09-17 08:22:22-0700)
  Maven home: /usr/local/maven
  Java version: 1.8.0_40, vendor: Oracle Corporation
  Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0_40.jdk/Contents/Home/jre
  Default locale: en_US, platform encoding: UTF-8
  OS name: "mac os x", version: "10.11.3", arch: "x86_64", family: "mac"
  </code></pre>
  
  <p><strong>I'm on maven 3.1 so I'm using the new eclipse.aether, not sonatype.aether.</strong></p>
  
  <p>My plugin</p>
  
  <pre><code>package aether.example;
  
  import java.util.List;
  
  import org.apache.maven.plugin.AbstractMojo;
  import org.apache.maven.plugin.MojoExecutionException;
  import org.apache.maven.plugin.MojoFailureException;
  import org.apache.maven.plugins.annotations.Mojo;
  import org.eclipse.aether.RepositorySystem;
  import org.eclipse.aether.RepositorySystemSession;
  import org.eclipse.aether.repository.RemoteRepository;
  
  @Mojo(name="test")
  public class TestMojo extends AbstractMojo {
  
  
    /**
     * The entry point to Aether, i.e. the component doing all the work.
     * 
     * @component
     */
    private RepositorySystem repoSystem;
  
    /**
     * The current repository/network configuration of Maven.
     * 
     * @parameter default-value="${repositorySystemSession}"
     * @readonly
     */
    private RepositorySystemSession repoSession;
  
    /**
     * The project's remote repositories to use for the resolution of project dependencies.
     * 
     * @parameter default-value="${project.remoteProjectRepositories}"
     * @readonly
     */
    private List&lt;RemoteRepository&gt; projectRepos;
  
    /**
     * The project's remote repositories to use for the resolution of plugins and their dependencies.
     * 
     * @parameter default-value="${project.remotePluginRepositories}"
     * @readonly
     */
    private List&lt;RemoteRepository&gt; pluginRepos;
  
    @Override
    public void execute() throws MojoExecutionException, MojoFailureException {
      System.out.println("TestMojo");
      System.out.println("Session: " + repoSession);
      System.out.println("Repos: " + projectRepos);
      System.out.println("repoSys: " + repoSystem);
  
    }
  
  }
  </code></pre>
  
  <p>My pom.xml</p>
  
  <pre><code>&lt;project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
      xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd"&gt;
      &lt;modelVersion&gt;4.0.0&lt;/modelVersion&gt;
  
      &lt;groupId&gt;aether.example&lt;/groupId&gt;
      &lt;artifactId&gt;my-aether-plugin&lt;/artifactId&gt;
      &lt;version&gt;1.0.1-SNAPSHOT&lt;/version&gt;
      &lt;packaging&gt;maven-plugin&lt;/packaging&gt;
  
      &lt;properties&gt;
          &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
          &lt;mavenVersion&gt;3.1.1&lt;/mavenVersion&gt;
          &lt;aetherVersion&gt;1.1.0&lt;/aetherVersion&gt;
          &lt;mavenPluginVersion&gt;3.2&lt;/mavenPluginVersion&gt;
      &lt;/properties&gt;
  
      &lt;build&gt;
          &lt;plugins&gt;
            &lt;plugin&gt;
              &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
              &lt;version&gt;3.1&lt;/version&gt;
              &lt;configuration&gt;
                &lt;source&gt;1.7&lt;/source&gt;
                &lt;target&gt;1.7&lt;/target&gt;
              &lt;/configuration&gt;
            &lt;/plugin&gt;
  
              &lt;plugin&gt;
                  &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
                  &lt;artifactId&gt;maven-plugin-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${mavenPluginVersion}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;goalPrefix&gt;my-aether&lt;/goalPrefix&gt;
                      &lt;!-- see http://jira.codehaus.org/browse/MNG-5346 --&gt;
                      &lt;skipErrorNoDescriptorsFound&gt;true&lt;/skipErrorNoDescriptorsFound&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;id&gt;mojo-descriptor&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;descriptor&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                      &lt;execution&gt;
                          &lt;id&gt;help-goal&lt;/id&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;helpmojo&lt;/goal&gt;
                          &lt;/goals&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
              &lt;/plugin&gt;
  
          &lt;/plugins&gt;
      &lt;/build&gt;
  
      &lt;dependencies&gt;  
          &lt;dependency&gt;
              &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
              &lt;artifactId&gt;maven-plugin-api&lt;/artifactId&gt;
              &lt;version&gt;${mavenVersion}&lt;/version&gt;
              &lt;scope&gt;provided&lt;/scope&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-model&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.apache.maven&lt;/groupId&gt;
                      &lt;artifactId&gt;maven-artifact&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
                  &lt;exclusion&gt;
                      &lt;groupId&gt;org.eclipse.sisu&lt;/groupId&gt;
                      &lt;artifactId&gt;org.eclipse.sisu.plexus&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
          &lt;/dependency&gt;
           &lt;dependency&gt;
               &lt;groupId&gt;org.eclipse.aether&lt;/groupId&gt;
               &lt;artifactId&gt;aether-api&lt;/artifactId&gt;
               &lt;version&gt;${aetherVersion}&lt;/version&gt;
           &lt;/dependency&gt;
           &lt;dependency&gt;
               &lt;groupId&gt;org.eclipse.aether&lt;/groupId&gt;
               &lt;artifactId&gt;aether-util&lt;/artifactId&gt;
               &lt;version&gt;${aetherVersion}&lt;/version&gt;
           &lt;/dependency&gt;
      &lt;dependency&gt;
        &lt;groupId&gt;org.apache.maven.plugin-tools&lt;/groupId&gt;
        &lt;artifactId&gt;maven-plugin-annotations&lt;/artifactId&gt;
        &lt;version&gt;3.4&lt;/version&gt;
        &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  
           &lt;dependency&gt;
               &lt;groupId&gt;junit&lt;/groupId&gt;
               &lt;artifactId&gt;junit&lt;/artifactId&gt;
               &lt;version&gt;4.11&lt;/version&gt;
               &lt;scope&gt;test&lt;/scope&gt;
           &lt;/dependency&gt;
      &lt;/dependencies&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>The way I install it</p>
  
  <pre><code>mvn clean install
  </code></pre>
  
  <p>The way I run it</p>
  
  <pre><code>mvn aether.example:my-aether-plugin:test
  </code></pre>
  
  <p>My output</p>
  
  <pre><code>TestMojo
  Session: null
  Repos: null
  repoSys: null
  </code></pre>
  
  <p>What's wrong with this?</p>