Permalink
Browse files

merge-dist.gradle disables artifactoryPublish

Previously the project that was getting merged from would try to
execute the artifactoryPublish on the build box. This caused issues
since the mavenDescriptor did not exist.

The merge-dist.gradle now disables the artifactoryPublish task if it
exists (it will only exist on the build box).

Issue: SPR-9859, SPR-7951
  • Loading branch information...
1 parent 22bcb54 commit 2638dd5a05644988be193f9cbbb18b8be3b55506 @rwinch rwinch committed Oct 5, 2012
Showing with 6 additions and 4 deletions.
  1. +6 −4 merge-dist.gradle
View
@@ -22,11 +22,13 @@ import org.gradle.plugins.ide.eclipse.model.ProjectDependency
def mergeFromProject = project
// invoking a task on mergeFromProject will invoke the task with the same name on mergeIntoProject
-def taskNamesToMerge = ['sourcesJar','jar','javadocJar','javadoc','install']
+def taskNamesToMerge = ['sourcesJar','jar','javadocJar','javadoc','install','artifactoryPublish']
taskNamesToMerge.each { taskName ->
- def taskToRemove = tasks.getByPath(taskName)
- taskToRemove.enabled = false
- taskToRemove.dependsOn mergeIntoProject."$taskName"
+ def taskToRemove = mergeFromProject.tasks.findByPath(taskName)
+ if(taskToRemove) {
+ taskToRemove.enabled = false
+ taskToRemove.dependsOn mergeIntoProject."$taskName"
+ }
}
// update mergeIntoProject artifacts to contain the mergeFromProject artifact contents

0 comments on commit 2638dd5

Please sign in to comment.