Open Darkyenus opened 8 years ago
Hi
Thanks for reporting and for the nice words! Had a quick look and it appears that the plugin publishes a jar but not a pom https://jitpack.io/com/github/Darkyenus/sbt-robovm/-1.12-g12bb28f-1/build.log and that's why it is not picked up.
You are right, the pom generation was for some reason disabled. But even after enabling it, jitpack does not seem to pick it up: https://jitpack.io/com/github/Darkyenus/sbt-robovm/1.12j/build.log
sbt looks for the pom at https://jitpack.io/com/github/Darkyenus/sbt-robovm_2.10_0.13/1.12j/sbt-robovm-1.12j.pom
and fails. Querying that url in the browser prompts for authentication (?).
Thanks for the quick response!
Aha, so sbt publishes the pom to:
~/.m2/repository/org/roboscala/sbt-robovm_2.10_0.13/1.12.0/sbt-robovm-1.12.0.pom
while JitPack expects it to be:
~/.m2/repository/org/roboscala/sbt-robovm/1.12.0/sbt-robovm-1.12.0.pom
That is the issue.
any news on this issue?
Ok, got an update. One of our users got it working by renaming the directory where files are published: https://github.com/avdv/sbt-release/blob/252c2556a4efcf80cdc4078dacea94ec76185342/build.sbt#L9-L17
publishM2 := {
publishM2.value
val d = file(sys.env("HOME")) / s".m2/repository/com/github/gseitz/sbt-release_${scalaBinaryVersion.value}_${sbtBinaryVersion.value}"
d.renameTo(file(sys.env("HOME")) / ".m2/repository/com/github/gseitz/sbt-release")
}
sbtPlugin := true
publishMavenStyle := true
That build worked too. Is this something you can give a try? @Darkyenus @lockwobr
This method works, thanks!
However it isn't so simple, or at least I have had some problems, this time with sbt itself, because it added <properties><scalaVersion>...</> <sbtVersion>...</></>
to the .pom and the sbt attempted to retrieve cross compiled version anyway (even though the libraryDependenc(ies)
y was specified without it). So I had to strip it first, using pomPostProcess
: https://github.com/Darkyenus/sbt-robovm/commit/c52dfacda07660984d7425bc841ec7cd084addf9
looks like sbt has a lot of support for this out of the box... unfortunately, the same can't be said for the documentation of that support :sweat_smile:
scala-js-bundler
plugin
project/plugins.sbt
lazy val root = project.in(file(".")).dependsOn(scalaJsChromePlugin)
lazy val scalaJsChromePlugin = ProjectRef( build = uri("https://github.com/emanresusername/scala-js-chrome.git#scala-js-bundler"), project = "plugin" )
*NOTE:* the above would replace the `addSbtPlugin("net.lullabyte", "scala-js-chrome", "version")` line that would go in there otherwise
# similar usecases
https://stackoverflow.com/a/21211671/5886125
https://stackoverflow.com/a/20799240/5886125
http://alvinalexander.com/scala/using-github-projects-scala-library-dependencies-sbt-sbteclipse
# related issues
#806
If someone is still looking for solution, this is what worked for me: build.sbt plugin.sbt
Jitpack already supports sbt's cross compiling (#178) and this is just a step further. When sbt publishes a sbt plugin (set by
sbtPlugin := true
in plugin's build.sbt), the resulting artifact name is in the following format: "artifactName_scalaVersion_sbtVersion" and jitpack does not seem to pick it up (standard cross compiling has only "artifactName_scalaVersion").Here is a log from trying to build a sbt plugin: https://jitpack.io/com/github/Darkyenus/sbt-robovm/-1.12-g12bb28f-1/build.log Here is what sbt reports on my machine when trying to depend on it:
Btw. great work, Jitpack is extremely useful to me, thanks!