Skip to content

Instantly share code, notes, and snippets.

@allixender
Last active July 19, 2019 09:50
Show Gist options
  • Save allixender/72369c7f264b97da7cd1b14d11d5f6f8 to your computer and use it in GitHub Desktop.
Save allixender/72369c7f264b97da7cd1b14d11d5f6f8 to your computer and use it in GitHub Desktop.
To get GeoTools dependencies for Scala/SBT with JAI right on public build servers like Travis
// val geotoolsVersion = "8.7"
val geotoolsVersion = "9.5"
// val geotoolsVersion = "10.8"
// val geotoolsVersion = "11.3"
// val geotoolsVersion = "12.0"
// val geotoolsVersion = "13-SNAPSHOT"
libraryDependencies ++= Seq(
"org.geotools" % "gt-epsg-hsql" % geotoolsVersion,
"org.geotools" % "gt-referencing" % geotoolsVersion,
"org.geotools" % "gt-geotiff" % geotoolsVersion,
"org.geotools" % "gt-wfs" % geotoolsVersion,
"javax.media" % "jai_core" % "1.1.3" from "http://download.osgeo.org/webdav/geotools/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar",
"javax.media" % "jai_codec" % "1.1.3" from "http://download.osgeo.org/webdav/geotools/javax/media/jai_codec/1.1.3/jai_codec-1.1.3.jar",
"javax.media" % "jai_imageio" % "1.1" from "http://download.osgeo.org/webdav/geotools/javax/media/jai_imageio/1.1/jai_imageio-1.1.jar"
)
resolvers += "Osgeo Repo" at "http://download.osgeo.org/webdav/geotools/"
resolvers += "Boundless" at "http://repo.boundlessgeo.com/main"
@DavidPerezIngeniero
Copy link

DavidPerezIngeniero commented Dec 13, 2017

In my case this is the configuration that works:

		resolvers ++= Seq(
			"Osgeo Repo" at "http://download.osgeo.org/webdav/geotools/",
			"Boundless" at "http://repo.boundlessgeo.com/main"
		),
		projectDependencies ++= Seq(
			"javax.media" % "jai_core" % "1.1.3" from "http://download.osgeo.org/webdav/geotools/javax/media/jai_core/1.1.3/jai_core-1.1.3.jar",
			"org.geotools" % "gt-main" % geotoolsVersion
				exclude("javax.media", "jai_core"),
                     )

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment