sbt / sbt-pom-reader

Translates xml -> awesome. Maven-ish support for sbt.
Other
76 stars 26 forks source link

Pull in resolvers defined in ~/.m2/settings.xml #17

Closed mfulgo closed 9 years ago

mfulgo commented 10 years ago

I've tried adding resolvers as part of <root>/build.sbt, but they don't seem to be used when resolving dependencies in the pom. (Specifically, the parent pom comes from a local repo, but only Maven central is queried.)

Is there currently a way to do this?

(I did notice the TODO, but that seems to be a different approach.)

jsuereth commented 10 years ago

I think you want something like inAllProjects(Seq(resolvers += ...)).

The issue with jsut adding to the parent is it's not propogated to children by default in sbt.

Now, if you want to use a resolver to find the parent pom, I tink it needs to be in the pom file. This plugin uses Aether/Maven to resolve the "total" pom, rather than relying on heuristics in Ivy.

mfulgo commented 10 years ago

Well, it's not a multi-module project, so I don't think inAllProjects is right.

I explicitly added the internal repos to the pom, and that got it working. However, those repos are already defined in my ~/.m2/settings.xml, and adding them to all of our project poms wouldn't be the right thing to do. So, it looks like this is a feature request...?

jsuereth commented 10 years ago

Yep. Sounds like we should probably pull resolvers from ~/.m2/settings.xml just like sbt does from ~/.sbt/*.sbt files. I'll retitle this thread.

mfulgo commented 10 years ago

Awesome. Thanks.