当我跑步时
git push heroku master
来自我的grails应用程序目录Heroku抱怨
UNRESOLVED DEPENDENCIES: mysql#mysql-connector-java;5.1.16: not found
我的BuildConfig.groovy包含以下行:
dependencies {
runtime 'mysql:mysql-connector-java:5.1.16'
}
以及:
repositories {
grailsPlugins()
grailsHome()
grailsCentral()
// uncomment the below to enable remote dependency resolution from public Maven repositories
mavenLocal()
mavenCentral()
mavenRepo "http://snapshots.repository.codehaus.org"
mavenRepo "http://repository.codehaus.org"
mavenRepo "http://download.java.net/maven/2/"
mavenRepo "http://repository.jboss.com/maven2/"
}
我安装了一个更新的Maven,Maven显示它有这个连接器here,并且确实表明依赖的Gradle形式就是我所拥有的。
Heroku显示必须更新非标准库的pom.xml,但这不应该是这种情况吗?
请注意,我是否必须使用maven pom.xml来解决常见的依赖关系? Heroku是否完全了解BuildConfig.groovy依赖项?从似乎是这种情况的grails heroku plugin示例来看,所以不确定为什么它不能在这里工作。
由于
----------根据评论,我确实在build.gradle中引用了maven(显然是这样的),即:
buildscript {
repositories {
mavenCentral()
}
dependencies {
classpath "commons-io:commons-io:1.4"
}
}
-----------------------每条评论,以下是它所尝试的完整输出-----
Environment set to development
:: problems summary ::
:::: WARNINGS
module not found: mysql#mysql-connector-java;5.1.16
==== grailsPlugins: tried
-- artifact mysql#mysql-connector-java;5.1.16!mysql-connector-java.jar:
/tmp/build_242ryu5333xu0/lib/mysql-connector-java-5.1.16.jar
==== grailsHome: tried
/app/tmp/repo.git/.cache/.grails/lib/mysql-connector-java-5.1.16.xml
-- artifact mysql#mysql-connector-java;5.1.16!mysql-connector-java.jar:
/app/tmp/repo.git/.cache/.grails/lib/mysql-connector-java-5.1.16.jar
==== grailsHome: tried
/app/tmp/repo.git/.cache/.grails/dist/mysql-connector-java-5.1.16.xml
-- artifact mysql#mysql-connector-java;5.1.16!mysql-connector-java.jar:
/app/tmp/repo.git/.cache/.grails/dist/mysql-connector-java-5.1.16.jar
==== grailsHome: tried
-- artifact mysql#mysql-connector-java;5.1.16!mysql-connector-java.jar:
/app/tmp/repo.git/.cache/.grails/plugins/grails-mysql-connector-java-5.1.16.jar
==== grailsCentral: tried
-- artifact mysql#mysql-connector-java;5.1.16!mysql-connector-java.jar:
http://svn.codehaus.org/grails-plugins/grails-mysql-connector-java/tags/RELEASE_5_1_16/grails-mysql-connector-java-5.1.16.jar
==== grailsCore: tried
-- artifact mysql#mysql-connector-java;5.1.16!mysql-connector-java.jar:
http://svn.codehaus.org/grails/trunk/grails-plugins/grails-mysql-connector-java/tags/RELEASE_5_1_16/grails-mysql-connector-java-5.1.16.jar
::::::::::::::::::::::::::::::::::::::::::::::
:: UNRESOLVED DEPENDENCIES ::
::::::::::::::::::::::::::::::::::::::::::::::
:: mysql#mysql-connector-java;5.1.16: not found
::::::::::::::::::::::::::::::::::::::::::::::
答案 0 :(得分:0)
在做了各种各样的事情之后,我完全吹走了.git存储库目录并从头开始。这样做后,我不再有这种依赖性错误。因此,原因仍然是一个谜,但如果您遇到此错误,您可能希望尝试这一点(小心)。