Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Cannot add a repository #457

ivlis opened this issue Nov 15, 2019 · 1 comment

Cannot add a repository #457

ivlis opened this issue Nov 15, 2019 · 1 comment


Copy link

@ivlis ivlis commented Nov 15, 2019

From the docs (

interp.repositories() ++= Seq(MavenRepository(
  authentication = Some(Authentication("user", "pass"))

This fails with value ++= is not a member of List[coursierapi.Repository]
  Expression does not convert to assignment because:
    not found: value MavenRepository
    not found: value authentication
    expansion: {
  <synthetic> val ev$1: ammonite.util.Ref[List[coursierapi.Repository]] = ammonite.interp.api.InterpBridge.value.repositories;
  ev$1.update(ev$1.apply().++(Seq(<MavenRepository: error>("", <authentication: error> = Some(Authentication("user", "pass"))))))
val res6 = interp.repositories() ++= Seq(MavenRepository(
                                 ^Compilation Failed
Compilation Failed

Importing from coursier:

import coursier.MavenRepository

fails as well object MavenRepository is not a member of package coursier
possible cause: maybe a semicolon is missing before `object MavenRepository'?
import coursier.MavenRepository
       ^Compilation Failed
Compilation Failed

What am I missing?


This comment has been minimized.

Copy link

@sbrunk sbrunk commented Nov 26, 2019

@ivlis the cursier API has changed and it's not reflected in the docs yet. The following should work:

import coursierapi.Credentials
import coursierapi.MavenRepository

interp.repositories() ++= Seq(
    .withCredentials(Credentials.of("user", "pass"))
@sbrunk sbrunk added the doc label Nov 26, 2019
sbrunk added a commit to sbrunk/almond that referenced this issue Nov 26, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
None yet
2 participants
You can’t perform that action at this time.