How to include geoscript as a dependency in intelliJ Scala project?

New for Scala and sbt; coming from the python world, and rather confused by library dependencies, versions, and what sbt can and cannot automatically load (i.e. when the jar needs to be manually placed in / lib).

I want to use classes from the Scala geoscript project ( http://geoscript.org/scala/quickstart.html ) in my Scala application.

I am using IntelliJ with Scala 2.11.8.

Can I end up doing something like:

libraryDependencies += "org.geoscript" % "some-artifact" % some=version

Or will it be an "unmanaged dependency"? And if so, what's the cleanest way to do it?

+3


source to share


1 answer


If the dependency byte is published to Maven Central and some other repositories, sbt will automatically be able to resolve and load it when declaring it as libraryDependency

. This is a "managed addiction". Usually the library documentation will tell you the "coordinates" (group id, artifact id, version) that you should install.



In the page you linked and in Maven search, it looks like Geoscript is not published, so you will have to add it to your folder /lib

in the project. This should be enough to put it on the classpath. You may need to update your project for IntelliJ to pick it up and suggest completion.

+1


source







All Articles