title: ClassNotFoundException when compiling JRXML with Maven
body: <p>I use in my JRXML some object of my application <strong>A</strong> like this :</p>
  
  <pre><code>&lt;jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="ResportTest" pageWidth="842" pageHeight="595" orientation="Landscape" whenNoDataType="AllSectionsNoDetail" columnWidth="802" leftMargin="20" rightMargin="20" topMargin="20" bottomMargin="20"&gt;
  &lt;property name="ireport.zoom" value="1.5394743546921226"/&gt;
  &lt;property name="ireport.x" value="0"/&gt;
  &lt;property name="ireport.y" value="0"/&gt;
  &lt;import value="com.test.app.EnumOne"/&gt;
  &lt;import value="com.test.app.Test1DTO"/&gt;
  &lt;import value="com.test.app.Test1Sub1DTO"/&gt;
  &lt;import value="com.test.app.Test1Sub2DTO"/&gt;
  &lt;import value="com.test.app.Test2DTO"/&gt;
  &lt;import value="com.test.app.EnumTwo"/&gt;
  </code></pre>
  
  <p>With iReport, i have added my <em>target/classes</em> directory to classpath, everythink is OK.</p>
  
  <p>Now, when i try to compile my JRXML with maven (mvn clean install), i've got an error :</p>
  
  <pre><code>[INFO] ------------------------------------------------------------------------
  [INFO] BUILD FAILURE
  [INFO] ------------------------------------------------------------------------
  [INFO] Total time: 12.949 s
  [INFO] Finished at: 2015-04-10T08:17:26+01:00
  [INFO] Final Memory: 39M/112M
  [INFO] ------------------------------------------------------------------------
  [ERROR] Failed to execute goal org.codehaus.mojo:jasperreports-maven-plugin:1.0-beta-1:compile-reports (default) on project projectOne: Error co
  mpiling report design : C:\ws\projectOne\src\main\resources\jasper\jrxml\ReportTest.jrxml: Error compiling report d
  esign : C:\ws\projectOne\src\main\resources\jasper\jrxml\ReportTest.jrxml : Report design not valid :
  [ERROR] 1. java.lang.ClassNotFoundException: com.test.app.EnumOne
  [ERROR] 2. java.lang.ClassNotFoundException: com.test.app.EnumTwo
  [ERROR] 3. java.lang.ClassNotFoundException: com.test.app.Test2DTO
  </code></pre>
  
  <p>When my build fail, maven had already compile all classe in target/classes.
  I don't undestand why maven can't find EnumOne, EnumTwo and Test2DTO when it can find the other.</p>
  
  <p>Here my pom.xml for jasper:</p>
  
  <pre><code>              &lt;plugin&gt;
                  &lt;groupId&gt;org.codehaus.mojo&lt;/groupId&gt;
                  &lt;artifactId&gt;jasperreports-maven-plugin&lt;/artifactId&gt;
                  &lt;version&gt;${version.jasperreports-plugin}&lt;/version&gt;
                  &lt;configuration&gt;
                      &lt;sourceDirectory&gt;src/main/resources/jasper/jrxml&lt;/sourceDirectory&gt;
                      &lt;outputDirectory&gt;src/main/resources/jasper/jasper&lt;/outputDirectory&gt;
                      &lt;compiler&gt;net.sf.jasperreports.engine.design.JRJavacCompiler&lt;/compiler&gt;
                  &lt;/configuration&gt;
                  &lt;executions&gt;
                      &lt;execution&gt;
                          &lt;goals&gt;
                              &lt;goal&gt;compile-reports&lt;/goal&gt;
                          &lt;/goals&gt;
                          &lt;phase&gt;compile&lt;/phase&gt;
                      &lt;/execution&gt;
                  &lt;/executions&gt;
                  &lt;dependencies&gt;
                      &lt;dependency&gt;
                          &lt;groupId&gt;net.sf.jasperreports&lt;/groupId&gt;
                          &lt;artifactId&gt;jasperreports&lt;/artifactId&gt;
                          &lt;version&gt;${version.jasperreports}&lt;/version&gt;
                      &lt;/dependency&gt;
                  &lt;/dependencies&gt;
              &lt;/plugin&gt;
  </code></pre>