Unfortunately, this is not yet possible, as the Maven plugin does not allow Scala.js.
Scala.js consists of several things:
- A compiler plugin for scalac, which can be included with the Maven plugin for Scala .
- Libraries:
scalajs-library and optionally scalajs-javalibex . - Link-time tools: they are displayed directly in the sbt plugin, although its core is located in a separate
scalajs-tools library, which can be reused by the Maven plugin for Scala.js.
As with Scala.js 0.6.0, all these things are published on Maven Central, so Maven can solve them. (Except for the sbt plugin with specific sbt nodes, but this is not necessary.)
While no one is developing a proper Maven plugin for Scala.js, calling Scala's command line interface can be the easiest . js from Maven to call connection-time tools (specifically scalajsld ). I do not know Maven, but I assume that it has tasks for invoking external command-line programs in its pipeline.
Edit: Updated for Scala.js 0.6.x: artifacts are now published on Maven Central.
sjrd
source share