scala - SBT transitive dependency resolution conflict -


i have problem in sbt resolving transitive dependencies.

the error is:

java.lang.nosuchmethoderror: com.vividsolutions.jts.index.strtree.strtree.queryboundary()ljava/util/list 

geospark using jts2geojson https://github.com/bjornharrtell/jts2geojson/blob/master/pom.xml references jts in version 1.14, excluded , use custom artifact replacement. called jtsplus still lives in com.vividsolutions namespace , provides additional methods, i.e. 1 missing above.

the latest geotools 17 using jts in version 1.13 https://github.com/geotools/geotools/blob/master/pom.xml#l752-l754

i need replace com.vividsolution.jts geotools org.datasyslab.jtsplus offers additional required functionality how can achieve this?

in maven:

<dependency>             <groupid>org. geotools </groupid>             <artifactid> geotools </artifactid>             <version>yourversion</version>             <exclusions>                 <exclusion>             <groupid>com.vividsolutions</groupid>             <artifactid>jts</artifactid>                 </exclusion>             </exclusions> </dependency> 

should work, sbt using

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")   )) 

did not fix it. actually, whe using dependencygraph, can see sbt still applying regular jts in version 1.13 whole project.

how can fix dependencies exclude original jts version?

my build.sbt looks like

lazy val geotools = "17.0"  resolvers += "osgeo" @ "http://download.osgeo.org/webdav/geotools" resolvers += "boundless" @ "http://repo.boundlessgeo.com/main" resolvers += "imageio" @ "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" ) 

why sbt not excluding these libraries despite using excludes? mentioned in comments alldependencies instead of librarydependencies needs used. think required due transitive problems.


Comments

Popular posts from this blog

php - Permission denied. Laravel linux server -

google bigquery - Delta between query execution time and Java query call to finish -

python - Pandas two dataframes multiplication? -