Skip to content

Commit

Permalink
merge-dist.gradle disables artifactoryPublish
Browse files Browse the repository at this point in the history
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
rwinch committed Oct 5, 2012
1 parent 22bcb54 commit 2638dd5
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions merge-dist.gradle
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 2638dd5

Please sign in to comment.