Skip to content

Commit

Permalink
com-lihaoyi#2673 doc - use maven through corporate proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Quafadas committed Aug 4, 2023
1 parent ddf0ad7 commit 8456b13
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
4 changes: 3 additions & 1 deletion CONTRIBUTING.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,6 @@ Here are some direct links:
* {link-github}/discussions[Discussion Forum on GitHub] - A place to ask question and discuss all kind of questions around Mill
* {link-github}/issues[Issue Tracker on GitHub] - Our issue tracker for bugs and features
* {link-github}/pulls[Pull Requests on GitHub] - All new features and bug fixes find their way into Mill via a pull request. You can also sketch new ideas by creating a draft pull requests.
{link-gitter}[Gitter Chat (Element)] - You can also join our chat room if you like more direct communication or to just say hello
{link-gitter}[Gitter Chat (Element)] - You can also join our chat room if you like more direct communication or to just say hello
To build docs locally, `mill docs.localPages`. The last line of the command tells you where to browse the generated pages. From there you can follow the breadcrumbs.
24 changes: 24 additions & 0 deletions docs/modules/ROOT/pages/Scala_Module_Config.adoc
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,30 @@ include::example/scalamodule/10-assembly-config.adoc[]

include::example/scalamodule/11-repository-config.adoc[]

== Maven Central: Blocked!

Under some circumstances (e.g. corporate firewalls), you may not have access maven central. The typical symptom will be error messages which look like this;

----
1 targets failed
mill.scalalib.ZincWorkerModule.classpath
Resolution failed for 1 modules:
--------------------------------------------
com.lihaoyi:mill-scalalib-worker_2.13:0.11.1
not found: C:\Users\partens\.ivy2\local\com.lihaoyi\mill-scalalib-worker_2.13\0.11.1\ivys\ivy.xml
download error: Caught java.io.IOException (Server returned HTTP response code: 503 for URL: https://repo1.maven.org/maven2/com/lihaoyi/mill-scalalib-worker_2.13/0.11.1/mill-scalalib-worker_2.13-0.11.1.pom) while downloading https://repo1.maven.org/maven2/com/lihaoyi/mill-scalalib-worker_2.13/0.11.1/mill-scalalib-worker_2.13-0.11.1.pom
----
It is expected that basic commands (e.g. clean) will not work, as Mill saying it is unable to resolve it's own, fundamental, dependancies. Under such circumstances, you will normally have access to some proxy, or other corporate repository which resolves maven artefacts. The strategy is simply to tell mill to use that instead.
The idea is to set an environment variable COURSIER_REPOSITORIES (see coursier docs). The below command should set the environment variable for the current shell, and then run the mill command.
----
COURSIER_REPOSITORIES=https://packages.corp.com/artifactory/maven/ mill resolve _
----
If you are using millw, a more permanent solution could be to set the environment variable at the top of the millw script, or as a user environment variable etc.
== Backticked Names
include::example/scalamodule/12-backticked-names.adoc[]
Expand Down

0 comments on commit 8456b13

Please sign in to comment.