Jason Dillon
added a comment - 21/Feb/09 4:32 AM 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.

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?

Pavel Cernocky
added a comment - 23/Feb/09 3:17 AM 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.

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.

Jason Dillon
added a comment - 23/Feb/09 4:11 AM 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.