Skip to content

Commit

Permalink
Mention external deps in installation instructions
Browse files Browse the repository at this point in the history
Fixes #1143
  • Loading branch information
cushon committed Nov 24, 2018
1 parent 2c30e2c commit 923b507
Showing 1 changed file with 13 additions and 3 deletions.
16 changes: 13 additions & 3 deletions docs/installation.md
Expand Up @@ -127,6 +127,8 @@ Download the following artifacts from maven:

* [error_prone_core-2.3.2-with-dependencies.jar](https://repo1.maven.org/maven2/com/google/errorprone/error_prone_core/2.3.2/error_prone_core-2.3.2-with-dependencies.jar)
* [jFormatString-3.0.0.jar](https://repo1.maven.org/maven2/com/google/code/findbugs/jFormatString/3.0.0/jFormatString-3.0.0.jar)
* [dataflow-2.5.7.jar](https://repo1.maven.org/maven2/org/checkerframework/dataflow/2.5.7/dataflow-2.5.7.jar)
* [javacutil-2.5.7.jar](https://repo1.maven.org/maven2/org/checkerframework/javacutil/2.5.7/javacutil-2.5.7.jar)
* [javac-9+181-r4173-1.jar](https://repo1.maven.org/maven2/com/google/errorprone/javac/9+181-r4173-1/javac-9+181-r4173-1.jar)

and add the following javac task to your project's `build.xml` file:
Expand All @@ -142,6 +144,8 @@ and add the following javac task to your project's `build.xml` file:
<path id="processorpath.ref">
<pathelement location="${user.home}/.m2/repository/com/google/errorprone/error_prone_core/2.3.3-SNAPSHOT/error_prone_core-2.3.3-SNAPSHOT-with-dependencies.jar"/>
<pathelement location="${user.home}/.m2/repository/com/google/code/findbugs/jFormatString/3.0.0/jFormatString-3.0.0.jar"/>
<pathelement location="${user.home}/.m2/repository/org/checkerframework/dataflow/2.5.7/dataflow-2.5.7.jar"/>
<pathelement location="${user.home}/.m2/repository/org/checkerframework/javacutil/2.5.7/javacutil-2.5.7.jar"/>
<!-- Add annotation processors and Error Prone custom checks here if needed -->
</path>

Expand Down Expand Up @@ -209,9 +213,12 @@ Example:

```bash
wget https://repo1.maven.org/maven2/com/google/errorprone/error_prone_core/2.3.2/error_prone_core-2.3.2-with-dependencies.jar
wget https://repo1.maven.org/maven2/org/checkerframework/dataflow/2.5.7/dataflow-2.5.7.jar
wget https://repo1.maven.org/maven2/org/checkerframework/javacutil/2.5.7/javacutil-2.5.7.jar
wget https://repo1.maven.org/maven2/com/google/code/findbugs/jFormatString/3.0.0/jFormatString-3.0.0.jar
javac \
-XDcompilePolicy=simple \
-processorpath error_prone_core-2.3.2-with-dependencies.jar \
-processorpath error_prone_core-2.3.2-with-dependencies.jar:dataflow-2.5.7.jar:javacutil-2.5.7.jar:jFormatString-3.0.0.jar \
'-Xplugin:ErrorProne -XepDisableAllChecks -Xep:CollectionIncompatibleType:ERROR' \
ShortSet.java
```
Expand All @@ -229,12 +236,15 @@ ShortSet.java:8: error: [CollectionIncompatibleType] Argument 'i - 1' should not
To use Error Prone from the command line as a javac replacement:

```
wget https://repo1.maven.org/maven2/com/google/errorprone/javac/9+181-r4173-1/javac-9+181-r4173-1.jar
wget https://repo1.maven.org/maven2/com/google/errorprone/error_prone_core/2.3.2/error_prone_core-2.3.2-with-dependencies.jar
wget https://repo1.maven.org/maven2/org/checkerframework/dataflow/2.5.7/dataflow-2.5.7.jar
wget https://repo1.maven.org/maven2/org/checkerframework/javacutil/2.5.7/javacutil-2.5.7.jar
wget https://repo1.maven.org/maven2/com/google/code/findbugs/jFormatString/3.0.0/jFormatString-3.0.0.jar
wget https://repo1.maven.org/maven2/com/google/errorprone/javac/9+181-r4173-1/javac-9+181-r4173-1.jar
javac \
-J-Xbootclasspath/p:javac-9+181-r4173-1.jar \
-XDcompilePolicy=simple \
-processorpath error_prone_core-2.3.2-with-dependencies.jar \
-processorpath error_prone_core-2.3.2-with-dependencies.jar:dataflow-2.5.7.jar:javacutil-2.5.7.jar:jFormatString-3.0.0.jar \
'-Xplugin:ErrorProne -XepDisableAllChecks -Xep:CollectionIncompatibleType:ERROR' \
ShortSet.java
```
Expand Down

0 comments on commit 923b507

Please sign in to comment.