title: Access maven repo over https in sbt
body: <p>I have a java project which uses sbt(scala) for build. Up until yesterday this was working, but today I am seeing an issue in pulling a repo from maven</p>
  
  <pre><code>esolving org.codehaus.plexus#plexus-component-api;1.0-alpha-16 ...
  
  [error] SERVER ERROR: HTTPS Required url=http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-component-api/1.0-alpha-16/plexus-component-api-1.0-alpha-16.pom
  
  [warn]  module not found: org.codehaus.plexus#plexus-component-api;1.0-alpha-16
  
  [warn] ==== typesafe-ivy-releases: tried
  
  [warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.codehaus.plexus/plexus-component-api/1.0-alpha-16/ivys/ivy.xml
  
  [warn] ==== sbt-plugin-releases: tried
  
  [warn]   http://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/org.codehaus.plexus/plexus-component-api/1.0-alpha-16/ivys/ivy.xml
  
  [warn] ==== local: tried
  
  [warn]   /root/.ivy2/local/org.codehaus.plexus/plexus-component-api/1.0-alpha-16/ivys/ivy.xml
  
  [warn] ==== activator-local: tried
  
  [warn]   file:/heimdall/app/projects/load-test/content-engine/repository/org.codehaus.plexus/plexus-component-api/1.0-alpha-16/ivys/ivy.xml
  
  [warn] ==== public: tried
  
  [warn]   http://repo1.maven.org/maven2/org/codehaus/plexus/plexus-component-api/1.0-alpha-16/plexus-component-api-1.0-alpha-16.pom
  
  [warn] ==== typesafe-releases: tried
  
  [warn]   http://repo.typesafe.com/typesafe/releases/org/codehaus/plexus/plexus-component-api/1.0-alpha-16/plexus-component-api-1.0-alpha-16.pom
  
  [warn] ==== typesafe-ivy-releasez: tried
  
  [warn]   http://repo.typesafe.com/typesafe/ivy-releases/org.codehaus.plexus/plexus-component-api/1.0-alpha-16/ivys/ivy.xml
  
  [warn] ==== Typesafe repository: tried
  
  [warn]   http://repo.typesafe.com/typesafe/releases/org/codehaus/plexus/plexus-component-api/1.0-alpha-16/plexus-component-api-1.0-alpha-16.pom
  </code></pre>
  
  <p>Based on what I could infer, the repo seems to have been moved to https endpoint. And pom file is available on https endpoint. The issue is that this is not a direct dependency in my project but coming transitively via some other dependency. How do I use https for this specific dependency?</p>
  
  <p>I am using sbt version 0.13.5. I checked the <a href="https://www.scala-sbt.org/0.13/docs/Resolvers.html" rel="noreferrer">reference manual</a> for it, and added <strong>DefaultMavenRepository</strong> explicitly in build.sbt</p>
  
  <pre><code>resolvers += DefaultMavenRepository
  </code></pre>
  
  <p>As per this official documentation, the DefaultMavenRepository points to secure endpoint. Before this, I had tried the following in build.sbt</p>
  
  <pre><code>resolvers += "Maven Repo" at  "https://repo1.maven.org/maven2/" 
  </code></pre>
  
  <p>and added </p>
  
  <pre><code>"org.codehaus.plexus" % "plexus-component-api" % "1.0-alpha-16", 
  </code></pre>
  
  <p>as libraryDepdency explicitly in my build.sbt so that it can be cached and not come transitively where I may not have control over where it would be pulled from. But this also fails. I cleared both m2 and ivy2 caches</p>