Skip to content

Handle dependency import scope #558

@Baccata

Description

@Baccata

I was thinking I'd start implementing a docker plugin, by replicating sbt-native-packager, which uses spotify's docker client.

Spotify's docker client depends on jersey-client, the parent of which contains an "import dependency" (see maven's import scope)

As of now, CBT doesn't handle import scopes (ie an import dependency should be replaced by the dependencies contained in the pom it references). I therefore implemented a method to resolve imports which I call in dependencyVersions (see here).

Thanks to that, the resolver goes a bit further, but crashes here because it can't resolve javax.el.version in this pom : http://repo1.maven.org/maven2/org/glassfish/hk2/hk2-bom/2.4.0-b25/hk2-bom-2.4.0-b25.pom

I have no idea where this property is supposed to come from (and therefore how the resolver should behave). If somebody can unblock me and explain where that property is supposed to come from, I might be able to fix it and submit a PR against cbt.

Here's the build I'm testing against :

import cbt._

class Build(val context: Context) extends Plugin with Ensime {
  override def dependencies =
    super.dependencies ++
    Resolver( mavenCentral, sonatypeReleases ).bind(
      MavenDependency( "org.glassfish.jersey.core", "jersey-client", "2.22.2")
    )
}

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions