There are a lot of Java jars that isn't on the maven repository but you still need or like to manage these jars via Maven. To install a jar into your local Maven repo:
mvn install:install-file -Dfile={file} -DgroupId={groupname} -DartifactId={artifactname} -Dversion={versionnumber} -Dpackaging=jarFor example, you want to add Microsoft MSSQL jdbc driver into your local Maven repo then the procedure would be:
- Download and extract the file.
- Open the command line and type in:
mvn install:install-file -Dfile=sqljdbc4.jar -DgroupId=com.microsoft.sqlserver -DartifactId=mssqljdbc4 -Dversion=4.0 -Dpackaging=jar
<dependency> <groupId>com.microsoft.sqlserver</groupId> <artifactId>mssqljdbc4</artifactId> <version>4.0</version> </dependency>
No comments:
Post a Comment