Using eclipse and maven 2, how to get dependency for sqljdbc4?

I am using eclipse with the maven 2 plugin.

I want to add a dependency for sqljdbc4, how can I do this?

It doesn't seem to be found using the "add dependency" option in eclipse?

+3
source share
3 answers

If sqljdbc4 is a Microsoft SQL Server JDBC driver, then you most likely will not find it in any "public" repository due to licensing issues.

So you have to download it, unzip and install it manually using mvn install:install-file(or mvn deploy:deploy-file, if you have a storage manager).

- jTDS ( maven), .

+6

, SQL- jar - sqljar-1.4.2.jar

follwing maven cmd

mvn install:install-file -DgroupId=com.org.sqlserver -DartifactId=sqljar -Dversion=1.4.2 -Dpackaging=jar -Dfile="C:\sqljar-1.4.2.jar"

sqljar maven.

pom.xml

<dependency>
    <groupId>com.org.sqlserver</groupId>
    <artifactId>sqljar</artifactId>
    <version>1.4.2</version>
</dependency>

.

+1

maven-eclipse-plugin .classpath .project, .

~/.m2/repository .

0

Source: https://habr.com/ru/post/1736933/


All Articles