0

This my build script

plugins {
id 'java'
id 'maven-publish'
}

repositories {
   mavenCentral()
}

dependencies {
implementation 'org.springframework.boot:spring-boot-starter-data-solr:2.2.6.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-web:2.2.6.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter-websocket:2.2.6.RELEASE'
implementation 'com.okta.spring:okta-spring-boot-starter:1.4.0'
implementation 'org.springframework.boot:spring-boot-starter-log4j2:2.2.6.RELEASE'
implementation 'org.springframework.boot:spring-boot-starter:2.2.6.RELEASE'
implementation 'org.janusgraph:janusgraph-core:0.5.1'
implementation 'org.janusgraph:janusgraph-cassandra:0.5.1'
implementation 'org.janusgraph:janusgraph-cql:0.5.1'
implementation 'io.dropwizard.metrics:metrics-core:3.2.2'
implementation 'org.janusgraph:janusgraph-solr:0.5.1'
implementation 'org.apache.solr:solr-solrj:7.7.3'
implementation 'org.projectlombok:lombok:1.18.12'
testImplementation 'org.springframework.boot:spring-boot-starter-test:2.2.6.RELEASE'
testImplementation 'org.assertj:assertj-core:3.16.0'
testImplementation 'org.testcontainers:testcontainers:1.14.1'
}

When I run 'gradle buld' I get error:

Execution failed for task ':compileJava'.
> Could not resolve all files for configuration ':compileClasspath'.
   > Could not resolve io.dropwizard.metrics:metrics-graphite:3.2.2.
     Required by:
         project : > org.janusgraph:janusgraph-core:0.5.1
      > Could not resolve io.dropwizard.metrics:metrics-graphite:3.2.2.
         > Could not get resource 'http://repo.maven.apache.org/maven2/io/dropwizard/metrics/metrics-graphite/3.2.2/metrics-graphite-3.2.2.pom'.
            > Could not HEAD 'http://repo.maven.apache.org/maven2/io/dropwizard/metrics/metrics-graphite/3.2.2/metrics-graphite-3.2.2.pom'. Received status code 501 from server: HTTPS Required

What am I doing wrong here?

positron
  • 3,643
  • 3
  • 22
  • 26
  • You are probably using an old version of Gradle that does not use the HTTPS endpoint for Maven Central. See [this question](https://stackoverflow.com/questions/59763531/maven-dependencies-are-failing-with-a-501-error) for how to get around the problem (even though the question is for Maven, there are answers for Gradle too). – Bjørn Vester Jun 04 '20 at 07:46
  • Thanks @BjørnVester. I added repos as suggested in https://stackoverflow.com/a/59920494/409225, but the issue still persists. I am running Gradle 6.4.1. – positron Jun 04 '20 at 13:43

0 Answers0