title: Maven can't compile class which depends on rt.jar
body: <p>CI-server (Hudson), for which I am responsible, builds Maven project. After the last commit, the build failed:</p>
  
  <pre><code>[INFO] -------------------------------------------------------------
  [ERROR] COMPILATION ERROR : 
  [INFO] -------------------------------------------------------------
  [ERROR] \hudson\jobs\path to my class\MyClass.java:[33,62] package com.sun.xml.internal.messaging.saaj.packaging.mime.util does not exist
  [ERROR] \hudson\jobs\path to my class\MyClass.java:[75,5] cannot find symbol
          symbol  : class BASE64EncoderStream
          location: class |fullname of MyClass|
  [ERROR] \hudson\jobs\path to my class\MyClass.java:[75,38] cannot find symbol
          symbol  : class BASE64EncoderStream
          location: class |fullname of MyClass|
  [INFO] 3 errors
  </code></pre>
  
  <p>Required class (com.sun.xml.internal.messaging.saaj.packaging.mime.util.BASE64EncoderStream) is situated in rt.jar.</p>
  
  <p>I tried (In accordance with the instructions at <a href="http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#System_Dependencies" rel="noreferrer">http://maven.apache.org/guides/introduction/introduction-to-dependency-mechanism.html#System_Dependencies</a>) to add system dependency in project's pom.xml:</p>
  
  <pre><code>&lt;dependency&gt;
      &lt;groupId&gt;dummy&lt;/groupId&gt;
      &lt;artifactId&gt;dummy&lt;/artifactId&gt;
      &lt;version&gt;1&lt;/version&gt;
      &lt;scope&gt;system&lt;/scope&gt;
      &lt;systemPath&gt;${java.home}/lib/rt.jar&lt;/systemPath&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>It did not help.</p>
  
  <p>The most interesting is that all files compiled fine on the local machine of my collegue (he use Eclipse build-in compiler).</p>
  
  <p>In internet I found the same question (link: <a href="http://maven.40175.n5.nabble.com/Why-can-t-Maven-find-com-sun-xml-internal-messaging-saaj-util-ByteOutputStream-class-td107361.html" rel="noreferrer">http://maven.40175.n5.nabble.com/Why-can-t-Maven-find-com-sun-xml-internal-messaging-saaj-util-ByteOutputStream-class-td107361.html</a>). The last answer was that the reason for this trouble is Oracle's Java compiler.</p>
  
  <p>So, I changed Oracle's jdk to OpenJDK, but it did not help.</p>
  
  <p>Does someone have any suggestions on how to solve this problem?</p>