Thursday, June 21, 2018

Gradle and Nexus

download Gradle binaries

mkdir /home/centos/gradle
unzip -d /home/centos/gradle/ gradle-4.8-bin.zip
export PATH=$PATH:/home/centos/gradle/gradle-4.8/bin/
gradle -version
cd gitclones/
git clone https://github.com/buzdin/allure-junit5-course

cd allure-junit5-course/

vi build.gradle

replace

repositories {
jcenter()
}

with

repositories {
maven {
url "http://localhost:8181/repository/maven-public/"
}
}


if your "group" maven-public repository points only to Maven Central, the build will fail

rm -rf .gradle/
gradle build --refresh-dependencies --debug



> Could not resolve all artifacts for configuration ':classpath'.
> Could not find io.qameta.allure:allure-gradle:2.4.
Searched in the following locations:
- http://localhost:8181/repository/maven-public/io/qameta/allure/allure-gradle/2.4/allure-gradle-2.4.pom
- http://localhost:8181/repository/maven-public/io/qameta/allure/allure-gradle/2.4/allure-gradle-2.4.jar
Required by:
project :


If you add to the group also a Proxy Repo "jcenter" pointing to https://jcenter.bintray.com/, everything works





No comments: