![]() mvn install:install-file -Dfile=/path/to/library. I have had some headaches with using plain AARs in a project, and I find this way much more reliable and hassle-free. To add an AAR to the local Maven repo, just use Maven itself, as shown in the following command. Mainly you would be interested in tag.maven-jar-plugin: This plugin provides the capability to build and sign jars. It can copy and/or unpack artifacts from local or remote repositories to a specified location. Download the jar with dependencies, then use it like so to download, for example, okhttp: java -jar maven-repository-provisioner-1.2.0-jar-with-dependencies.jar \īonus #2: include an AAR in the local Maven repo maven-dependency-plugin: The dependency plugin provides the capability to manipulate artifacts. To do so, you can use maven-repository-provisioner. This is useful if you plan to distribute this repo to a machine that cannot access the public Maven repos on the Internet. You can also add other libraries, along with their dependencies, to our local Maven repo. ![]() Updating the dependency references in Eclipse. After defining the class you can issue the Maven build command. In this tutorial we will be adding Apache Commons Email library as a dependency to our Maven project. Now, by invoking the following command, Gradle will package an obfuscated AAR of our library and deploy it to our local Maven repo: gradle :mylibrary:publishīonus #1: include other libraries in the local Maven repo How to add dependencies to a Maven project Used software. Maven // List all dependencies and write to POMĬonfigurations. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |