how do I get sbt to use a local maven proxy repository (Nexus)?

后端 未结 6 1204
無奈伤痛
無奈伤痛 2020-11-27 10:50

I\'ve got an sbt (Scala) project that currently pulls artifacts from the web. We\'d like to move towards a corporate-standardized Nexus repository that would cache artifacts

6条回答
  •  借酒劲吻你
    2020-11-27 11:23

    Well this has bugged me for a while so I found a guy that has written an SBT plugin for maven out on github called maven-sbt so all you have to do is include it in your plugins project and make your project mixin with maven.MavenDependencies and all your operations like update and publish-local work with your local maven. The nice thing about that is if you are like me, your org is all maven. So, all you libs are in you local maven repo but if for some reason you build with sbt first, then you start getting a bunch or jars in ivy too. What a waste of space, and time since you will still need to get them for your maven builds.

    That said, I wish this were built into sbt so I would not need to add it to every project. Maybe as a processor at least. He mentioned in one thing I read that he would like to add it to 0.9 but I have not been able to find it.

提交回复
热议问题