How to make this source (github) in a library / jar?

I would like to use this source: https://github.com/mongodb/casbah How can I use this material? I would like to make a jar for the library. But I have no idea how to do this. Tried this with Eclipse and IntelliJ. I downloaded the source with:

git clone git://github.com/mongodb/casbah 

Now I have a casbah folder; I copied it to the project source (in Eclipse or IntelliJ), but I can't even compile it ... there is always something like:

 error: '{' expected but identifier found. package casbah-dynamic.src.main.scala 

Do I need to compile? How? And what after compilation? This is a Scala project, but I think this is not so important. As a Java project, I would have to do the same.

So what should I do?


Edit: I saw that this material exists (some parts of it) as a bank ( http://scala-tools.org/repo-releases/com/mongodb/ ). But I would like to use the source and find out how to use it.

+4
source share
1 answer

Build it with SBT :

 > git clone git://github.com/mongodb/casbah.git > cd casbah > sbt package 

You will get several cans:

 > find ./ -iname "*.jar" ./casbah-query/target/scala-2.9.1/casbah-query_2.9.1-3.0.0-SNAPSHOT.jar ./casbah-core/target/scala-2.9.1/casbah-core_2.9.1-3.0.0-SNAPSHOT.jar ./casbah-util/target/scala-2.9.1/casbah-util_2.9.1-3.0.0-SNAPSHOT.jar ./target/scala-2.9.1/casbah_2.9.1-3.0.0-SNAPSHOT.jar ./casbah-commons/target/scala-2.9.1/casbah-commons_2.9.1-3.0.0-SNAPSHOT.jar ./casbah-gridfs/target/scala-2.9.1/casbah-gridfs_2.9.1-3.0.0-SNAPSHOT.jar 
+8
source

Source: https://habr.com/ru/post/1379091/


All Articles