This is for a pure java project. 

However, the java compiler is the JSR 308 Java 7 compiler... Which you
invoke by calling into a jar file. There is a batch/shellscript called
javac/javac.bat that makes it look like you're just calling javac but
really calling into the jar. 

The jar file compiles the source and then runs some extra type
checkers... Enforcing the @NotNull and @Untainted annotations at compile
time. 

You can see it all in a public svn repo if you /really/ want. 
  svn co http://svn.assembla.com/svn/SampleCode/jsr308/

        
--
Hamlet D'Arcy
[email protected]

> -----Original Message-----
> From: [email protected] [mailto:[email protected]] 
> Sent: Monday, December 29, 2008 2:22 PM
> To: [email protected]
> Subject: Re: [gradle-user] Can't set compile task executable 
> action or compilerarg values
> 
> 
> On Sun, 28 Dec 2008 09:15:06 -0600, "D'Arcy, Hamlet B"
> <[email protected]> said:
> > 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>
> > 
> > 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? 
> > 
> Is this for a pure Java project or for a mixed Groovy/Java project?
> > 
> > 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>
> > 
> > 
> > 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. 
> > 
> The problem is that the Groovydoc tool is pretty useless ATM. I will
> comment on your Jira on this. We will refactor the remaining Groovy
> classes in our core soon to Java anyway. Then this problem will be
> solved.
> 
> - Hans
> > 
> > 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