天道酬勤,学无止境

gmaven-plugin

使用 Maven 构建 Groovy 项目时出现源错误(Getting a source error building Groovy project with Maven)

问题 我正在尝试用 maven 构建我的第一个 groovy 项目,但我从 maven 收到以下错误..它是某种源错误,但我不明白为什么我会得到它。 [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.186s [INFO] Finished at: Fri Jan 25 15:36:09 EST 2013 [INFO] Final Memory: 15M/163M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.3:execute (default) on project groovyhello: org.codehaus.groovy.runtime.metaclass.MissingPropertyExceptionNoStack: No such property: project for class: org.smith.Example ->

2021-06-09 15:38:07    分类:技术分享    maven   groovy   gmaven-plugin

GroovyDoc as Maven Plugin

Is there a maven plugin available somewhere that utilizes GroovyDoc, preferably as a report? I guess GMaven would be the place to look but the docs are ancient (1.0, whereas the current version is 1.3) and the GMaven plugin doesn't have any mojo that fits as you can see: mvn help:describe -DgroupId=org.codehaus.gmaven -DartifactId=gmaven-plugin This plugin has 9 goals: groovy:compile Description: Compiles Groovy sources. groovy:console Description: Launches the Groovy GUI console. groovy:execute Description: Executes a Groovy script. groovy:generateStubs Description: Generate Java stubs from

2021-06-05 07:58:59    分类:问答    maven-2   groovy   maven   gmaven-plugin   groovydoc

Groovy file does not compile in Intellij IDEA

I have maven project wit java and groovy tests. In command line maven compilation all tests are running, but in my IDEA project (which is created automatically, by "AutoImport maven projects", IDEA copies groovy files to /target/test-classes without compiling them. My gmaven plugin looks like <plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>gmaven-plugin</artifactId> <version>1.3</version> <executions> <execution> <goals> <goal>generateStubs</goal> <goal>compile</goal> <goal>generateTestStubs</goal> <goal>testCompile</goal> </goals> <configuration> <providerSelection>1.7<

2021-06-02 09:08:25    分类:问答    maven   groovy   intellij-idea   gmaven-plugin

gmaven 插件:如何在 pom.xml 中为外部 groovy 脚本设置属性(gmaven plugin: how to set property in pom.xml for external groovy script)

问题 我正在通过 pom.xml 中的 gmaven 插件运行外部 groovy 脚本。 外部脚本是“myscript.groovy”。 我想通过 maven pom.xml [即在插件“gmaven-plugin”执行中] 向 myscript.groovy 提供一些参数/参数; 但无法这样做.. 我试过使用 in ; 但不确定如何在 groovy 脚本中检索其值。 简单地调用 properties.get 不会给出属性值。 pom文件快照: <plugin> <groupId>org.codehaus.gmaven</groupId> <artifactId>gmaven-plugin</artifactId> <executions> <execution> <id>generate-resources-execute-groovyscript</id> <phase>generate-resources</phase> <goals> <goal>execute</goal> </goals> <configuration> <properties> <property> <name>installation.dir</name> <value>${installation.dir}</value> </property> </properties> <source>$

2021-06-01 13:06:21    分类:技术分享    maven   groovy   gmaven-plugin

Getting a source error building Groovy project with Maven

I am trying to build my first groovy project with maven but I am getting the following error from maven.. its somettype of source error but Idont understand why I am getting it. [INFO] BUILD FAILURE [INFO] ------------------------------------------------------------------------ [INFO] Total time: 3.186s [INFO] Finished at: Fri Jan 25 15:36:09 EST 2013 [INFO] Final Memory: 15M/163M [INFO] ------------------------------------------------------------------------ [ERROR] Failed to execute goal org.codehaus.gmaven:gmaven-plugin:1.3:execute (default) on project groovyhello: org.codehaus.groovy

2021-05-12 03:35:07    分类:问答    maven   groovy   gmaven-plugin

Maven使用gmaven-plugin编译Java + Groovy 1.7混合项目(Maven compile mixed Java + Groovy 1.7 project, using gmaven-plugin)

问题 按照以下两个最重要的答案:Maven依赖关系。 我正在尝试使用org.codehaus.gmaven的GMaven插件与Maven一起编译Java 6 + Groovy混合项目。 直到昨天,我们1.6.0使用Groovy的1.6.0旧版本(直到我们终于可以使用它之后再也没有对其进行更改),但是因为1.7.0现在很稳定,所以我认为我们应该切换到该版本。 如果只有那么简单的话..我现在遇到的问题似乎有两个方面: Groovy 1.6仍然是默认设置。 (如下面的堆栈跟踪中所示) groovy:generateStubs因生成错误而停止:意外节点:Node [7:1,64,ANNOTATIONS] 有谁知道如何解决以上两个问题,或者可以提供一个工作的pom来将Maven与Groovy 1.7代码混合在一起的Java 6代码进行编译? 关于使用gmaven / groovy.maven / groovy.maven.gmaven编译Groovy的旧版本,有很多令人困惑/矛盾/过时的文档,这实际上并没有帮助。 作为参考,这是我的pom.xml和Maven -e输出的一部分: <dependencies> <dependency> <groupId>org.codehaus.groovy</groupId> <artifactId>groovy-all</artifactId>

2021-04-30 12:40:43    分类:技术分享    java   groovy   maven   compilation   gmaven-plugin

Maven compile mixed Java + Groovy 1.7 project, using gmaven-plugin

As per the top two answers in: maven dependencies groovy. I'm trying to compile a mixed Java 6 + Groovy project with Maven, using the GMaven-plugin from org.codehaus.gmaven. Up until yesterday we were using the old 1.6.0 version of Groovy (never changed it after we finally got it working), but since 1.7.0 is now stable I thought we'd switch to that. If only things were that simple.. The problems I'm now encountering seem to be two fold: Groovy 1.6 is somehow still picked up as the default. (as show in the stacktrace below) groovy:generateStubs stops with a build error: Unexpected node: Node[7

2021-04-06 06:50:16    分类:问答    java   groovy   maven   compilation   gmaven-plugin