Skip to content

Commit

Permalink
Move the openjdk dependency back into a profile, so it doesn't appear…
Browse files Browse the repository at this point in the history
… as a transitive dependency to users.

Fixes issue 18
  • Loading branch information
alexeagle committed May 31, 2012
1 parent 4e70a2b commit b2064e6
Showing 1 changed file with 29 additions and 20 deletions.
49 changes: 29 additions & 20 deletions core/pom.xml
Expand Up @@ -15,7 +15,9 @@
limitations under the License.
-->

<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>

<parent>
Expand All @@ -37,24 +39,6 @@
<scope>compile</scope>
</dependency>

<!-- tools.jar is in the classpath by default on Apple-provided JDK
but not OpenJDK. We don't compile with Apple's JDK right now, so this
dependency is always included. If we ever need to run on the Apple JDK,
we could use a profile to exclude this dep, like:
<profile>
<id>tools-jar</id>
<activation>
<os>
<family>!mac</family>
</os>
-->
<dependency>
<groupId>openjdk</groupId>
<artifactId>tools</artifactId>
<version>1.6</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit-dep</artifactId>
Expand Down Expand Up @@ -102,6 +86,30 @@
</build>

<profiles>
<profile>
<id>tools-jar</id>
<!-- tools.jar is in the classpath by default on Apple-provided JDK
but not OpenJDK. We don't compile with Apple's JDK right now, so this
dependency is always included. If we ever need to run on the Apple JDK,
we could change the activation to exclude this dep, like:
<activation>
<os>
<family>!mac</family>
</os>
-->
<activation>
<activeByDefault>true</activeByDefault>
</activation>
<dependencies>
<dependency>
<groupId>openjdk</groupId>
<artifactId>tools</artifactId>
<version>1.6</version>
<scope>system</scope>
<systemPath>${java.home}/../lib/tools.jar</systemPath>
</dependency>
</dependencies>
</profile>
<!-- run annotation processor -->
<profile>
<id>run-annotation-processor</id>
Expand Down Expand Up @@ -132,7 +140,8 @@
<configuration>
<mainClass>com.google.errorprone.DocGen</mainClass>
<arguments>
<argument>${basedir}/target/generated-sources/annotations/bugPatterns.txt</argument>
<argument>${basedir}/target/generated-sources/annotations/bugPatterns.txt
</argument>
<argument>${basedir}/target/generated-wiki/</argument>
<argument>${basedir}/src/test/resources/</argument>
</arguments>
Expand Down

0 comments on commit b2064e6

Please sign in to comment.