D'Arcy, Hamlet B wrote:
I've been spinning on this problem for a few hours and thought I'd check to see if anyone can help...

Problem 1: I can't set the executable option on my compile task. 

I'm trying to replace the basic javac invocation with my own batch file. In Ant, you'd do something like this: 
<target name="check-interning" depends="clean">
    <javac ...
           executable="D:/dev/jsr308/checkers/binary/javac.bat">
      ...
    </javac>
</target>

  

Try:

compile.options.fork(executable: '...')

I've tried several ways to get this 'executable' option into my compile task with no success. I've tried things like: 
compile {
  options.executable = "D:\\dev\\jsr308\\checkers\\binary\\javac.bat"
}
compile.options.executable = "D:\\dev\\jsr308\\checkers\\binary\\javac.bat"
compile.options.define(executable: "D:\\dev\\jsr308\\checkers\\binary\\javac.bat")

all with no success. How can I get this darn option into my task? 


Problem 2: I can't get compilerarg values into the compile task. 
Again, I've tried to pass these values a few different ways with no success. How do I get compilerarg values into the task? My sample Ant is: 

  <target name="check-interning" depends="clean">
    <javac ...
           executable="${env.JSR308}/jdk1.7.0/bin/javac">
      <compilerarg value="-version"/>
      <compilerarg line="-target 5"/>
      <compilerarg line="-processor checkers.interning.InterningChecker"/>
      ...
    </javac>
  </target>

  

The compile task does not currently support compiler args. Could you file a JIRA issue?

In the meantime, you could use the ant javac task. Or a custom javac script.

Problem 3: There's no Java/GroovyDoc for CompileOptions in the API online. Can you use GroovyDoc to generate it? It would have eliminated me pouring over the groovy source to discover the CompileOptions API. 


  

We do actually try to generate the groovydocs when we build the distribution, however groovydoc blows up with a NPE, and nobody has gotten round to figuring out why. Probably because groovydocs are pretty much useless.

Thanks in advance for any advice, 

--
Hamlet D'Arcy
[email protected]
  

--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email
--------------------------------------------------------------------- To unsubscribe from this list, please visit: http://xircles.codehaus.org/manage_email

Reply via email to