title: Use the eclipse compiler in a maven component
body: <p>I am working on a fairly big Maven project, and develop in Java with Eclipse.</p>
  
  <p>To save compilation time, I would like Maven and Eclipse to share
  the same target, which I managed to do. However when I compile with
  Maven, Eclipse lacks some stuff that it puts in the bytecode, so it
  recompiles everything (from what I understand). I am talking about the "build automatically" feature here, so it is not Eclipse delegating the build to Maven.</p>
  
  <p>To solve this, I thought I would ask Maven to use the same compiler as Eclipse.
  After some search on the web, I found out I could add this in the top <code>pom</code>:</p>
  
  <pre><code>&lt;build&gt;
  ...
  &lt;plugins&gt;
  ...
  &lt;plugin&gt;
     &lt;groupId&gt;org.apache.maven.plugins&lt;/groupId&gt;
     &lt;artifactId&gt;maven-compiler-plugin&lt;/artifactId&gt;
     &lt;configuration&gt;
             &lt;compilerId&gt;eclipse&lt;/compilerId&gt;
             &lt;source&gt;1.5&lt;/source&gt;
             &lt;target&gt;1.5&lt;/target&gt;
             &lt;optimize&gt;true&lt;/optimize&gt;
     &lt;/configuration&gt;
     &lt;dependencies&gt;
             &lt;dependency&gt;
                     &lt;groupId&gt;org.codehaus.plexus&lt;/groupId&gt;
                     &lt;artifactId&gt;plexus-compiler-eclipse&lt;/artifactId&gt;
                     &lt;version&gt;1.8.1&lt;/version&gt;
             &lt;/dependency&gt;
     &lt;/dependencies&gt;
  &lt;/plugin&gt;
  &lt;/plugins&gt;
  &lt;/build&gt;
  </code></pre>
  
  <p>This seems to work, but the build fails fairly quickly with lots of
  errors, while it succeeds with javac.
  I'm not sure why, but it seems that there is some conflicts linked to
  the fact the failing Java files are generated files.</p>
  
  <p>So I thought I could try to use the Eclipse compiler only for the
  component I am working on (which does not have that kind of generated
  files). I added the above snippet in the <code>pom</code> of my component, but when
  the build reaches my component, the following error is raised:</p>
  
  <blockquote>
    <p><strong>No such compiler 'eclipse'</strong></p>
  </blockquote>
  
  <p>I also tried to add the <code>plexus-compiler-eclipse</code> dependency in the
  dependencies listed in the top pom, but same error.</p>
  
  <p>Do you know if what I am trying to do is possible? Any hint of how I can do it?</p>