title: Maven build error: Failed to execute goal, missing a class
body: <p>I'm trying to package the sample application from vaadin 7.0.0 with the maven plugin for eclipse, but every time a run the goal "package", building fails with the following error:</p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile (default-compile) on project essai: Execution default-compile of goal org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile failed: A required class was missing while executing org.apache.maven.plugins:maven-compiler-plugin:2.3.2:compile: org/codehaus/plexus/compiler/util/scan/InclusionScanException
  [ERROR] -----------------------------------------------------
  [ERROR] realm =    plugin&gt;org.apache.maven.plugins:maven-compiler-plugin:2.3.2
  [ERROR] strategy = org.codehaus.plexus.classworlds.strategy.SelfFirstStrategy
  [ERROR] urls[0] = file:/C:/Users/Benoit/.m2/repository/org/apache/maven/plugins/maven-compiler-plugin/2.3.2/maven-compiler-plugin-2.3.2.jar
  [ERROR] urls[1] = file:/C:/Users/Benoit/.m2/repository/org/codehaus/plexus/plexus-utils/1.1/plexus-utils-1.1.jar
  [ERROR] Number of foreign imports: 1
  [ERROR] import: Entry[import  from realm ClassRealm[maven.api, parent: null]]
  </code></pre>
  
  <p>The result of mvn package -X is here: <a href="http://pastebin.com/jk5uW8Ut" rel="noreferrer">http://pastebin.com/jk5uW8Ut</a></p>
  
  <p>My pom.xml is the following:
      
      http://maven.apache.org/maven-v4_0_0.xsd">
      4.0.0
      com.mycompany
      essai
      war
      0.0.1-SNAPSHOT
      Vaadin Web Application</p>
  
  <pre><code>&lt;properties&gt;
      &lt;project.build.sourceEncoding&gt;UTF-8&lt;/project.build.sourceEncoding&gt;
      &lt;vaadin.version&gt;7.0.0.rc2&lt;/vaadin.version&gt;
      &lt;vaadin.plugin.version&gt;${vaadin.version}&lt;/vaadin.plugin.version&gt;
  &lt;/properties&gt;
  &lt;repositories&gt;
      &lt;repository&gt;
          &lt;id&gt;vaadin-addons&lt;/id&gt;
          &lt;url&gt;http://maven.vaadin.com/vaadin-addons&lt;/url&gt;
      &lt;/repository&gt;
      &lt;repository&gt;
          &lt;id&gt;vaadin-snapshots&lt;/id&gt;
          &lt;url&gt;http://oss.sonatype.org/content/repositories/vaadin-snapshots/&lt;/url&gt;
          &lt;releases&gt;
              &lt;enabled&gt;false&lt;/enabled&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/snapshots&gt;
      &lt;/repository&gt;
  &lt;/repositories&gt;
  &lt;pluginRepositories&gt;
      &lt;pluginRepository&gt;
          &lt;id&gt;vaadin-snapshots&lt;/id&gt;
          &lt;url&gt;http://oss.sonatype.org/content/repositories/vaadin-snapshots/&lt;/url&gt;
          &lt;releases&gt;
              &lt;enabled&gt;false&lt;/enabled&gt;
          &lt;/releases&gt;
          &lt;snapshots&gt;
              &lt;enabled&gt;true&lt;/enabled&gt;
          &lt;/snapshots&gt;
      &lt;/pluginRepository&gt;
  &lt;/pluginRepositories&gt;
  &lt;dependencies&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
          &lt;artifactId&gt;vaadin-server&lt;/artifactId&gt;
          &lt;version&gt;${vaadin.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
          &lt;artifactId&gt;vaadin-client-compiled&lt;/artifactId&gt;
          &lt;version&gt;${vaadin.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
          &lt;artifactId&gt;vaadin-client&lt;/artifactId&gt;
          &lt;version&gt;${vaadin.version}&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
          &lt;artifactId&gt;vaadin-themes&lt;/artifactId&gt;
          &lt;version&gt;${vaadin.version}&lt;/version&gt;
      &lt;/dependency&gt;
      &lt;dependency&gt;
          &lt;groupId&gt;javax.servlet&lt;/groupId&gt;
          &lt;artifactId&gt;servlet-api&lt;/artifactId&gt;
          &lt;version&gt;2.4&lt;/version&gt;
          &lt;scope&gt;provided&lt;/scope&gt;
      &lt;/dependency&gt;
  &lt;/dependencies&gt;
  
  &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;source&gt;1.6&lt;/source&gt;
                  &lt;target&gt;1.6&lt;/target&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;!-- As we are doing "inplace" GWT compilation, ensure the widgetset --&gt;
          &lt;!-- directory is cleaned properly --&gt;
          &lt;plugin&gt;
              &lt;artifactId&gt;maven-clean-plugin&lt;/artifactId&gt;
              &lt;version&gt;2.4.1&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;filesets&gt;
                      &lt;fileset&gt;
                          &lt;directory&gt;src/main/webapp/VAADIN/widgetsets&lt;/directory&gt;
                      &lt;/fileset&gt;
                  &lt;/filesets&gt;
              &lt;/configuration&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
              &lt;artifactId&gt;vaadin-maven-plugin&lt;/artifactId&gt;
              &lt;version&gt;${vaadin.plugin.version}&lt;/version&gt;
              &lt;configuration&gt;
                  &lt;extraJvmArgs&gt;-Xmx512M -Xss1024k&lt;/extraJvmArgs&gt;
                  &lt;!-- &lt;runTarget&gt;mobilemail&lt;/runTarget&gt; --&gt;
                  &lt;!-- We are doing "inplace" but into subdir VAADIN/widgetsets. This 
                      way compatible with Vaadin eclipse plugin. --&gt;
                  &lt;webappDirectory&gt;${basedir}/src/main/webapp/VAADIN/widgetsets
                  &lt;/webappDirectory&gt;
                  &lt;hostedWebapp&gt;${basedir}/src/main/webapp/VAADIN/widgetsets
                  &lt;/hostedWebapp&gt;
                  &lt;noServer&gt;true&lt;/noServer&gt;
                  &lt;!-- Remove draftCompile when project is ready --&gt;
                  &lt;draftCompile&gt;false&lt;/draftCompile&gt;
                  &lt;compileReport&gt;true&lt;/compileReport&gt;
                  &lt;style&gt;OBF&lt;/style&gt;
                  &lt;strict&gt;true&lt;/strict&gt;
                  &lt;runTarget&gt;http://localhost:8080/&lt;/runTarget&gt;
              &lt;/configuration&gt;
              &lt;executions&gt;
                  &lt;execution&gt;
                      &lt;configuration&gt;
                          &lt;!-- if you don't specify any modules, the plugin will find them --&gt;
                          &lt;!-- &lt;modules&gt;     &lt;module&gt;com.vaadin.demo.mobilemail.gwt.ColorPickerWidgetSet&lt;/module&gt; 
                              &lt;/modules&gt; --&gt;
                      &lt;/configuration&gt;
                      &lt;goals&gt;
                          &lt;goal&gt;resources&lt;/goal&gt;
                          &lt;goal&gt;update-widgetset&lt;/goal&gt;
                          &lt;goal&gt;compile&lt;/goal&gt;
                      &lt;/goals&gt;
                  &lt;/execution&gt;
              &lt;/executions&gt;
          &lt;/plugin&gt;
          &lt;plugin&gt;
              &lt;groupId&gt;org.mortbay.jetty&lt;/groupId&gt;
              &lt;artifactId&gt;jetty-maven-plugin&lt;/artifactId&gt;
          &lt;/plugin&gt;
      &lt;/plugins&gt;
      &lt;pluginManagement&gt;
          &lt;plugins&gt;
              &lt;!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.--&gt;
              &lt;plugin&gt;
                  &lt;groupId&gt;org.eclipse.m2e&lt;/groupId&gt;
                  &lt;artifactId&gt;lifecycle-mapping&lt;/artifactId&gt;
                  &lt;version&gt;1.0.0&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;lifecycleMappingMetadata&gt;
                          &lt;pluginExecutions&gt;
                              &lt;pluginExecution&gt;
                                  &lt;pluginExecutionFilter&gt;
                                      &lt;groupId&gt;com.vaadin&lt;/groupId&gt;
                                      &lt;artifactId&gt;
                                          vaadin-maven-plugin
                                      &lt;/artifactId&gt;
                                      &lt;versionRange&gt;
                                          [7.0.0.rc2,)
                                      &lt;/versionRange&gt;
                                      &lt;goals&gt;
                                          &lt;goal&gt;resources&lt;/goal&gt;
                                          &lt;goal&gt;update-widgetset&lt;/goal&gt;
                                          &lt;goal&gt;compile&lt;/goal&gt;
                                      &lt;/goals&gt;
                                  &lt;/pluginExecutionFilter&gt;
                                  &lt;action&gt;
                                      &lt;ignore&gt;&lt;/ignore&gt;
                                  &lt;/action&gt;
                              &lt;/pluginExecution&gt;
                          &lt;/pluginExecutions&gt;
                      &lt;/lifecycleMappingMetadata&gt;
                  &lt;/configuration&gt;
              &lt;/plugin&gt;
          &lt;/plugins&gt;
      &lt;/pluginManagement&gt;
  &lt;/build&gt;
  &lt;/project&gt;
  </code></pre>
  
  <p>I'm new to maven and even if I found many post about this error, I haven't been able to understand what could cause this error.</p>