【问题标题】:Could not find artifact net.sourceforge.jtds:jtds:zip:1.2.6 in grailsCentral在 grailsCentral 中找不到工件 net.sourceforge.jtds:jtds:zip:1.2.6
【发布时间】:2014-05-27 14:18:13
【问题描述】:

我基于this issue连接SQL Server数据库。

driverClassName = "net.sourceforge.jtds.jdbc.Driver" dialect = "org.hibernate.dialect.SQLServerDialect" url = "jdbc:jtds:sqlserver://myurl:1433/mydb"

我还添加了对 buildConfig.groovy 的依赖项

runtime 'net.sourceforge.jtds:jtds:1.2.6'

不幸的是,控制台显示此错误:

| Error Resolve error obtaining dependencies: Could not find artifact net.sourceforge.jtds:jtds:zip:1.2.6 in grailsCentral (http://repo.grails.org/grails/plugins) (Use --stacktrace to see the full trace)
| Error Could not find artifact net.sourceforge.jtds:jtds:zip:1.2.6 in grailsCentral (http://repo.grails.org/grails/plugins)
| Run 'grails dependency-report' for further information.

【问题讨论】:

  • 发布您的 BuildConfig.groovy ...可能是您也没有启用任何 maven 存储库。
  • 如果您希望这个问题不被关闭,您仍然需要将缺失的信息添加到问题中。问题必须是独立的,因此仅仅从答案中推断出错误是不够的。

标签: sql-server-2008 maven grails jdbc


【解决方案1】:
dependencies {
   runtime 'net.sourceforge.jtds:jtds:1.2.6'
}

而不是

plugins{

  runtime 'net.sourceforge.jtds:jtds:1.2.6'
}

【讨论】:

    猜你喜欢
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2021-01-09
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 1970-01-01
    • 2012-07-21
    相关资源
    最近更新 更多