You are viewing an old version of this page. View the current version.

Compare with Current View Page History

Version 1 Next »

Eclipse has a more nitpicky compiler than the standard javac, and jenkins and other tools can collect these warnings.

Buildr helpfully, has a way of installing and running the compiler, here is an example:

{{
load 'buildfile.dependencies'

require 'buildr/java/ecj'

include Buildr::Compiler

define "project-ecj" do
options.test = "no"
compile.with(DEPENDENCIES)
compile.using(
:warnings=>true,
:debug=>true,
:deprecation=>true,
:target=>'1.6',
:source=>'1.6',
:lint=>true,

  1. :other=>"-verbose","-Xmaxerrs", "9999","-Xmaxwarns", "9999"
    )
    end
    }}

The ecj.rb file is hardcoded to version 3.5.1, which is pretty old. You can update to 4.2.2 (or later) by using the http://buildr.apache.org/settings_profiles.html#buildbuild.yaml , or setting the version number in the extension directly (not recommended).

  • No labels