-
Notifications
You must be signed in to change notification settings - Fork 0
Adding and Using New Dependencies
aaplmath edited this page Feb 17, 2017
·
3 revisions
-
Create a new branch for the dependency you are adding. Do not directly add new dependencies to
master
. -
On the new branch, run the following command, substituting in the correct values for the different parameters:
mvn install:install-file -DgroupId=YOUR_GROUP -DartifactId=YOUR_ARTIFACT -Dversion=YOUR_VERSION -Dfile=YOUR_JAR_FILE -Dpackaging=jar -DgeneratePom=true -DlocalRepositoryPath=. -DcreateChecksum=true
- An example of this command for the TalonSRX Java library is shown below:
mvn install:install-file -DgroupId=com.ctr-electronics -DartifactId=TalonSRXLibJava -Dversion=4.4.1.8 -Dfile=TalonSRXLibJava.jar -Dpackaging=jar -DgeneratePom=true -DlocalRepositoryPath=. -DcreateChecksum=true
-
NOTE: The file path to the JAR does not support expanding
~
as a user's home directory. File paths must be relative to the current directory or absolute, without using~
.
-
Confirm that the installation was successful (twice).
-
If you're confident that installation was successful, merge with master and push.
-
In your Gradle build file, add the Maven repository
https://raw.githubusercontent.com/Roobotics-FRC/RooMaven/master
as shown below:repositories { mavenCentral() maven { url 'https://raw.githubusercontent.com/Roobotics-FRC/RooMaven/master' } ... }
-
In your Gradle dependencies, add the following line, substituting in the correct values (which you entered in earlier when installing the dependency):
dependencies { compile group: '{GROUP-ID}', name: '{ARTIFACT-NAME}', version: '{VERSION}' }
-
Build and cross your fingers…