Skip to content

Maven Tutorial

Useful Maven Commands

Install custom jar into maven local repository

  1. Go to target jar file folder and run following commands with your jar specific parameters
  2. In following example I want to install sqljdbc4.jar file into local repository
  3. Parameters -Dfile : Target Jar File Path -DgroupId= [Your custom group id Ex: com.exmaple] -DartifactId=[Jar Name / or Project Name] -Dversion=[version of the jar] -Dpackaging=[jar/pom]
1
2
    mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft.sqlserver
    -DartifactId=sqljdbc4 -Dversion=4.0 -Dpackaging=jar