title: Maven error: package does not exist
body: <p>I am able build my java project on my local machine, it builds successfully using maven. However, when I build it on a Jenkins machine, i get a compile error:</p>
  
  <blockquote>
    <p>package <strong>javax.jms</strong> does not exist</p>
  </blockquote>
  
  <p>What does this mean? Where is it looking for <strong>javax.jms</strong>? In local m2 repo, classpath?</p>
  
  <p>I had to make the following changes to my pom.xml to get it to work on Linux:</p>
  
  <p>a) Explicitly stated maven-site-plugin version to 2.1.
         
                  org.apache.maven.plugins
                  maven-site-plugin
                  2.1
              </p>
  
  <p>b) Changed maven-surefire-plugin version from 2.4.3 to 2.18.1
                  maven-surefire-plugin
                  2.18.1   </p>
  
  <p>c) Added the following dependencies :               </p>
  
  <pre><code>     &lt;dependency&gt;
         &lt;groupId&gt;commons-io&lt;/groupId&gt;
         &lt;artifactId&gt;commons-io&lt;/artifactId&gt;
         &lt;version&gt;1.4&lt;/version&gt;
       &lt;/dependency&gt;
  
       &lt;dependency&gt;
          &lt;groupId&gt;commons-cli&lt;/groupId&gt;
          &lt;artifactId&gt;commons-cli&lt;/artifactId&gt;
          &lt;version&gt;1.2&lt;/version&gt;
        &lt;/dependency&gt;
  
        &lt;dependency&gt;
              &lt;groupId&gt;com.xx.yyy&lt;/groupId&gt;
              &lt;artifactId&gt;jms&lt;/artifactId&gt;
              &lt;version&gt;1.1&lt;/version&gt;
        &lt;/dependency&gt;
  
        &lt;dependency&gt;
              &lt;groupId&gt;com.xx.yyy&lt;/groupId&gt;
              &lt;artifactId&gt;orm&lt;/artifactId&gt;
              &lt;version&gt;3.1.0.5&lt;/version&gt;
         &lt;/dependency&gt;
  
         &lt;dependency&gt;
              &lt;groupId&gt;org.springframework.ldap&lt;/groupId&gt;
              &lt;artifactId&gt;spring-ldap-core&lt;/artifactId&gt;
              &lt;version&gt;1.3.0.RELEASE&lt;/version&gt;
         &lt;/dependency&gt;
  </code></pre>
  
  <p>Why do I have to change the pom.xml on Linux. The build works on my Windows 7 machine without changing the pom.xml.</p>