title: SBT transitive dependency resolution conflict
body: <p>I have a problem in SBT resolving transitive dependencies. </p>
  
  <p>The error is:</p>
  
  <pre><code>java.lang.NoSuchMethodError: com.vividsolutions.jts.index.strtree.STRtree.queryBoundary()Ljava/util/List
  </code></pre>
  
  <p><code>Geospark</code> is using <code>jts2geojson</code> <code>https://github.com/bjornharrtell/jts2geojson/blob/master/pom.xml</code> which references jts in version <code>1.14</code>, but this is excluded and they use a custom artifact as a replacement. It is called <code>JTSPlus</code> which still lives in the <code>com.vividsolutions</code> namespace and provides some additional methods, i.e. the one which is missing above.</p>
  
  <p>The latest <code>geotools 17</code> is using <code>jts</code> in version <code>1.13</code>
  <a href="https://github.com/geotools/geotools/blob/master/pom.xml#L752-L754" rel="nofollow noreferrer">https://github.com/geotools/geotools/blob/master/pom.xml#L752-L754</a></p>
  
  <p>I need to <strong>replace <code>com.vividsolution.jts</code> from geotools with <code>org.datasyslab.jtsplus</code></strong> which offers additional but required functionality how can I achieve this?</p>
  
  <p>In maven:</p>
  
  <pre><code>&lt;dependency&gt;
              &lt;groupId&gt;org. geotools &lt;/groupId&gt;
              &lt;artifactId&gt; geotools &lt;/artifactId&gt;
              &lt;version&gt;YOURVERSION&lt;/version&gt;
              &lt;exclusions&gt;
                  &lt;exclusion&gt;
              &lt;groupId&gt;com.vividsolutions&lt;/groupId&gt;
              &lt;artifactId&gt;jts&lt;/artifactId&gt;
                  &lt;/exclusion&gt;
              &lt;/exclusions&gt;
  &lt;/dependency&gt;
  </code></pre>
  
  <p>should work, but for SBT using</p>
  
  <pre><code>libraryDependencies ++= Seq(
    "org.geotools" % "gt-main" % geotools,
    "org.geotools" % "gt-arcgrid" % geotools,
    "org.geotools" % "gt-process-raster" % geotools)
    .map(_.excludeAll(
      ExclusionRule(organization = "com.vividsolution", artifact = "jts")
    ))
  </code></pre>
  
  <p>did not fix it. Actually, whe using the dependencyGraph, I can see SBT is still applying the regular jts in version 1.13 to the whole project.</p>
  
  <p><strong>How can I fix the dependencies to properly exclude the original JTS version?</strong></p>
  
  <p>My build.sbt looks like</p>
  
  <pre><code>lazy val geotools = "17.0"
  
  resolvers += "osgeo" at "http://download.osgeo.org/webdav/geotools"
  resolvers += "boundless" at "http://repo.boundlessgeo.com/main"
  resolvers += "imageio" at "http://maven.geo-solutions.it"
  resolvers += Resolver.mavenLocal
  
  libraryDependencies ++= Seq(
    "org.geotools" % "gt-main" % geotools,
    "org.geotools" % "gt-arcgrid" % geotools,
    "org.geotools" % "gt-process-raster" % geotools)
    .map(_.excludeAll(
      ExclusionRule(organization = "com.vividsolution", artifact = "jts")
    ))
  
  libraryDependencies ++= Seq(
    "org.datasyslab" % "geospark" % "0.6.1-snapshot"
  )
  </code></pre>