NanoContainer
  1. NanoContainer
  2. NANO-161

Compilation of groovy test cases fails using Groovy Ant task

    Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Fixed
    • Affects Version/s: 1.0-RC2
    • Fix Version/s: 1.0-RC2
    • Component/s: groovy
    • Labels:
      None
    • Number of attachments :
      0

      Description

      Using the groovyc Ant task org.codehaus.groovy.ant.Groovyc to compile
      the groovy test cases yields following error:

      Can't find/access AST Node typeorg.codehaus.groovy.antlr.GroovySourceAST

      BUILD FAILED
      File...... /Users/mauro/svn/nanocontainer/container/maven.xml
      Element... groovyc
      Line...... 23
      Column.... 70
      UNCAUGHT EXCEPTION: antlr.CommonAST

        Activity

        Hide
        Michael Rimov added a comment -

        Yeah, I found the comment in the maven code RIGHT after I posted. So I've been working with it. So far it appears that:

        1 - I need groovy-all-jsr-03.jar instead of groovy-jsr-03.jar as a dependency for it to work.

        2 - The test scripts seem to be pretty old. They don't conform to jsr standards such as using the def keyword for untyped variables. I'm currently wading through it right now.

        Any comments on whether it is kosher to require groovy-all?

        Otherwise, hopefully I'll actually have it working in an hour or so!

        -Mike (R)

        Show
        Michael Rimov added a comment - Yeah, I found the comment in the maven code RIGHT after I posted. So I've been working with it. So far it appears that: 1 - I need groovy-all-jsr-03.jar instead of groovy-jsr-03.jar as a dependency for it to work. 2 - The test scripts seem to be pretty old. They don't conform to jsr standards such as using the def keyword for untyped variables. I'm currently wading through it right now. Any comments on whether it is kosher to require groovy-all? Otherwise, hopefully I'll actually have it working in an hour or so! -Mike (R)
        Hide
        Michael Rimov added a comment -

        Ok, initial fix is checked in so it at least runs and Groovy Scripts compile properly again against groovy-all-jsr-03.

        Still todo would be to resolve what missing dependency is required so we don't necessarily need groovy-all?

        Personally, I don't mind groovy-all, but I can understand that it would affect others.

        -Mike (R)

        Show
        Michael Rimov added a comment - Ok, initial fix is checked in so it at least runs and Groovy Scripts compile properly again against groovy-all-jsr-03. Still todo would be to resolve what missing dependency is required so we don't necessarily need groovy-all? Personally, I don't mind groovy-all, but I can understand that it would affect others. -Mike (R)
        Hide
        Paul Hammant added a comment -

        I think http://jira.codehaus.org/browse/GROOVY-991 is the cause of this. At least that's what we've believed for some time.

        Show
        Paul Hammant added a comment - I think http://jira.codehaus.org/browse/GROOVY-991 is the cause of this. At least that's what we've believed for some time.
        Hide
        Michael Rimov added a comment -

        I took a look at the Ant Task Troubleshooting to see if I could get anywhere on their other suggestions. However, it seems that the docs are a bit out of date because groovy-jsr-03 does not appear to contain org.codehaus.groovy.ant.RootLoaderRef as specified in their solution #2.

        Show
        Michael Rimov added a comment - I took a look at the Ant Task Troubleshooting to see if I could get anywhere on their other suggestions. However, it seems that the docs are a bit out of date because groovy-jsr-03 does not appear to contain org.codehaus.groovy.ant.RootLoaderRef as specified in their solution #2.
        Hide
        Mauro Talevi added a comment -

        Let's wait for groovy jsr-04 release which is meant to be around the corner,
        and I understand it, a RC for 1.0-final.

        GROOVY-991 is fixed in 991.

        Show
        Mauro Talevi added a comment - Let's wait for groovy jsr-04 release which is meant to be around the corner, and I understand it, a RC for 1.0-final. GROOVY-991 is fixed in 991.
        Hide
        Mauro Talevi added a comment -

        I meant is fixed in jsr-04

        Show
        Mauro Talevi added a comment - I meant is fixed in jsr-04
        Hide
        Paul Hammant added a comment -

        1.0-JSR-04 does not fix this. I.e. depending on the non -all jar. I've just tried to get Nano building with that version.

        I think we should work with the other solution mentioned on http://groovy.codehaus.org/Ant+Task+Troubleshooting

        That or we all upgrade to Maven 2.0, assuming its better at classloader juggling.

        Show
        Paul Hammant added a comment - 1.0-JSR-04 does not fix this. I.e. depending on the non -all jar. I've just tried to get Nano building with that version. I think we should work with the other solution mentioned on http://groovy.codehaus.org/Ant+Task+Troubleshooting That or we all upgrade to Maven 2.0, assuming its better at classloader juggling.
        Hide
        Mauro Talevi added a comment -

        I've tried the second solution without success.
        As this only affect test classes and we have a fix using groovy-all, I'd be happy to close the issue
        and readdress it when we have a specific usecase.

        Thoughts?

        Show
        Mauro Talevi added a comment - I've tried the second solution without success. As this only affect test classes and we have a fix using groovy-all, I'd be happy to close the issue and readdress it when we have a specific usecase. Thoughts?
        Hide
        Michael Rimov added a comment -

        I'd personally remove the explicit Maven dependencies to the libraries that groovy includes in Groovy-All. (Or better yet, comment them out with notes) When setting up my own projects, I always refer to the POMs of the libraries I'm using, so this way the generated docs don't have "mis-information" on them. Otherwise, I'm perfectly happy with closing this.

        Show
        Michael Rimov added a comment - I'd personally remove the explicit Maven dependencies to the libraries that groovy includes in Groovy-All. (Or better yet, comment them out with notes) When setting up my own projects, I always refer to the POMs of the libraries I'm using, so this way the generated docs don't have "mis-information" on them. Otherwise, I'm perfectly happy with closing this.
        Hide
        Mauro Talevi added a comment -

        yes - since we are using groovy-all, that makes sense.

        Just do it!

        Show
        Mauro Talevi added a comment - yes - since we are using groovy-all, that makes sense. Just do it!
        Hide
        Jörg Schaible added a comment -

        Normally I don't like those bag-like archives and I use the explicit dependencies. Since groovy-all does not pollute the namespace (they moved all the classes into their own package), it does at least no harm.

        Show
        Jörg Schaible added a comment - Normally I don't like those bag-like archives and I use the explicit dependencies. Since groovy-all does not pollute the namespace (they moved all the classes into their own package), it does at least no harm.
        Hide
        Michael Rimov added a comment -

        Checked in modified POMs that do not explicitly list the files contained in groovy-all.

        Show
        Michael Rimov added a comment - Checked in modified POMs that do not explicitly list the files contained in groovy-all.
        Michael Rimov made changes -
        Field Original Value New Value
        Resolution Fixed [ 1 ]
        Assignee Michael Rimov [ rimovm ]
        Status Open [ 1 ] Closed [ 6 ]
        Fix Version/s 1.0 [ 10148 ]
        Fix Version/s 1.0-RC2 [ 11851 ]

          People

          • Assignee:
            Michael Rimov
            Reporter:
            Mauro Talevi
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: