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
```
This commit is contained in:
Eugene Yokota 2020-10-22 00:07:46 -04:00
parent 88d7da5141
commit 3d01d7fbbe
1 changed files with 8 additions and 1 deletions

View File

@ -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)
}