Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Maven SBT dependency artifacts?

I manage my project using Maven and SBT at same time. The reasons for this are:

  1. Intellij IDEA cannot import SBT project.(idea-sbt plugin doesn't work very well)
  2. I don't know how can get sources and javadocs from SBT.(I'd like to see any answers about this)

The problem is I don't know how to let Maven download SBT dependency. I search through maven repository and couldn't find anything about sbt. I wanna use Maven or SBT to manage all the jars in my project.

like image 244
Sawyer Avatar asked Dec 05 '25 13:12

Sawyer


1 Answers

  • If you put a pom.xml to the root of your project, it will be recognized by SBT. When you specify no managed dependencies in the project definition, SBT relies on Maven dependencies.

    As it said in SBT doumentation,

sbt performs this dependency handling when the update action is executed. By default, sbt does not update your dependencies before every compilation, but only does so when you execute update. sbt supports three ways of specifying these dependencies:

* Declarations in your project definition
* Maven POM files
* Ivy configuration and settings files
  • Maven knows nothing about SBT as of now (at least, I've not heard about any plugins so far), so, the best you can do to manage your project both in Maven and SBT, is to generate POMs by SBT. See SBT to Maven Converter for more details.
like image 192
Vasil Remeniuk Avatar answered Dec 08 '25 06:12

Vasil Remeniuk



Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!