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

mill does not honor the custom repositories at global scale #246

Closed
shengc opened this issue Mar 19, 2018 · 4 comments
Closed

mill does not honor the custom repositories at global scale #246

shengc opened this issue Mar 19, 2018 · 4 comments
Labels
solved The issue was fixed/resolved
Milestone

Comments

@shengc
Copy link
Contributor

shengc commented Mar 19, 2018

in sbt, I can override the default repositories by setting

-Dsbt.override.build.repos=true -Dsbt.repository.config=...

so I can pass in a list of custom repositories for the entire build.

For mill, although documentation suggests one can override the repositories through the repositories task, the initial dependencies needed to boostrap the build are still resolved through the default repositories.

[19/26] readapi.compileClasspath
3 targets failed
mill.scalalib.ScalaWorkerModule.classpath
Resolution failed for 1 modules:
--------------------------------------------
  com.lihaoyi:mill-scalaworker_2.12:0.1.6
        not found: /Users/shengc/.ivy2/local/com.lihaoyi/mill-scalaworker_2.12/0.1.6/ivys/ivy.xml
        download error: Caught java.net.UnknownHostException: repo1.maven.org (repo1.maven.org) while downloading https://repo1.maven.org/maven2/com/lihaoyi/mill-scalaworker_2.12/0.1.6/mill-scalaworker_2.12-0.1.6.pom

mill.scalalib.ScalaWorkerModule.compilerInterfaceClasspath
Resolution failed for 1 modules:
--------------------------------------------
  org.scala-sbt:compiler-interface:1.1.0
        not found: /Users/shengc/.ivy2/local/org.scala-sbt/compiler-interface/1.1.0/ivys/ivy.xml
        download error: Caught java.net.UnknownHostException: repo1.maven.org (repo1.maven.org) while downloading https://repo1.maven.org/maven2/org/scala-sbt/compiler-interface/1.1.0/compiler-interface-1.1.0.pom

I am behind a proxy, so in order to adopt mill for my work, I need a way to configure the repositories globally just like sbt does.

@lihaoyi
Copy link
Member

lihaoyi commented Mar 19, 2018

@shengc can you try following the instructions here? That should let it work, and if it works for you help me add it to the documentation somewhere :)

@lihaoyi lihaoyi closed this as completed Mar 19, 2018
@shengc
Copy link
Contributor Author

shengc commented Mar 19, 2018

@lihaoyi yep that works. I can send a PR to update Readme.md after hours.

@shengc
Copy link
Contributor Author

shengc commented Mar 19, 2018

@lihaoyi for import $ivy, the custom repositories still does not work. The following can download the dependencies

interp.repositories() ++= Seq(...)
interp.load.ivy(...)

However, the downloaded dependencies are not added to the build.

shengc pushed a commit to shengc/mill that referenced this issue Mar 20, 2018
lihaoyi pushed a commit that referenced this issue Mar 20, 2018
@shengc
Copy link
Contributor Author

shengc commented Mar 20, 2018

@lihaoyi if I pass in the revolvers through --predef to mill, then import $ivy... works. Is there any initialization misconfiguration lurked in the code ?

lihaoyi pushed a commit that referenced this issue Mar 27, 2018
* doc to address #187 and #246

* add exclusions and custom configuration to dependencies and tests
@lefou lefou added this to the 0.1.7 milestone May 3, 2019
@lefou lefou added the solved The issue was fixed/resolved label Jul 3, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
solved The issue was fixed/resolved
Projects
None yet
Development

No branches or pull requests

3 participants