From 3d01d7fbbe5b5c7942a86fe6d1fc190d54fe458f Mon Sep 17 00:00:00 2001 From: Eugene Yokota Date: Thu, 22 Oct 2020 00:07:46 -0400 Subject: [PATCH] Use different artifactPath for remoteCachePom Fixes https://github.com/sbt/sbt/issues/6004 ``` sbt:foo> remoteCachePom [info] Wrote /private/tmp/foo/target/scala-2.13/remote-cache/foo_2.13-0.1.0-SNAPSHOT.pom sbt:foo> makePom [info] Wrote /private/tmp/foo/target/scala-2.13/foo_2.13-0.1.0-SNAPSHOT.pom ``` --- main/src/main/scala/sbt/internal/RemoteCache.scala | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/main/src/main/scala/sbt/internal/RemoteCache.scala b/main/src/main/scala/sbt/internal/RemoteCache.scala index cf758264e..a6f24cb81 100644 --- a/main/src/main/scala/sbt/internal/RemoteCache.scala +++ b/main/src/main/scala/sbt/internal/RemoteCache.scala @@ -128,11 +128,18 @@ object RemoteCache { }, remoteCachePom := { val s = streams.value - val config = makePomConfiguration.value + val config = (remoteCachePom / makePomConfiguration).value val publisher = Keys.publisher.value publisher.makePomFile((pushRemoteCache / ivyModule).value, config, s.log) config.file.get }, + remoteCachePom / artifactPath := { + Defaults.prefixArtifactPathSetting(makePom / artifact, "remote-cache").value + }, + remoteCachePom / makePomConfiguration := { + val config = makePomConfiguration.value + config.withFile((remoteCachePom / artifactPath).value) + }, remoteCachePom / remoteCacheArtifact := { PomRemoteCacheArtifact((makePom / artifact).value, remoteCachePom) }