How to install a maven artifact into your local repository

For example, you are working on a maven project application that integrates with paypal. You download paypal sdk (jars),  but you don't have any repository manager installed/setup on your local machine.

What you can do are:
1.) Include the jar as a scope=system and specify the path (not adviseable).

2.) Install the jar on your repository manager (if you have).

3.) If you don't have a repository manager, try the following command on the command prompt, it will install the jar in your local repository (normally ~/.m2/repository).

mvn3 install:install-file -Dfile=merchant-java-sdk_1.2.95.jar -DgroupId=com.paypal.sdk -DartifactId=merchant-java-sdk -Dversion=1.2.95 -Dpackaging=jar

0 Comments

Post a Comment

Post a Comment (0)

Previous Post Next Post
NERV Open Source

Building production Spring Boot systems?

Explore NERV — open-source Java libraries for audit trails, persistence, exception handling, and reliable event-driven architecture.

Explore NERV on GitHub →