SBT to Maven Converter

前端 未结 3 1512
悲&欢浪女
悲&欢浪女 2020-12-07 17:50

Since most IDEs are only able to import Maven projects, I\'d like to generate a POM.xml from an SBT managed project, is there a better way to do it?

相关标签:
3条回答
  • 2020-12-07 18:14

    There is a very direct way provided by SBT. You can use the below command where your SBT file exixts:

    sbt makePom

    This will generate the .pom file in the target folder you can search that and rename to pom.xml and keep that file in the location and run mvn clean compile install to get full out of it.

    0 讨论(0)
  • 2020-12-07 18:21

    Vasil's answer is correct, but for Eclipse and IDEA you can generate IDE metadata more directly using plugins. For IDEA https://github.com/mpeltonen/sbt-idea, and for Eclipse https://github.com/musk/SbtEclipsify .

    0 讨论(0)
  • 2020-12-07 18:35

    Did you try make-pom from sbt?

    It generates basic POM for the current project at the ./target. To customize generation, you can override pomExtra, pomIncludeRepository and pomPostProcess at the project definition.

    0 讨论(0)
提交回复
热议问题