title: Compilation error in Jenkins, but not in Eclipse and command line - Same machine and JDK
body: <p>I'm configuring a Jenkins environment at my local machine but I'm facing a very strange error. My application doesn't compile through Jenkins, but it works with Eclipse and command line (mvn install).</p>
  
  <p>Well, I'm using the same JDK, same Maven, same computer, same goals!
  Does anyone know the reason of this problem? 
  Really thanks for the attention.</p>
  
  <ul>
  <li>OS: Windows 7</li>
  <li>Maven: 3.2.3</li>
  <li>Java: 1.6.0.33</li>
  </ul>
  
  <p>Error: </p>
  
  <pre><code>[INFO] Compiling 213 source files to C:\Users\pimenta\.jenkins\jobs\M - Homolog\workspace\target\classes
  java.lang.NoClassDefFoundError: javax/validation/constraints/Size
      at org.hibernate.validator.ap.util.ConstraintHelper.&lt;init&gt;(ConstraintHelper.java:163)
      at org.hibernate.validator.ap.ConstraintAnnotationVisitor.&lt;init&gt;(ConstraintAnnotationVisitor.java:64)
      at org.hibernate.validator.ap.ConstraintValidationProcessor.process(ConstraintValidationProcessor.java:101)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.callProcessor(JavacProcessingEnvironment.java:624)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.discoverAndRunProcs(JavacProcessingEnvironment.java:553)
      at com.sun.tools.javac.processing.JavacProcessingEnvironment.doProcessing(JavacProcessingEnvironment.java:698)
      at com.sun.tools.javac.main.JavaCompiler.processAnnotations(JavaCompiler.java:981)
      at com.sun.tools.javac.main.JavaCompiler.compile(JavaCompiler.java:727)
      at com.sun.tools.javac.main.Main.compile(Main.java:353)
      at com.sun.tools.javac.main.Main.compile(Main.java:279)
      at com.sun.tools.javac.main.Main.compile(Main.java:270)
      at com.sun.tools.javac.Main.compile(Main.java:87)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.plexus.compiler.javac.JavacCompiler.compileInProcess(JavacCompiler.java:554)
      at org.codehaus.plexus.compiler.javac.JavacCompiler.compile(JavacCompiler.java:161)
      at org.apache.maven.plugin.AbstractCompilerMojo.execute(AbstractCompilerMojo.java:605)
      at org.apache.maven.plugin.CompilerMojo.execute(CompilerMojo.java:128)
      at org.apache.maven.plugin.DefaultBuildPluginManager.executeMojo(DefaultBuildPluginManager.java:132)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:208)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:153)
      at org.apache.maven.lifecycle.internal.MojoExecutor.execute(MojoExecutor.java:145)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:116)
      at org.apache.maven.lifecycle.internal.LifecycleModuleBuilder.buildProject(LifecycleModuleBuilder.java:80)
      at org.apache.maven.lifecycle.internal.builder.singlethreaded.SingleThreadedBuilder.build(SingleThreadedBuilder.java:51)
      at org.apache.maven.lifecycle.internal.LifecycleStarter.execute(LifecycleStarter.java:120)
      at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:347)
      at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:154)
      at org.jvnet.hudson.maven3.launcher.Maven32Launcher.main(Maven32Launcher.java:132)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launchStandard(Launcher.java:330)
      at org.codehaus.plexus.classworlds.launcher.Launcher.launch(Launcher.java:238)
      at jenkins.maven3.agent.Maven32Main.launch(Maven32Main.java:181)
      at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
      at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
      at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
      at java.lang.reflect.Method.invoke(Method.java:597)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:136)
      at hudson.maven.Maven3Builder.call(Maven3Builder.java:71)
      at hudson.remoting.UserRequest.perform(UserRequest.java:121)
      at hudson.remoting.UserRequest.perform(UserRequest.java:49)
      at hudson.remoting.Request$2.run(Request.java:324)
      at hudson.remoting.InterceptingExecutorService$1.call(InterceptingExecutorService.java:68)
      at java.util.concurrent.FutureTask$Sync.innerRun(FutureTask.java:303)
      at java.util.concurrent.FutureTask.run(FutureTask.java:138)
      at java.util.concurrent.ThreadPoolExecutor$Worker.runTask(ThreadPoolExecutor.java:885)
      at java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:907)
      at java.lang.Thread.run(Thread.java:619)
  Caused by: java.lang.ClassNotFoundException: javax.validation.constraints.Size
      at java.net.URLClassLoader$1.run(URLClassLoader.java:200)
      at java.security.AccessController.doPrivileged(Native Method)
      at java.net.URLClassLoader.findClass(URLClassLoader.java:188)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:306)
      at java.lang.ClassLoader.loadClass(ClassLoader.java:251)
      at java.lang.ClassLoader.loadClassInternal(ClassLoader.java:319)
      ... 53 more
  [INFO] -------------------------------------------------------------
  </code></pre>