0

I am getting an error while building a scala project with intelIJ on a Mac machine.

sbt --version

sbt version in this project: 1.3.8
sbt script version: 1.3.

Below is the error I am getting in the IDE and bunch of packages are not downloaded.

[info] Resolving com.typesafe.play#sbt-plugin;2.3.8 ...
[info] Resolving com.typesafe.play#routes-compiler_2.10;2.3.8 ...
[info] Resolving org.scala-lang#scala-library;2.10.4 ...
[info] Resolving commons-io#commons-io;2.0.1 ...
[error] SERVER ERROR: HTTPS Required url=http://repo1.maven.org/maven2/commons-io/commons-io/2.0.1/commons-io-2.0.1.pom

Iam not sure where the http url is picked up, on searching i got a command to list the resolvers for sbt and it does show https

sbt:root-0-13> show externalResolvers
[info] * FileRepository(local, Patterns(ivyPatterns=Vector(${ivy.home}/local/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)([branch]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), artifactPatterns=Vector(${ivy.home}/local/[organisation]/[module]/(scala_[scalaVersion]/)(sbt_[sbtVersion]/)([branch]/)[revision]/[type]s/[artifact](-[classifier]).[ext]), isMavenCompatible=false, descriptorOptional=false, skipConsistencyCheck=false), FileConfiguration(true, None))
[info] * public: https://repo1.maven.org/maven2/

Can someone share some info on how to resolve this error ?

user3279954
  • 556
  • 2
  • 7
  • 22
  • What's the output of `show resolvers`? – cbley Mar 18 '20 at 07:08
  • `sbt:v2> show resolvers [info] *` This is what i see with resolvers – user3279954 Mar 19 '20 at 19:48
  • 1
    Oh, you are using a really old Play version which probably adds those resolvers to the project build. What's inside your .sbt files in `project`? Maybe this could work: https://stackoverflow.com/a/60157744/4432837 – cbley Mar 20 '20 at 09:05
  • https://stackoverflow.com/questions/59763435/access-maven-repo-over-https-in-sbt#comment106274751_60079797 This one helped for me. didnt have ~/.sbt/repositories file, Added maven-central as mentioned there and it worked – user3279954 Mar 27 '20 at 00:58
  • Thanks @cbley for helping out !! – user3279954 Mar 27 '20 at 00:59

0 Answers0