Description
This project aims to read Maven pom.xml files and configure a basic sbt project appropriately.
sbt pom reader plugin alternatives and similar packages
Based on the "Sbt plugins" category.
Alternatively, view sbt pom reader plugin alternatives based on common mentions on social networks and blogs.
-
sbt-assembly
Deploy über-JARs. Restart processes. (port of codahale/assembly-sbt) -
sbt-dependency-graph
sbt plugin to create a dependency graph for your project -
sbteclipse
Plugin for sbt to create Eclipse project definitions -
sbt-jmh
"Trust no one, bench everything." - sbt plugin for JMH (Java Microbenchmark Harness) -
sbt-revolver
An SBT plugin for dangerously fast development turnaround in Scala -
sbt-updates
sbt plugin that can check Maven and Ivy repositories for dependency updates -
better-monadic-for
Desugaring scala `for` without implicit `withFilter`s -
sbt-buildinfo
I know this because build.sbt knows this. -
sbt-pack
A sbt plugin for creating distributable Scala packages. -
sbt-microsites
An sbt plugin to create awesome microsites for your project -
sbt-mima-plugin
A tool for catching binary incompatibility in Scala -
sbt-ensime
Generates .ensime config files for SBT projects http://ensime.org/build_tools/sbt -
sbt-sonatype
A sbt plugin for publishing Scala/Java projects to the Maven central. -
sbt-ci-release
sbt plugin to automate Sonatype releases from GitHub Actions -
sbt-dependency-check
SBT Plugin for OWASP DependencyCheck. Monitor your dependencies and report if there are any publicly known vulnerabilities (e.g. CVEs). :rainbow: -
sbt-header
sbt-header is an sbt plugin for creating file headers, e.g. copyright headers -
sbt-play-scalajs
SBT plugin to use Scala.js along with any sbt-web server. -
sbt-api-mappings
An Sbt plugin that fills apiMappings for common Scala libraries. -
sbt-unidoc
sbt plugin to create a unified Scaladoc or Javadoc API document across multiple subprojects. -
sbt-sublime
An sbt plugin for generating Sublime Text projects with library dependencies sources -
sbt-ghpages
git, site and ghpages support for sbt projects. -
sbt-ide-settings
SBT plugin for tweaking various IDE settings -
sbt-scala-js-map
A Sbt plugin that configures source mapping for Scala.js projects hosted on Github -
sbt-versions
Plugin that checks for updated versions of your project's dependencies. -
sbt-hepek
Sbt plugin for rendering Scala objects to files. And more! -
sbt-pantarhei
sbt plugin building and publishing release notes from github pull requests -
sbt-classfinder
SBT plugin for retrieving runtime information about the classes and traits in a project
Access the most powerful time series database as a service
Do you think we are missing an alternative of sbt pom reader plugin or a related project?
README
sbt pom reader plugin
This project aims to read Maven pom.xml
files and configure a basic sbt project appropriately. We have limited aims:
- The intent is not to parse/use Maven plugins. The purpose is to translate project structure, dependencies, and artifact resolution
- Failure to read a
pom.xml
file causes the Maven build to crash - Unexpected Maven-y things will simply fail to translate
- Majority of simple Maven projects will be usable directly in sbt from the Maven
pom.xml
That said:
- Parent pom resolution and inheritance should work
- Multi-module builds should work, assuming each module meets the above caveats
Usage
You want you project directory to look like the following:
<my-maven-project>/
pom.xml <- Your maven build.
project/
build.properties <- the sbt version specification
build.scala <- the sbt build definition
plugins.sbt <- the sbt plugin configuration
.. <- Whatever files are normally in your maven project.
Each of the files should have the following contents.
project/build.properties
:
sbt.version=0.13.8
project/build.scala
:
import sbt._
object MyBuild extends com.typesafe.sbt.pom.PomBuild
project/plugins.sbt
:
addSbtPlugin("com.typesafe.sbt" % "sbt-pom-reader" % "2.0.0")
Note: Release candidate 2.1.0-RC2
is available, providing updates to the Maven/Wagon/Aether library versions. (Testing and bug reporting is appreciated!)
addSbtPlugin("com.typesafe.sbt" % "sbt-pom-reader" % "2.1.0-RC2")
Configuring projects
If the pom-reader plugin doesn't have a 100% mapping from your maven build into sbt (i.e. there is some kind of configuration you wish to perform, then you will need to add specific configuration items. Since the plugin is automatically generating the sub-projects based on your maven configuration, you'll have to indirectly reference them in sbt settings, like so:
build.sbt
:
// This is a heuristic, assuming we're running sbt in the same directory as the build.
val buildLocation = (file(".").getAbsoluteFile.getParentFile)
// Here we define a reference to a subproject. The string "subproject" refers to the artifact id of
// the subproject.
val subproject = ProjectRef(buildLoc, "subproject")
// Disable all scalac arguments when running the REPL.
scalacOptions in subproject in Compile in console := Seq.empty
Contributing
Please feel free to contribute example/test maven projects you'd like to be able to load in sbt.
Licensing
Apache 2 software license. See [LICENSE](LICENSE).
*Note that all licence references and agreements mentioned in the sbt pom reader plugin README section above
are relevant to that project's source code only.