Maven에서는 자바 소스 컴파일시 옵션을 아래와 같이 추가할 수 있었습니다.

  <plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-compiler-plugin</artifactId>
    <configuration>
      <source>1.5</source>
      <target>1.5</target>
      <encoding>UTF-8</encoding>

    </configuration>
  </plugin>

Buildr에서는 compile 타스크의 options 속성을 통하거나

compile.options.target = '1.5'
compile.options.source = '1.5'
compile.options.other = ['-encoding', 'UTF-8']

또는 using 메소드를 사용하여 컴파일 옵션을 설정할 수 있습니다.
 
compile.using :target=>'1.5', :source=>'1.5', :other=>['-encoding', 'UTF-8']

옵션 설정에 사용할 수 있는 심볼은 다음과 같습니다.

  • :warnings — Issue warnings when compiling. True when running in verbose mode.
  • :debug — Generates bytecode with debugging information. Set from the debug              
  • :deprecation — If true, shows deprecation messages. False by default.
  • :source — Source code compatibility.
  • :target — Bytecode compatibility.
  • :lint — Lint option is one of true, false (default), name (e.g. ‘cast’) or array.
  • :other — Array of options passed to the compiler (e.g. ’-implicit:none’)
  • Posted by 에코지오
    ,