簡體   English   中英

travis-ci與bintray依賴關系的工作

[英]travis-ci job with bintray dependencies

我的travis構建作業經常失敗,因為它無法解決我對bintray的工件的依賴性。

它只是說: 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 ,即使我將bintray添加到pom中的我的repositories中。

如果依賴項都在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一樣添加它們。

暫無
暫無

聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.

 
粵ICP備18138465號  © 2020-2024 STACKOOM.COM