Scala – How to remove the _ postfix from artifacts built+published with simple-build-tool

sbtscala

I'm building a few Java-only projects using simple-build-tool. When I publish the artifacts from the projects using, say, sbt publish-local then the resulting artifacts have the Scala version appended to their name. With a Scala project this would make sense, but since these are Java only projects it doesn't. How would I disable this postfixing of the Scala version? Or can I?

For reference I'm using sbt 0.11.1, Scala 2.9.1 and a .sbt file for build configuration (though moving to a full project config would be no problem).

Best Answer

After looking around how Artifact.artifactName is implemented and ultimately used it seems that the way to turn this off is to specify false for the crossPath setting. This is documented in one of the quick configuration examples on the xsbt wiki.

http://www.scala-sbt.org/release/docs/Examples/Quick-Configuration-Examples

// disable using the Scala version in output paths and artifacts
crossPaths := false
Related Topic