title: JDK tools.jar as maven dependency
body: <p>I would like to put JDK tools.jar as compile dependency. I found some examples that indicate to use the <strong>systemPath</strong> property like the following:</p>
  
  <pre><code>&lt;dependency&gt;
    &lt;groupId&gt;com.sun&lt;/groupId&gt;
    &lt;artifactId&gt;tools&lt;/artifactId&gt;
    &lt;scope&gt;system&lt;/scope&gt;
    &lt;systemPath&gt;${java.home}/../lib/tools.jar&lt;/systemPath&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>The problem is that the path is not correct for Mac Os X (however it is correct for Windows and Linux). For it, the correct path is <strong>${java.home}/../Classes/classes.jar</strong>.</p>
  
  <p>I am looking for a way in order to define a maven property such that if system is detected as Mac Os X, value is set to <strong>${java.home}/../Classes/classes.jar</strong>, otherwise it is set <strong>to ${java.home}/../lib/tools.jar</strong> (like it is possible to do with ANT). Does someone has an idea ?</p>