Details

    • Type: Wish Wish
    • Status: Closed Closed
    • Priority: Minor Minor
    • Resolution: Not A Bug
    • Affects Version/s: 1.0-rc-1
    • Fix Version/s: 1.0-rc-3
    • Component/s: None
    • Labels:
      None
    • Environment:
      Java, Groovy
    • Number of attachments :
      2

      Description

      There is a problem with groovy when one has a complex dependencies of java and groovy classes on oneanother.
      Eg. Groovy Domainclasses <-- Java services <-- Groovy XML builder
      One can create workarounds for this by doing several (failing) compilation, which builds the depending layers one at a time.
      The other option is to have the groovy and java layers in seperate modules, which in turn are built correctly, but with unwanted complexity of chai of module dependencies.
      There may be some magic switch I have missed; but if not, this problem should be clarified to all the happy punters who dream of infinate layers of java/groovy interdependencies.

        Activity

        Hide
        Jason Dillon added a comment -

        Currently the only docs for compiling/building are here:

        If you need some more details please let me know.

        Show
        Jason Dillon added a comment - Currently the only docs for compiling/building are here: http://groovy.codehaus.org/GMaven+-+Building+Groovy+Projects If you need some more details please let me know.
        Hide
        Jason Dillon added a comment -

        ASFAIK the stub-generation + normal java compilation + groovyc compilation which is handled by the gmaven plugin should provide sufficent support for complex java <-> groovy class dependencies.

        If you still have problems with how thihngs are documented, please submit an issue with and example project so I can debug.

        Show
        Jason Dillon added a comment - ASFAIK the stub-generation + normal java compilation + groovyc compilation which is handled by the gmaven plugin should provide sufficent support for complex java <-> groovy class dependencies. If you still have problems with how thihngs are documented, please submit an issue with and example project so I can debug.
        Hide
        Stig Lau added a comment -

        I doodled up a quick mvn'able example of the hen and egg groovy/java compile issue.
        This might be a problem concerning Swing GUIBuilder (where i first saw the issue) and not groovy compilation, though

        mvn clean groovy:compile install ...
        [INFO] Building Unnamed - no.lau:groovymixedcompiler:jar:1.0
        [INFO] task-segment: [clean, groovy:compile, install] ...
        [INFO] [groovy:compile] ...
        [ERROR] BUILD ERROR ...
        [INFO] startup failed, /Volumes/McFeasty/Users/Stig/jobb/utvikling/groovymixedcompiler/src/main/groovy/MechanicGUI.groovy: 6: unable to resolve class Mechanic
        @ line 6, column 14.
        Mechanic mechanic
        ^
        /Volumes/McFeasty/Users/Stig/jobb/utvikling/groovymixedcompiler/src/main/groovy/MechanicGUI.groovy: 6: unable to resolve class Mechanic
        @ line 6, column 14.
        Mechanic mechanic
        ^
        /Volumes/McFeasty/Users/Stig/jobb/utvikling/groovymixedcompiler/src/main/groovy/MechanicGUI.groovy: 12: unable to resolve class Mechanic
        @ line 12, column 25.
        new Mechanic().fix(new Car())
        ^
        3 errors

        Show
        Stig Lau added a comment - I doodled up a quick mvn'able example of the hen and egg groovy/java compile issue. This might be a problem concerning Swing GUIBuilder (where i first saw the issue) and not groovy compilation, though mvn clean groovy:compile install ... [INFO] Building Unnamed - no.lau:groovymixedcompiler:jar:1.0 [INFO] task-segment: [clean, groovy:compile, install] ... [INFO] [groovy:compile] ... [ERROR] BUILD ERROR ... [INFO] startup failed, /Volumes/McFeasty/Users/Stig/jobb/utvikling/groovymixedcompiler/src/main/groovy/MechanicGUI.groovy: 6: unable to resolve class Mechanic @ line 6, column 14. Mechanic mechanic ^ /Volumes/McFeasty/Users/Stig/jobb/utvikling/groovymixedcompiler/src/main/groovy/MechanicGUI.groovy: 6: unable to resolve class Mechanic @ line 6, column 14. Mechanic mechanic ^ /Volumes/McFeasty/Users/Stig/jobb/utvikling/groovymixedcompiler/src/main/groovy/MechanicGUI.groovy: 12: unable to resolve class Mechanic @ line 12, column 25. new Mechanic().fix(new Car()) ^ 3 errors
        Hide
        Jason Dillon added a comment -

        It appears as though you did not look at the documentation here:

        http://groovy.codehaus.org/GMaven+-+Building+Groovy+Projects

        Attached is a -fixed version of your example which builds fine once the project was properly configured.

        Show
        Jason Dillon added a comment - It appears as though you did not look at the documentation here: http://groovy.codehaus.org/GMaven+-+Building+Groovy+Projects Attached is a -fixed version of your example which builds fine once the project was properly configured.
        Hide
        Stig Lau added a comment -

        Fix worked nicely. Guess I looked at the documentation too early...
        Like how you have improved on GMaven compared to groovy-maven-plugin.
        Simplicity in pom configuration is a real winner by my standard!

        Show
        Stig Lau added a comment - Fix worked nicely. Guess I looked at the documentation too early... Like how you have improved on GMaven compared to groovy-maven-plugin. Simplicity in pom configuration is a real winner by my standard!

          People

          • Assignee:
            Jason Dillon
            Reporter:
            Stig Lau
          • Votes:
            0 Vote for this issue
            Watchers:
            0 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: