Tuesday, October 16, 2012

Adding Dropbox SDK to a maven build

Unfortunately the Dropbox Java SDK is not available in a public maven repository. The quick and dirty work around is to install the jar to once local ~/.m2 directory using the following command;

mvn install:install-file -Dfile=~/Downloads/dropbox-java-sdk-1.5.1/lib/dropbox-java-sdk-1.5.1.jar -DgroupId=com.dropbox -DartifactId=dropbox-java-sdk -Dversion=1.5.1 -Dpackaging=jar

This approach is a nuisance if you are working with a team, or you develop on multiple machines.

Docs on the install:install-file goal:

No comments: