Skip to content

Commit 5bfac22

Browse files
committed
fix for GRAILS-10947 “Lost dependency artefact type for grails plugins in pom.xml”
1 parent 46e72e8 commit 5bfac22

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

grails-aether/src/main/groovy/org/codehaus/groovy/grails/resolve/maven/aether/AetherDependencyManager.groovy

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -522,7 +522,7 @@ class AetherDependencyManager implements DependencyManager {
522522
grailsDependenciesByScope[dependency.scope] << grailsDependency
523523
final aetherDependencies = dependencies
524524
aetherDependencies << dependency
525-
if (dependency.artifact.groupId == 'org.grails.plugins' || dependency.artifact.properties.extension == 'zip') {
525+
if (dependency.artifact.groupId == 'org.grails.plugins' || dependency.artifact.extension == 'zip') {
526526
grailsPluginDependencies << grailsDependency
527527
grailsPluginDependenciesByScope[dependency.scope] << grailsDependency
528528
}
@@ -531,6 +531,7 @@ class AetherDependencyManager implements DependencyManager {
531531
protected org.codehaus.groovy.grails.resolve.Dependency createGrailsDependency(Dependency dependency, DependencyConfiguration configuration = null) {
532532
Artifact artifact = dependency.artifact
533533
final grailsDependency = new org.codehaus.groovy.grails.resolve.Dependency(artifact.groupId, artifact.artifactId, artifact.version)
534+
grailsDependency.extension = artifact.extension
534535
if (configuration) {
535536
grailsDependency.transitive = configuration.transitive
536537
grailsDependency.exported = configuration.exported
@@ -564,7 +565,7 @@ class AetherDependencyManager implements DependencyManager {
564565
grailsDependencies << dependency
565566
grailsDependenciesByScope["build"] << dependency
566567
buildDependencies << mavenDependency
567-
if (dependency.group == 'org.grails.plugins' || dependency.properties.extension == 'zip') {
568+
if (dependency.group == 'org.grails.plugins' || dependency.extension == 'zip') {
568569
grailsPluginDependencies << dependency
569570
grailsPluginDependenciesByScope["build"] << dependency
570571
}
@@ -602,7 +603,7 @@ class AetherDependencyManager implements DependencyManager {
602603
}
603604

604605
protected boolean isGrailsPlugin(org.codehaus.groovy.grails.resolve.Dependency dependency) {
605-
dependency.group == 'org.grails.plugins' || dependency.properties.extension == 'zip'
606+
dependency.group == 'org.grails.plugins' || dependency.extension == 'zip'
606607
}
607608

608609
@Override

grails-bootstrap/src/main/groovy/org/codehaus/groovy/grails/resolve/Dependency.groovy

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ class Dependency {
3636
boolean transitive = true
3737
boolean inherited = false
3838
boolean exported = true
39+
String extension = null
3940

4041
Dependency(String group, String name, String version, String...exc) {
4142
this.group = group

0 commit comments

Comments
 (0)