Using Gradle 2.x and groovy, I have problems to add the jtds library, someone could help me, the library must be as thirdparty

plugins

(luis siles) #1

dependencies {
classpath ‘jtds-1.3.1-pros-1.jar’
}

task example {
def sql = groovy.sql.Sql.newInstance(
“jdbc:jtds:sqlserver://host.example.org/database”,
“username”, “password”, “net.sourceforge.jtds.jdbc.Driver”)
}


(Dimitar Dimitrov) #2

You are not posting any error, but a blind guess is that you forgot to specify your repository (unlike Maven, Gradle does not have a default repo).

If you are not behind proxy and not using a repo manager, you can just add this line:

repositories.jcenter()

(luis siles) #3

thanks for answering
but not read the jtds library, tells me error that does not recognize the driver