Maven SBT依赖项工件? [英] Maven SBT dependency artifacts?

查看:140
本文介绍了Maven SBT依赖项工件?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我同时使用Maven和SBT管理我的项目。原因是:

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


  1. Intellij IDEA无法导入SBT
    项目。(idea-sbt plugin doesn' t
    工作得非常好)

  2. 我不知道如何从SBT获得资源和
    javadocs。(我想看到有关此问题的任何答案)

问题是我不知道如何让Maven下载SBT依赖。我搜索maven存储库,找不到任何关于sbt的信息。我想使用Maven或SBT管理我项目中的所有罐子。

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.

推荐答案


  • 如果将pom.xml放到项目的根目录下,将由SBT认可。当您在项目定义中未指定托管依赖项时,SBT依赖于Maven依赖项。

    • 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.

      正如它在 SBT doumentation


      执行更新操作时,sbt执行此依赖项处理
      。默认情况下,
      默认情况下,sbt不会在每次编译之前更新
      依赖项,
      但只有在执行
      update时才会这样做。 sbt支持
      指定这些依赖项的三种方式:

      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目前对SBT一无所知(至少,到目前为止我还没有听说过任何插件),因此,在Maven和SBT中管理项目的最佳方法是生成POM由SBT。有关详细信息,请参见 SBT to Maven Converter

        • 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.
        • 这篇关于Maven SBT依赖项工件?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