Grails Maven Plugin

Make Grails 1.2.1 Maven Integration archetype available

Details

  • Type: Sub-task Sub-task
  • Status: Closed Closed
  • Priority: Minor Minor
  • Resolution: Won't Fix
  • Affects Version/s: None
  • Fix Version/s: None
  • Component/s: None
  • Labels:
    None

Description

Attempted to run the Grails-Maven integration plugin / archetype last night for Grails version 1.2.1 and no version for 1.2.1 was available. Not sure if this is the right place to raise this issue, but I'm not sure where else it should be raised.

Thanks,
Jim

Activity

Hide
Robert Bjarum added a comment -

Any idea when we can expect this one closed?

Thanks,
Robert

Show
Robert Bjarum added a comment - Any idea when we can expect this one closed? Thanks, Robert
Hide
Kit Plummer added a comment -

This is proving to be a big problem for me. The jms-0.5 plugin won't install because it requires 1.2.1+. I tried changing all of the usual locations up to 1.2.1 but I guess the archetype is deep seated. Weird because it even says "Using Grails 1.2.1".

blitz:test kplummer$ mvn grails:install-plugin -DpluginName="jms"
[INFO] Scanning for projects...
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - com.acn.rdd:treadstone:war:1.0-SNAPSHOT
[INFO] task-segment: [grails:install-plugin] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[INFO] [grails:install-plugin {execution: default-cli}]
[INFO] Using Grails 1.2.1
Running pre-compiled script
Environment set to development
Reading remote plugin list ...
Reading remote plugin list ...
[copy] Copying 1 file to /Users/kplummer/Desktop/Test/treadstone/plugins
Installing plugin jms-0.5
[mkdir] Created dir: /Users/kplummer/Desktop/Test/treadstone/plugins/jms-0.5
[unzip] Expanding: /Users/kplummer/.grails/1.2.1/plugins/grails-jms-0.5.zip into /Users/kplummer/Desktop/Test/treadstone/plugins/jms-0.5
Plugin jms-0.5 requires version [1.2.1 > *] of Grails which your current Grails installation does not meet. Please try install a different version of the plugin or Grails.
[delete] Deleting directory /Users/kplummer/Desktop/Test/treadstone/plugins/jms-0.5

Show
Kit Plummer added a comment - This is proving to be a big problem for me. The jms-0.5 plugin won't install because it requires 1.2.1+. I tried changing all of the usual locations up to 1.2.1 but I guess the archetype is deep seated. Weird because it even says "Using Grails 1.2.1". blitz:test kplummer$ mvn grails:install-plugin -DpluginName="jms" [INFO] Scanning for projects... [INFO] ------------------------------------------------------------------------ [INFO] Building Unnamed - com.acn.rdd:treadstone:war:1.0-SNAPSHOT [INFO] task-segment: [grails:install-plugin] (aggregator-style) [INFO] ------------------------------------------------------------------------ [INFO] [grails:install-plugin {execution: default-cli}] [INFO] Using Grails 1.2.1 Running pre-compiled script Environment set to development Reading remote plugin list ... Reading remote plugin list ... [copy] Copying 1 file to /Users/kplummer/Desktop/Test/treadstone/plugins Installing plugin jms-0.5 [mkdir] Created dir: /Users/kplummer/Desktop/Test/treadstone/plugins/jms-0.5 [unzip] Expanding: /Users/kplummer/.grails/1.2.1/plugins/grails-jms-0.5.zip into /Users/kplummer/Desktop/Test/treadstone/plugins/jms-0.5 Plugin jms-0.5 requires version [1.2.1 > *] of Grails which your current Grails installation does not meet. Please try install a different version of the plugin or Grails. [delete] Deleting directory /Users/kplummer/Desktop/Test/treadstone/plugins/jms-0.5
Hide
Jason Yankus added a comment -

There are a number of issues that were fixed in Grails 1.2.1 and Grails 1.2.2 that folks running a maven-based project architecture would like to take advantage of. Sadly, those folks (myself included) can't seem to do that as the grails-maven-plugin is 1.2.0.

Is there a way to make the grails-maven-plugin use an external installation of Grails (instead of a "bundled" 1.2.0 version)? I read somewhere that no new grails-maven-plugin versions would be released before Grails 1.3.0 was released. This seems onerous unless Grails 1.3.0 is immediately forthcoming.

What can we expect on this issue?

Show
Jason Yankus added a comment - There are a number of issues that were fixed in Grails 1.2.1 and Grails 1.2.2 that folks running a maven-based project architecture would like to take advantage of. Sadly, those folks (myself included) can't seem to do that as the grails-maven-plugin is 1.2.0. Is there a way to make the grails-maven-plugin use an external installation of Grails (instead of a "bundled" 1.2.0 version)? I read somewhere that no new grails-maven-plugin versions would be released before Grails 1.3.0 was released. This seems onerous unless Grails 1.3.0 is immediately forthcoming. What can we expect on this issue?
Hide
Robert Bjarum added a comment -

Jason,

A workaround for me has been to install Grails 1.2.2 and replace the grails-maven-plugin with the exec-maven-plugin and run grails as any executable. Change the packaging to "pom" and add the following to your pom.xml:

<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>1.1</version>
<executions>
<execution>
<id>exec-war</id>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
</execution>
</executions>
<configuration>
<executable>grails</executable>
<arguments>
<argument>war</argument>
</arguments>
</configuration>
</plugin>

Furthermore, add "pom true" to your BuildConfig.groovy so that grails uses the dependencies from pom.xml. Ensure that the grails dependencies match you installed version (not sure if this matters).

We use Hudson for continuous builds. Installed the grails-plugin here.

Show
Robert Bjarum added a comment - Jason, A workaround for me has been to install Grails 1.2.2 and replace the grails-maven-plugin with the exec-maven-plugin and run grails as any executable. Change the packaging to "pom" and add the following to your pom.xml: <plugin> <groupId>org.codehaus.mojo</groupId> <artifactId>exec-maven-plugin</artifactId> <version>1.1</version> <executions> <execution> <id>exec-war</id> <phase>package</phase> <goals> <goal>exec</goal> </goals> </execution> </executions> <configuration> <executable>grails</executable> <arguments> <argument>war</argument> </arguments> </configuration> </plugin> Furthermore, add "pom true" to your BuildConfig.groovy so that grails uses the dependencies from pom.xml. Ensure that the grails dependencies match you installed version (not sure if this matters). We use Hudson for continuous builds. Installed the grails-plugin here.
Hide
David Kowis added a comment -

Here's a pair of patches to two of the grails-maven projects (grails-maven and grails-maven-archetype)

The patches bring the two projects to version 1.2.2 and include a new aspectj dependency that isn't in 1.2.0. Out of the box testing seems to work.

The repos for the two projects:
http://github.com/grails/grails-maven
http://github.com/grails/grails-maven-archetype

You can apply the patches (they're made using git format-patch, so you'll probably have to use git am) and then build these two artifacts using maven, then you can use the same instructions as mentioned on http://www.grails.org/Maven+Integration

Just change the archetype version to 1.2.2:
mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate \
-DarchetypeGroupId=org.grails \
-DarchetypeArtifactId=grails-maven-archetype \
-DarchetypeVersion=1.2.2 \
-DgroupId=example -DartifactId=my-app

I was able to build a grails maven project and mvn grails:run-app and all the plugins displayed the right versions. I'd be interested to know if others have similar success (so that I know if I've done this right, heh).

Show
David Kowis added a comment - Here's a pair of patches to two of the grails-maven projects (grails-maven and grails-maven-archetype) The patches bring the two projects to version 1.2.2 and include a new aspectj dependency that isn't in 1.2.0. Out of the box testing seems to work. The repos for the two projects: http://github.com/grails/grails-maven http://github.com/grails/grails-maven-archetype You can apply the patches (they're made using git format-patch, so you'll probably have to use git am) and then build these two artifacts using maven, then you can use the same instructions as mentioned on http://www.grails.org/Maven+Integration Just change the archetype version to 1.2.2: mvn org.apache.maven.plugins:maven-archetype-plugin:2.0-alpha-4:generate \ -DarchetypeGroupId=org.grails \ -DarchetypeArtifactId=grails-maven-archetype \ -DarchetypeVersion=1.2.2 \ -DgroupId=example -DartifactId=my-app I was able to build a grails maven project and mvn grails:run-app and all the plugins displayed the right versions. I'd be interested to know if others have similar success (so that I know if I've done this right, heh).
Hide
Graeme Rocher added a comment -

Grails 1.2.2 is no longer a supported version of the framework

Show
Graeme Rocher added a comment - Grails 1.2.2 is no longer a supported version of the framework

People

Vote (8)
Watch (10)

Dates

  • Created:
    Updated:
    Resolved: