I recently published a package to bintray and added it to jcenter now, which enables me to publish my snapshots to oss.jfrog.org. I am using the bintray-sbt plugin for publishing.
To publish snapshots i added the following directive to my build.sbt:
publishTo := {
if (isSnapshot.value)
Some("OJO" at "https://oss.jfrog.org/oss-snapshot-local/")
else
publishTo.value /* Value set by bintray-sbt plugin */
}
Problem is, that when i try publishing a snapshot i get the following error:
[error] (*:bintrayRelease) failed to release richard-w/[email protected]: {"message":"Resource not found for path 'Richard-W/maven/play-reactivemongo'"}
which basically means, that bintray-sbt hooked itself into the publish TaskKey. The publishing process is ready at the time this error is encountered, but this seems unclean and hacky. Disabling automatic release gets rid of the error but it yields a meaningless warning.
My question is now: Can i disable the bintray-sbt plugin from build.sbt somehow when publishing snapshots? If this doesn't work: How do i configure sbt to publish to bintray without using bintray-sbt. I never got the URL-Pattern right when i tried.
Struggled with the same problem for some time. Didn't manage to configure sbt-bintray, but configured bintray urls correctly. Here is my code:
Also, notice I added some keys for bintray repository configuration. You can set these keys in child projects and override defaults.
I use these properties like this:
And then, in build.sbt I can do: