问题描述
我有一个在Travis CI上运行测试的Grails 2.5.6项目,几天前,我开始遇到与未解决的依赖项有关的错误.
I have a Grails 2.5.6 project that runs tests on Travis CI, and a couple of days ago I started to get errors related to unresolved dependencies.
在我这方面,该应用程序没有更改任何依赖关系,看来Maven存储库中出了点问题.
On my side the app didn't changed any dependencies, it seems something wrong is on the maven repo.
这是我得到的日志:
| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: cglib:cglib-nodep:jar:2.2.2, org.codehaus.groovy.modules.http-builder:http-builder:jar:0.5.2, org.grails:grails-datastore-test-support:jar:1.0-grails-2.4, de.odysseus.staxon:staxon:jar:1.2, mysql:mysql-connector-java:jar:5.1.43, org.javassist:javassist:jar:3.17.1-GA, org.mozilla:rhino:jar:1.7R4, com.bertramlabs.plugins:asset-pipeline-core:jar:2.5.5, org.quartz-scheduler:quartz:jar:2.2.1, net.sf.ehcache:ehcache:jar:2.9.0, com.sun.mail:javax.mail:jar:1.5.1, javax.mail:javax.mail-api:jar:1.5.1, org.hibernate:hibernate-validator:jar:5.1.3.Final, org.hibernate:hibernate-ehcache:jar:4.3.10.Final, org.jboss.logging:jboss-logging:jar:3.1.0.GA, org.grails:grails-datastore-gorm-hibernate4:jar:3.1.5.RELEASE, org.liquibase:liquibase-core:jar:2.0.5, net.sf.ehcache:ehcache-core:jar:2.4.8, joda-time:joda-time:jar:2.4:
Could not transfer artifact cglib:cglib-nodep:jar:2.2.2 from/to mavenCentral (https://repo1.maven.org/maven2/): Forbidden (403) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: org.codehaus.groovy.modules.http-builder:http-builder:jar:0.5.2, de.odysseus.staxon:staxon:jar:1.2, mysql:mysql-connector-java:jar:5.1.43, org.javassist:javassist:jar:3.17.1-GA, org.mozilla:rhino:jar:1.7R4, com.bertramlabs.plugins:asset-pipeline-core:jar:2.5.5, org.quartz-scheduler:quartz:jar:2.2.1, net.sf.ehcache:ehcache:jar:2.9.0, com.sun.mail:javax.mail:jar:1.5.1, javax.mail:javax.mail-api:jar:1.5.1, org.hibernate:hibernate-validator:jar:5.1.3.Final, org.hibernate:hibernate-ehcache:jar:4.3.10.Final, org.jboss.logging:jboss-logging:jar:3.1.0.GA, org.grails:grails-datastore-gorm-hibernate4:jar:3.1.5.RELEASE, org.liquibase:liquibase-core:jar:2.0.5, net.sf.ehcache:ehcache-core:jar:2.4.8, joda-time:joda-time:jar:2.4:
Could not transfer artifact org.codehaus.groovy.modules.http-builder:http-builder:jar:0.5.2 from/to mavenCentral (https://repo1.maven.org/maven2/): Forbidden (403) (Use --stacktrace to see the full trace)
| Error Resolve error obtaining dependencies: The following artifacts could not be resolved: de.odysseus.staxon:staxon:jar:1.2, mysql:mysql-connector-java:jar:5.1.43, org.javassist:javassist:jar:3.17.1-GA, com.bertramlabs.plugins:asset-pipeline-core:jar:2.5.5, org.quartz-scheduler:quartz:jar:2.2.1, net.sf.ehcache:ehcache:jar:2.9.0, javax.mail:javax.mail-api:jar:1.5.1, net.sf.ehcache:ehcache-core:jar:2.4.8, joda-time:joda-time:jar:2.4:
Could not transfer artifact de.odysseus.staxon:staxon:jar:1.2 from/to mavenCentral (https://repo1.maven.org/maven2/): Forbidden (403) (Use --stacktrace to see the full trace)
| Error The following artifacts could not be resolved: org.apache.tomcat:tomcat-catalina-ant:jar:7.0.55, org.apache.tomcat.embed:tomcat-embed-jasper:jar:7.0.55, org.apache.tomcat.embed:tomcat-embed-logging-log4j:jar:7.0.55, org.apache.tomcat.embed:tomcat-embed-websocket:jar:7.0.55, org.eclipse.jdt.core.compiler:ecj:jar:3.7.2, org.apache.tomcat.embed:tomcat-embed-core:jar:7.0.55:
Could not transfer artifact org.apache.tomcat:tomcat-catalina-ant:jar:7.0.55 from/to mavenCentral (https://repo1.maven.org/maven2/): Forbidden (403)
| Run 'grails dependency-report' for further information.
关于发生的事情或如何修复,我没有任何线索.欢迎任何指针.
I don't have any clues on what is going on or how to fix it. Any pointers are welcome.
推荐答案
这似乎是Travis访问Maven Central时常发生的问题.参见 https://github.com/travis-ci/travis-ci/issues /6593 和 https://github.com/travis-ci /travis-ci/issues/10055
This seems to be a recurring issue with Travis accessing Maven Central. See https://github.com/travis-ci/travis-ci/issues/6593 and https://github.com/travis-ci/travis-ci/issues/10055
建议的解决方法是在.travis.yml
中使用sudo: true
.
The suggested workaround is to use sudo: true
in your .travis.yml
.
这篇关于Grails失败了Travis CI的依赖关系的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!