Merge pull request #1300 from cunei/wip-fix-ivy-move

Do not attempt to publish if no artifacts are present
This commit is contained in:
Josh Suereth 2014-04-30 14:41:51 -04:00
commit c855dbd854
1 changed files with 12 additions and 10 deletions

View File

@ -255,6 +255,7 @@ object IvyActions
def publish(module: ModuleDescriptor, artifacts: Seq[(IArtifact, File)], resolver: DependencyResolver, overwrite: Boolean): Unit =
{
if (artifacts.nonEmpty) {
checkFilesPresent(artifacts)
try {
resolver.beginPublishTransaction(module.getModuleRevisionId(), overwrite);
@ -267,6 +268,7 @@ object IvyActions
finally { throw e }
}
}
}
private[this] def checkFilesPresent(artifacts: Seq[(IArtifact, File)])
{
val missing = artifacts filter { case (a, file) => !file.exists }