Grails

Installing plugins from maven

Details

  • Type: Bug Bug
  • Status: Closed Closed
  • Priority: Blocker Blocker
  • Resolution: Fixed
  • Affects Version/s: 1.3.2
  • Fix Version/s: 1.3.3
  • Component/s: Project infrastructure
  • Labels:
    None

Description

Grails plugin does not have classifier in maven.

But grails 1.3.2 defaults to a jar classifier as a result can't find the plugins.

The bug was introduced by aaa6420a02aa3389f6856919cddf25b51e18098a ( a fix to GRAILS-6315 ).

Revert part of that commit allowed me to install plugins again.

diff --git a/src/java/org/codehaus/groovy/grails/resolve/IvyDependencyManager.groovy b/src/java/org/codehaus/groovy/grails/resolve/IvyDependencyManager.groovy
index 65855b4..07c9964 100644
--- a/src/java/org/codehaus/groovy/grails/resolve/IvyDependencyManager.groovy
+++ b/src/java/org/codehaus/groovy/grails/resolve/IvyDependencyManager.groovy
@@ -1125,7 +1125,11 @@ class IvyDomainSpecificLanguageEvaluator {
                        boolean isExcluded = currentPluginBeingConfigured ? isExcludedFromPlugin(currentPluginBeingConfigured, name) : isExcluded(name)
                        if(!isExcluded) {
 
-                           def attrs = ["m:classifier":dependency.classifier ?: 'jar']
+                           def attrs = [:]
+                           if(dependency.classifier) {
+                               attrs["m:classifier"] = dependency.classifier
+                           }
+
                            def mrid
                            if(dependency.branch) {
                                mrid = ModuleRevisionId.newInstance(dependency.group, name, dependency.branch, dependency.version, attrs)

Issue Links

Activity

Hide
Graeme Rocher added a comment -

Workaround is to define a URLResolver for the repository instead of using the mavenRepo method:

def repo = new URLResolver(name:"myRepo", m2compatible:true)
repo.addArtifactPattern("http://localhost:8081/artifactory/plugins-snapshots-local/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]")
resolver(repo)
Show
Graeme Rocher added a comment - Workaround is to define a URLResolver for the repository instead of using the mavenRepo method:
def repo = new URLResolver(name:"myRepo", m2compatible:true)
repo.addArtifactPattern("http://localhost:8081/artifactory/plugins-snapshots-local/[organisation]/[module]/[revision]/[artifact]-[revision].[ext]")
resolver(repo)
Hide
Robert Fletcher added a comment -

This bug appears to be also breaking non-jar packaged maven dependencies. e.g. several of Jetty plugin's dependencies are "pom" packaged (they're just aggregations of other dependencies) and Grails tries to resolve a jar that doesn't exist.

Show
Robert Fletcher added a comment - This bug appears to be also breaking non-jar packaged maven dependencies. e.g. several of Jetty plugin's dependencies are "pom" packaged (they're just aggregations of other dependencies) and Grails tries to resolve a jar that doesn't exist.

People

Vote (9)
Watch (9)

Dates

  • Created:
    Updated:
    Resolved: