Wenn die Abhängigkeiten sind alle in JCenter, fügen Sie eine Datei .travis.settings.xml
enthält:
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>
und fügen Sie die folgende Zeile in .travis.yml
:
install: mvn install -DskipTests=true -Dmaven.javadoc.skip=true --batch-mode --show-version --settings .travis.settings.xml
Wenn Sie auch Plug-ins benötigen oder Abhängigkeiten von anderen Repositories, fügen Sie sie genauso wie in Ihrem lokalen settings.xml
hinzu.