title: Jenkins build cannot find resources but maven does
body: <p>I am trying to setup Jenkins to automate project builds and I ran to the following problem. mvn clean install works perfectly from cmd but project build from jenkins fails when maven-antrun-plugin is being used. </p>
  
  <pre><code>[ERROR] Failed to execute goal org.apache.maven.plugins:maven-antrun-plugin:1.7:run
  (clientgen) on project Sample: 
  An Ant BuildException has occured: Compile failed; see the compiler error output for 
  details.
  [ERROR] around Ant part ...&lt;javac fork="yes" memoryInitialSize="512m" 
  destdir="E:\Jenkins\workspace\Trunk Builds\Sample\target/generated-sources" 
  memoryMaximumSize="1024m" srcdir="E:\Jenkins\workspace\Trunk Builds\Sample\target/build"
  source="1.4" classpathref="maven.plugin.classpath" executable="C:\j2sdk1.4.2_19/bin/javac" 
  target="1.4"/&gt;... @ 46:428 in 
  E:\Jenkins\workspace\Trunk Builds\Sample\target\antrun\build-main.xml
  </code></pre>
  
  <p>Jenkins is actually unable to check for the packages imported when I use maven-antrun-plugin.</p>
  
  <pre><code>[javac] E:/Jenkins/workspace/Trunk Builds/Sample/target/build/ClassSample.java:20: 
  package org.sample.package does not exist
  </code></pre>
  
  <p>Whenever I do not use maven-antrun-plugin Jenkin build succeeds. Any ideas why even though it works through cmd jenkins fail to build the project?</p>