Monday, February 13, 2017

Install local jars in maven repository

Following command can be used to install local or internal jar files in maven repository.

mvn install:install-file -Dfile=d:/libs/test.jar -DgroupId=com.company.test -DartifactId=test -Dversion=1.0 -Dpackaging=jar

After installing jar files in maven repository, you can use the jar files in maven project as a dependency in pom.xml.

<dependencies>
<dependency>
<groupId>com.company.test</groupId>
<artifactId>test</artifactId>
<version>1.0</version>
</dependency>
</dependencies>

No comments:

Post a Comment