Details
Description
Steps to reproduce:
1. In a plugin's main class, define "dependsOn" with a plugin name containing "-".
def dependsOn = ["portlets-pluto":"0.1 > * ", "portlets":"0.2 > * "]
2. package-plugin, and install the plugin in a project, and you should get an error message like below.
Plugin dependency [portlets-pluto] not found. Attempting to resolve... ... Reading remote plugin list ... Reading remote plugin list ... Reading remote plugin list ... Plugin 'portletspluto' was not found in repository. If it is not stored in a configured repository you will need to install it manually. Type 'grails list-plugins' to find out what plugins are available.
The cause of the problem is the value returned by "GrailsNameUtils.getScriptName(depName)" is used to lookup plugin in "findPlugin" closure in "_PluginDependencies.groovy". I confirmed with 1.1, but the code seems to be identical in 1.1.1. Here is the patch to fix the issue.
Index: _PluginDependencies.groovy
===================================================================
--- _PluginDependencies.groovy (revision 9003)
+++ _PluginDependencies.groovy (working copy)
@@ -769,7 +769,7 @@
event("StatusUpdate", ["Plugin dependency [$depName] not found. Attempting to resolve..."])
// recursively install dependent plugins
def upperVersion = GrailsPluginUtils.getUpperVersion(depVersion)
- def release = cacheKnownPlugin(depDirName, upperVersion == '*' ? null : upperVersion)
+ def release = cacheKnownPlugin(depName, upperVersion == '*' ? null : upperVersion)
ant.copy(file:"${pluginsBase}/grails-${release}.zip",tofile:"${pluginsDirPath}/grails-${release}.zip")
You have to specify it with camel case like "portletsPluto" and its not changeable right now as other plugins depend on this convention