groovy
  1. groovy
  2. GROOVY-3449

groovyc in 1.6.0 no longer supports 'deprecation' attribute on nested javac

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.6
    • Fix Version/s: 1.6.4, 1.7-beta-1
    • Component/s: Ant integration
    • Labels:
      None
    • Environment:
      Groovy 1.6.0, Ant 1.7.1, Java 1.5.0_16, Windows XP.
    • Number of attachments :
      0

      Description

      With Groovy 1.5.1 I used the 'deprecation' attribute on <javac> nested within the <groovyc> Ant task to have the compiler spit out deprecated API warnings:

      <groovyc ...>
      ...
      <javac deprecation="$

      {javac.deprecation}

      " .../>
      </groovyc>

      I'm trying to upgrade to Groovy 1.6.0 but it complains that 'deprecation' is no longer a supported attribute on <javac> (within <groovyc> that is - it still works fine from a regular <javac> call). If I invoke groovyc from AntBuilder (within a <groovy> element in my Ant script), the error goes away but the attribute has no effect. I can't find any way to get my deprecation warnings back.

        Activity

        Hide
        Alastair Rodgers added a comment -

        I also tried using jointCompilationOptions as currently documented at http://groovy.codehaus.org/The+groovyc+Ant+Task:

        jointCompilationOptions="-j -Fdeprecation -Fg -Jsource=1.4 -Jtarget=1.4"

        ...but it looks like this has been removed in Groovy 1.6.0 as I get the following error message:

        > groovyc doesn't support the "jointcompilationoptions" attribute

        Show
        Alastair Rodgers added a comment - I also tried using jointCompilationOptions as currently documented at http://groovy.codehaus.org/The+groovyc+Ant+Task: jointCompilationOptions="-j -Fdeprecation -Fg -Jsource=1.4 -Jtarget=1.4" ...but it looks like this has been removed in Groovy 1.6.0 as I get the following error message: > groovyc doesn't support the "jointcompilationoptions" attribute
        Hide
        Paul King added a comment -

        I wonder if the initial issue is being caused by GROOVY-3223? Don't think that applies to the jointCompilationOptions which I believe has been removed (it is comment out in the source code) in favor of the embedded javac command.

        Show
        Paul King added a comment - I wonder if the initial issue is being caused by GROOVY-3223 ? Don't think that applies to the jointCompilationOptions which I believe has been removed (it is comment out in the source code) in favor of the embedded javac command.
        Hide
        Paul King added a comment -

        Re my own question: I wonder if the initial issue is being caused by GROOVY-3223?

        No.

        Show
        Paul King added a comment - Re my own question: I wonder if the initial issue is being caused by GROOVY-3223 ? No.
        Hide
        Paul King added a comment -

        Turns out we were passing the -deprecation (and other flags) along to javac but then throwing the warning output away - only looking at it in the case of errors. There is a pending query on the dev list about whether we need a -silent flag but we can create a separate jira for that or just amend this one with a comment if we need a further minor change.

        Show
        Paul King added a comment - Turns out we were passing the -deprecation (and other flags) along to javac but then throwing the warning output away - only looking at it in the case of errors. There is a pending query on the dev list about whether we need a -silent flag but we can create a separate jira for that or just amend this one with a comment if we need a further minor change.

          People

          • Assignee:
            Paul King
            Reporter:
            Alastair Rodgers
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: