CAMEL-8759 enabling google error prone source code detector by using the profile errorprone
Project: http://git-wip-us.apache.org/repos/asf/camel/repo Commit: http://git-wip-us.apache.org/repos/asf/camel/commit/8c3e00a0 Tree: http://git-wip-us.apache.org/repos/asf/camel/tree/8c3e00a0 Diff: http://git-wip-us.apache.org/repos/asf/camel/diff/8c3e00a0 Branch: refs/heads/master Commit: 8c3e00a02206e1877c0d9cf9e484b31ddf4acf26 Parents: 32d845e Author: Willem Jiang <willem.ji...@gmail.com> Authored: Sun May 10 22:21:18 2015 +0800 Committer: Willem Jiang <willem.ji...@gmail.com> Committed: Sun May 10 22:26:23 2015 +0800 ---------------------------------------------------------------------- parent/pom.xml | 27 +++++++++++++++++++++++++++ pom.xml | 4 +++- 2 files changed, 30 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/camel/blob/8c3e00a0/parent/pom.xml ---------------------------------------------------------------------- diff --git a/parent/pom.xml b/parent/pom.xml index 41e082d..9086b67 100644 --- a/parent/pom.xml +++ b/parent/pom.xml @@ -3191,6 +3191,33 @@ </profile> <profile> + <id>errorprone</id> + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-compiler-plugin</artifactId> + <version>${maven-compiler-plugin-version}</version> + <configuration> + <source>${jdk.version}</source> + <target>${jdk.version}</target> + <maxmem>256M</maxmem> + <fork>${compiler.fork}</fork> + <compilerId>javac-with-errorprone</compilerId> + <forceJavacCompilerUse>true</forceJavacCompilerUse> + </configuration> + <dependencies> + <dependency> + <groupId>org.codehaus.plexus</groupId> + <artifactId>plexus-compiler-javac-errorprone</artifactId> + <version>${errorprone-version}</version> + </dependency> + </dependencies> + </plugin> + </plugins> + </build> + </profile> + <profile> <id>setup.eclipse</id> <build> <defaultGoal>process-test-sources</defaultGoal> http://git-wip-us.apache.org/repos/asf/camel/blob/8c3e00a0/pom.xml ---------------------------------------------------------------------- diff --git a/pom.xml b/pom.xml index 4e303a8..543800a 100755 --- a/pom.xml +++ b/pom.xml @@ -51,11 +51,13 @@ <!-- use maven compiler 2.5.1 as 3.0/3.1 recompiles everything even if nothingh has changed, or only 1 file, so 2.5.1 is much faster to use for development --> - <maven-compiler-plugin-version>2.5.1</maven-compiler-plugin-version> + <!-- change the maven comipler plugin version to 3.1 to enable google error prone source code detector --> + <maven-compiler-plugin-version>3.1</maven-compiler-plugin-version> <!-- eclipse plugin need the jaxb in this pom.xml file --> <!-- Make sure to keep JAXB version up to date in parent/pom.xml in the bottom of the file --> <jaxb-version>2.2.11</jaxb-version> + <errorprone-version>2.5</errorprone-version> </properties> <mailingLists>