jQuery Plugin

Cannot install plugin through mvn grails:install-plugin

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Major Major
  • Resolution: Fixed
  • Affects Version/s: None
  • Fix Version/s: Grails-jQuery 1.3.2.2
  • Component/s: None
  • Labels:
    None
  • Environment:
    grails 1.1-SNAPSHOT
  • Testcase included:
    yes

Description

Installing the plugin using the grails command on 1.1-RC1 works without a problem.

However,

mvn archetype:generate -DarchetypeGroupId=org.grails -DarchetypeArtifactId=grails-maven-archetype -DarchetypeVersion=1.0-SNAPSHOT -DarchetypeRepository=http://snapshots.repository.codehaus.org -DgroupId=org.grails -DartifactId=jquery-plugin-test
mvn initialize
mvn grails:install-plugin -DpluginName=jquery

results in the following exception:

luis@trinity:~/pilango-workspace/grails-stuff/jquery-plugin-test$ mvn grails:install-plugin -DpluginName=jquery
[INFO] Scanning for projects...
[INFO] Searching repository for plugin with prefix: 'grails'.
[INFO] ------------------------------------------------------------------------
[INFO] Building Unnamed - org.grails:jquery-plugin-test:war:1.0-SNAPSHOT
[INFO] task-segment: [grails:install-plugin] (aggregator-style)
[INFO] ------------------------------------------------------------------------
[WARNING] Attempting to build MavenProject instance for Artifact (org.grails:grails-maven-plugin:1.0-20090210.081513-8) of type: maven-plugin; constructing POM artifact instead.
[INFO] [grails:install-plugin]
Running pre-compiled script
Environment set to development
Reading remote plugin list ...
Reading remote plugin list ...
Plugin list out-of-date, retrieving..
[delete] Deleting: /home/luis/.grails/1.1-SNAPSHOT/plugins-list-default.xml
[get] Getting: http://plugins.grails.org/.plugin-meta/plugins-list.xml
[get] To: /home/luis/.grails/1.1-SNAPSHOT/plugins-list-default.xml
..........................................................................................................................................
[get] last modified = Tue Feb 24 11:34:09 CET 2009
[copy] Copying 1 file to /home/luis/pilango-workspace/grails-stuff/jquery-plugin-test/plugins
Installing plug-in jquery-1.0RC2b
[mkdir] Created dir: /home/luis/pilango-workspace/grails-stuff/jquery-plugin-test/plugins/jquery-1.0RC2b
[unzip] Expanding: /home/luis/.grails/1.1-SNAPSHOT/plugins/grails-jquery-1.0RC2b.zip into /home/luis/pilango-workspace/grails-stuff/jquery-plugin-test/plugins/jquery-1.0RC2b
Executing jquery-1.0RC2b plugin post-install script ...
java.lang.RuntimeException: java.io.FileNotFoundException: /home/luis/pilango-workspace/grails-stuff/jquery-plugin-test/null/scripts/Init.groovy (/home/luis/pilango-workspace/grails-stuff/jquery-plugin-test/null/scripts/Init.groovy)
at Script1.run(Script1.groovy:16)
at _PluginDependencies$_run_closure19.doCall(_PluginDependencies.groovy:547)
at _PluginDependencies$_run_closure26.doCall(_PluginDependencies.groovy:795)
at _GrailsPlugins.completePluginInstall(_GrailsPlugins.groovy:80)
at _GrailsPlugins.this$4$completePluginInstall(_GrailsPlugins.groovy)
at _GrailsPlugins$this$4$completePluginInstall.callCurrent(Unknown Source)
at _GrailsPlugins.withPluginInstall(_GrailsPlugins.groovy:68)
at _GrailsPlugins.this$4$withPluginInstall(_GrailsPlugins.groovy)
at _GrailsPlugins$_run_closure4.doCall(_GrailsPlugins.groovy:60)
at _GrailsPlugins$_run_closure5.doCall(_GrailsPlugins.groovy:110)
at gant.Gant$_dispatch_closure4.doCall(Gant.groovy:324)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy:334)
at gant.Gant$_dispatch_closure6.doCall(Gant.groovy)
at gant.Gant.withBuildListeners(Gant.groovy:344)
at gant.Gant.this$2$withBuildListeners(Gant.groovy)
at gant.Gant$this$2$withBuildListeners.callCurrent(Unknown Source)
at gant.Gant.dispatch(Gant.groovy:334)
at gant.Gant.this$2$dispatch(Gant.groovy)
at gant.Gant.invokeMethod(Gant.groovy)
at gant.Gant.processTargets(Gant.groovy:495)
at gant.Gant.processTargets(Gant.groovy:480)
at org.grails.maven.plugin.AbstractGrailsMojo.runGrails(AbstractGrailsMojo.java:223)
at org.grails.maven.plugin.GrailsInstallPluginMojo.execute(GrailsInstallPluginMojo.java:84)
at org.apache.maven.plugin.DefaultPluginManager.executeMojo(DefaultPluginManager.java:451)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoals(DefaultLifecycleExecutor.java:558)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeStandaloneGoal(DefaultLifecycleExecutor.java:512)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoal(DefaultLifecycleExecutor.java:482)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeGoalAndHandleFailures(DefaultLifecycleExecutor.java:330)
at org.apache.maven.lifecycle.DefaultLifecycleExecutor.executeTaskSegments(DefaultLifecycleExecutor.java:227)
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 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: java.io.FileNotFoundException: /home/luis/pilango-workspace/grails-stuff/jquery-plugin-test/null/scripts/Init.groovy (/home/luis/pilango-workspace/grails-stuff/jquery-plugin-test/null/scripts/Init.groovy)
... 37 more
Error installing plugin: java.io.FileNotFoundException: /home/luis/pilango-workspace/grails-stuff/jquery-plugin-test/null/scripts/Init.groovy (/home/luis/pilango-workspace/grails-stuff/jquery-plugin-test/null/scripts/Init.groovy): java.io.FileNotFoundException: /home/luis/pilango-workspace/grails-stuff/jquery-plugin-test/null/scripts/Init.groovy (/home/luis/pilango-workspace/grails-stuff/jquery-plugin-test/null/scripts/Init.groovy)

