Skip to content

Commit

Permalink
fix for GRAILS-6199 "org.grails:grails:1.3.RC2 Missing from Repository"
Browse files Browse the repository at this point in the history
  • Loading branch information
graemerocher committed May 4, 2010
1 parent 4cb299b commit 3e29db4
Showing 1 changed file with 16 additions and 5 deletions.
21 changes: 16 additions & 5 deletions gradle/maven.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -29,19 +29,30 @@ task mavenInstall(dependsOn: [generatePoms, tasks.withType(Jar).all]) << {
pom(file: "$generatePoms.pomsDir/$jar.baseName${jar.appendix ? '-' + jar.appendix : ""}.pom")
}
}

// install the grails parent POM
artifact.install(file: "${libs.destinationDir}/grails-${version}.jar") {
pom(file: "$generatePoms.pomsDir/grails.pom")
}
}

task mavenDeploy(dependsOn: [generatePoms, tasks.withType(Jar).all]) << {
def antBuilderClasspath = services.get(org.gradle.api.internal.ClassPathRegistry).getClassPathFiles('ANT') +
services.get(org.gradle.api.internal.ClassPathRegistry).getClassPathFiles('LOCAL_GROOVY') +
configurations.deployerJars.files
def isolatedAnt = services.get(org.gradle.api.internal.project.IsolatedAntBuilder)

tasks.withType(Jar).matching({task -> task.mavenArtifact } as Spec).each {jar ->
// todo Once we have better classpath isolation and/or we have migrated to Maven 3 we don't need to execute the below with the IsolatedAntBuilder
def antBuilderClasspath = services.get(org.gradle.api.internal.ClassPathRegistry).getClassPathFiles('ANT') +
services.get(org.gradle.api.internal.ClassPathRegistry).getClassPathFiles('LOCAL_GROOVY') +
configurations.deployerJars.files
def isolatedAnt = services.get(org.gradle.api.internal.project.IsolatedAntBuilder)
isolatedAnt.execute(antBuilderClasspath) {
'antlib:org.apache.maven.artifact.ant:deploy'(file: jar.archivePath) {
pom(file: "$generatePoms.pomsDir/$jar.baseName${jar.appendix ? '-' + jar.appendix : ""}.pom")
}
}
}
// deploy the grails parent POM
isolatedAnt.execute(antBuilderClasspath) {
'antlib:org.apache.maven.artifact.ant:deploy'(file: "${libs.destinationDir}/grails-${version}.jar") {
pom(file:"$generatePoms.pomsDir/grails.pom")
}
}
}

0 comments on commit 3e29db4

Please sign in to comment.