我的travis build job经常失败,因为它不能解析我对二进制托盘中工件的依赖。
它只是简单地说:Failed to execute goal on project deployer: Could not resolve dependencies for project com.github.t1:deployer:war:2.2.0-SNAPSHOT: The following artifacts could not be resolved: com.github.t1:test-tools:jar:1.1.1,即使我在pom中将bintray添加到我的repositories中。
发布于 2016-08-09 16:49:31
如果依赖项都在JCenter中,则添加一个包含以下内容的文件.travis.settings.xml:
xml <?xml version="1.0" encoding="UTF-8" ?> <settings xsi:schemaLocation='http://maven.apache.org/SETTINGS/1.0.0 http://maven.apache.org/xsd/settings-1.0.0.xsd' xmlns='http://maven.apache.org/SETTINGS/1.0.0' xmlns:xsi='http://www.w3.org/2001/XMLSchema-instance'> <profiles> <profile> <id>bintray</id> <repositories> <repository> <id>central</id> <name>bintray</name> <url>http://jcenter.bintray.com</url> <snapshots> <enabled>false</enabled> </snapshots> </repository> </repositories> </profile> </profiles> <activeProfiles> <activeProfile>bintray</activeProfile> </activeProfiles> </settings>
并将以下行添加到您的.travis.yml
install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version --settings .travis.settings.xml
如果您还需要来自其他存储库的插件或依赖项,请像在本地settings.xml中一样添加它们。
https://stackoverflow.com/questions/38845968
复制相似问题