Activity

Hide
Finn Herpich added a comment - - edited

oh, forget it. I will have a look at it

Show
Finn Herpich added a comment - - edited oh, forget it. I will have a look at it
Hide
Luis Arias added a comment -

I investigated this further, by trying the same thing with the dojo plugin which has similar behavior when installing and the result is the same so the error is not strictly related to the jquery plugin but maybe due to 1.1 breaking something when called within the grails-maven-plugin. I suspect that the grailsHome env var is null. I'll take a look at the grails maven plugin to see what could work instead of using grails_home or if that is set for backwards compatibility or not.

Show
Luis Arias added a comment - I investigated this further, by trying the same thing with the dojo plugin which has similar behavior when installing and the result is the same so the error is not strictly related to the jquery plugin but maybe due to 1.1 breaking something when called within the grails-maven-plugin. I suspect that the grailsHome env var is null. I'll take a look at the grails maven plugin to see what could work instead of using grails_home or if that is set for backwards compatibility or not.
Hide
Luis Arias added a comment -

I'm submitting a patch resulting from upgrading the plugin to 1.1-SNAPSHOT and removing the offending lines in the _Install.groovy script that where playing with grailsHome. I don't know how to make this compatible with earlier versions in the right way though. I don't know at what point the grailsScript() function was introduced. I'm also attaching a zip with the version that works, you can use the following syntax for installing it with maven:

mvn grails:install-plugin -DpluginName=jquery -DpluginUrl=file:///pathtothezip/grails-jquery-1.0RC2c.zip

Show
Luis Arias added a comment - I'm submitting a patch resulting from upgrading the plugin to 1.1-SNAPSHOT and removing the offending lines in the _Install.groovy script that where playing with grailsHome. I don't know how to make this compatible with earlier versions in the right way though. I don't know at what point the grailsScript() function was introduced. I'm also attaching a zip with the version that works, you can use the following syntax for installing it with maven: mvn grails:install-plugin -DpluginName=jquery -DpluginUrl=file:///pathtothezip/grails-jquery-1.0RC2c.zip
Hide
Finn Herpich added a comment -

Great work, thx. I will have a look at it.

Show
Finn Herpich added a comment - Great work, thx. I will have a look at it.

People

Vote (0)
Watch (0)

Dates

  • Created:
    Updated:
    Resolved: