Details

    • Type: Bug Bug
    • Status: Closed Closed
    • Priority: Major Major
    • Resolution: Not A Bug
    • Affects Version/s: 1.0-rc-4
    • Fix Version/s: 1.0-rc-5
    • Component/s: None
    • Labels:
      None
    • Number of attachments :
      0

      Description

      If I try:
      mvn groovy:providers -DproviderSelection=1.6

      I always get:

      [INFO] [groovy:providers]
      [INFO]
      [INFO] Provider selection: 1.5
      [INFO]
      [INFO] Found 1 registered providers:
      [INFO] [1.5] 'Groovy v1.5.6' (version: 1.5.6, type: org.codehaus.groovy.maven.runtime.v1_5.ProviderImpl)
      [INFO] Features:
      [INFO] org.codehaus.groovy.maven.runtime.ClassCompiler
      [INFO] org.codehaus.groovy.maven.runtime.Console
      [INFO] org.codehaus.groovy.maven.runtime.ClassFactory
      [INFO] org.codehaus.groovy.maven.runtime.Shell
      [INFO] org.codehaus.groovy.maven.runtime.TraceSanitizer
      [INFO] org.codehaus.groovy.maven.runtime.StubCompiler
      [INFO] org.codehaus.groovy.maven.runtime.ScriptExecutor
      [INFO]
      [INFO] Selected provider:
      [INFO] [1.5] 'Groovy v1.5.6' (version: 1.5.6, type: org.codehaus.groovy.maven.runtime.v1_5.ProviderImpl)

      Or am I missing something?
      Palo

        Activity

        Hide
        Jason Dillon added a comment -

        To select the runtime as a property, use:

        mvn -Dgmaven.runtime=1.6
        

        To configure the runtime in a pom.xml then use:

        <configuration>
            <runtimeProvider>1.6</runtimeProvider>
        </configuration>
        

        Looks like the online docs were out of date, I've corrected this problem.

        Show
        Jason Dillon added a comment - To select the runtime as a property, use: mvn -Dgmaven.runtime=1.6 To configure the runtime in a pom.xml then use: <configuration> <runtimeProvider>1.6</runtimeProvider> </configuration> Looks like the online docs were out of date, I've corrected this problem.
        Hide
        Pavel Cernocky added a comment -

        Thanks.

        -Dgmaven.runtime from command line works, but in pom I have to use param "providerSelection" - that's what I've found in src.

        Anyway, even with groovy 1.6-RC-1 (1.6 provider in gmaven 1.0-rc-4) I'm not able to compile @Bindable annotation - compilation is ok, but the AST transformation does not run.

        If I try to set groovy 1.6.0 as provider by changing gmaven dependencies like this:

        <plugin>
          <groupId>org.codehaus.groovy.maven</groupId>
          <artifactId>gmaven-plugin</artifactId>
          <version>1.0-rc-4</version>
        
          <dependencies>
            <dependency>
              <groupId>org.codehaus.groovy.maven.runtime</groupId>
              <artifactId>gmaven-runtime-1.6</artifactId>
              <version>1.0-rc-4</version>
              <exclusions>
                <exclusion>
                  <groupId>org.codehaus.groovy</groupId>
                  <artifactId>groovy-all</artifactId>
                </exclusion>
              </exclusions>
            </dependency>
            <dependency>
              <groupId>org.codehaus.groovy</groupId>
              <artifactId>groovy-all</artifactId>
              <version>1.6.0</version>
            </dependency>
          </dependencies>
          <configuration>
            <providerSelection>1.6</providerSelection>
          </configuration>
          <executions>
            <execution>
              <goals>
                <goal>generateStubs</goal>
                <goal>compile</goal>
              </goals>
            </execution>
          </executions>
        </plugin>
        

        I get :

        org.apache.maven.lifecycle.LifecycleExecutionException: startup failed, /C:/tmp/groovytest/test/src/main/groovy/test/Example.groovy: Not an ASTTransformation: groovy.beans.BindableASTTransformation declared by groovy.beans.Bindable
        
        1 error
        
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142)
        	at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336)
        	at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129)
        	at org.apache.maven.cli.MavenCli.main(MavenCli.java:287)
        	at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        	at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        	at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        	at java.lang.reflect.Method.invoke(Method.java:597)
        	at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315)
        	at org.codehaus.classworlds.Launcher.launch(Launcher.java:255)
        	at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430)
        	at org.codehaus.classworlds.Launcher.main(Launcher.java:375)
        Caused by: org.apache.maven.plugin.MojoExecutionException: startup failed, /C:/tmp/groovytest/test/src/main/groovy/test/Example.groovy: Not an ASTTransformation: groovy.beans.BindableASTTransformation declared by groovy.beans.Bindable
        
        1 error
        
        	at org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:85)
        	at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
        	at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
        	... 16 more
        Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, /C:/tmp/groovytest/test/src/main/groovy/test/Example.groovy: Not an ASTTransformation: groovy.beans.BindableASTTransformation declared by groovy.beans.Bindable
        
        1 error
        
        	at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296)
        	at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:941)
        	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:464)
        	at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:445)
        	at org.codehaus.groovy.maven.runtime.v1_6.ClassCompilerFeature$ClassCompilerImpl.compile(ClassCompilerFeature.java:155)
        	at org.codehaus.groovy.maven.plugin.compile.AbstractCompileMojo.compile(AbstractCompileMojo.java:200)
        	at org.codehaus.groovy.maven.plugin.compile.AbstractCompileMojo.process(AbstractCompileMojo.java:164)
        	at org.codehaus.groovy.maven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:60)
        	at org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:69)
        	... 18 more
        

        Is there any possibility to correctly compile annotations like @Bindable?

        Thanks in advance.

        Show
        Pavel Cernocky added a comment - Thanks. -Dgmaven.runtime from command line works, but in pom I have to use param "providerSelection" - that's what I've found in src. Anyway, even with groovy 1.6-RC-1 (1.6 provider in gmaven 1.0-rc-4) I'm not able to compile @Bindable annotation - compilation is ok, but the AST transformation does not run. If I try to set groovy 1.6.0 as provider by changing gmaven dependencies like this: <plugin> <groupId>org.codehaus.groovy.maven</groupId> <artifactId>gmaven-plugin</artifactId> <version>1.0-rc-4</version> <dependencies> <dependency> <groupId>org.codehaus.groovy.maven.runtime</groupId> <artifactId>gmaven-runtime-1.6</artifactId> <version>1.0-rc-4</version> <exclusions> <exclusion> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> </exclusion> </exclusions> </dependency> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId> <version>1.6.0</version> </dependency> </dependencies> <configuration> <providerSelection>1.6</providerSelection> </configuration> <executions> <execution> <goals> <goal>generateStubs</goal> <goal>compile</goal> </goals> </execution> </executions> </plugin> I get : org.apache.maven.lifecycle.LifecycleExecutionException: startup failed, /C:/tmp/groovytest/test/src/main/groovy/test/Example.groovy: Not an ASTTransformation: groovy.beans.BindableASTTransformation declared by groovy.beans.Bindable 1 error at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:583) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalWithLifecycle(DefaultLifecycleExecutor.java:499) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:478) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:291) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.execute(DefaultLifecycleExecutor.java:142) at org.apache.maven.DefaultMaven.doExecute(DefaultMaven.java:336) at org.apache.maven.DefaultMaven.execute(DefaultMaven.java:129) at org.apache.maven.cli.MavenCli.main(MavenCli.java:287) at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method) at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39) at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25) at java.lang.reflect.Method.invoke(Method.java:597) at org.codehaus.classworlds.Launcher.launchEnhanced(Launcher.java:315) at org.codehaus.classworlds.Launcher.launch(Launcher.java:255) at org.codehaus.classworlds.Launcher.mainWithExitCode(Launcher.java:430) at org.codehaus.classworlds.Launcher.main(Launcher.java:375) Caused by: org.apache.maven.plugin.MojoExecutionException: startup failed, /C:/tmp/groovytest/test/src/main/groovy/test/Example.groovy: Not an ASTTransformation: groovy.beans.BindableASTTransformation declared by groovy.beans.Bindable 1 error at org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:85) at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451) at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558) ... 16 more Caused by: org.codehaus.groovy.control.MultipleCompilationErrorsException: startup failed, /C:/tmp/groovytest/test/src/main/groovy/test/Example.groovy: Not an ASTTransformation: groovy.beans.BindableASTTransformation declared by groovy.beans.Bindable 1 error at org.codehaus.groovy.control.ErrorCollector.failIfErrors(ErrorCollector.java:296) at org.codehaus.groovy.control.CompilationUnit.applyToPrimaryClassNodes(CompilationUnit.java:941) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:464) at org.codehaus.groovy.control.CompilationUnit.compile(CompilationUnit.java:445) at org.codehaus.groovy.maven.runtime.v1_6.ClassCompilerFeature$ClassCompilerImpl.compile(ClassCompilerFeature.java:155) at org.codehaus.groovy.maven.plugin.compile.AbstractCompileMojo.compile(AbstractCompileMojo.java:200) at org.codehaus.groovy.maven.plugin.compile.AbstractCompileMojo.process(AbstractCompileMojo.java:164) at org.codehaus.groovy.maven.plugin.ComponentMojoSupport.doExecute(ComponentMojoSupport.java:60) at org.codehaus.groovy.maven.plugin.MojoSupport.execute(MojoSupport.java:69) ... 18 more Is there any possibility to correctly compile annotations like @Bindable? Thanks in advance.
        Hide
        Jason Dillon added a comment -

        You are right about providerSelection for configuring in a pom, I typed in the wrong thing. As for the AST transform, I'm not sure atm, but that seems a different bug than not being able to select the provider. So please open up another JIRA and I will look into it shortly. Prefereably with some small example project that fails so I can see what you are trying to do... BTW, I'm still new to all this AST transform stuff, so there could be some internal support missing... I've no idea.

        Show
        Jason Dillon added a comment - You are right about providerSelection for configuring in a pom, I typed in the wrong thing. As for the AST transform, I'm not sure atm, but that seems a different bug than not being able to select the provider. So please open up another JIRA and I will look into it shortly. Prefereably with some small example project that fails so I can see what you are trying to do... BTW, I'm still new to all this AST transform stuff, so there could be some internal support missing... I've no idea.
        Hide
        Pavel Cernocky added a comment -
        Show
        Pavel Cernocky added a comment - I've submitted http://jira.codehaus.org/browse/MGROOVY-197

          People

          • Assignee:
            Jason Dillon
            Reporter:
            Pavel Cernocky
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:
              Resolved: