java build mongodb driver

git bash here
$ cd /c/s
$ git clone https://github.com/mongodb/mongo-java-driver.git (记得打开FQ工具,不然很慢)
$ cd mongo-java-driver/
最后是编译,这个工程支持用ant, maven, 或gradle进行编译,这里使用maven
mvn clean package -DskipTests=true

...
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS
[INFO] ------------------------------------------------------------------------
[INFO] Total time: 16.732s
[INFO] Finished at: Sat May 17 14:47:39 CST 2014
[INFO] Final Memory: 18M/234M
[INFO] ------------------------------------------------------------------------


cyper.yin@ADMINIB-SVQQ157 /c/s/mongo-java-driver/target (master)
$ ls -lh
total 291k
drwxr-xr-x    5 cyper.yi Administ        0 May 17 14:47 classes
drwxr-xr-x    3 cyper.yi Administ        0 May 17 14:47 maven-status
-rw-r--r--    1 cyper.yi Administ     582k May 17 14:47 mongo-java-driver-2.12.0.jar
drwxr-xr-x    4 cyper.yi Administ        0 May 17 14:47 test-classes

好了,mongo-java-driver-2.12.0.jar已经编译成功.

你可能感兴趣的:(java,mongodb,driver)