Skip to content

Commit

Permalink
add mirror config doc (#2917)
Browse files Browse the repository at this point in the history
Add mirror config file documentation.

Pull request: #2917

---------
Co-authored-by: Tobias Roeser <le.petit.fou@web.de>
  • Loading branch information
jilen authored Dec 12, 2023
1 parent ea367c0 commit b7e54ab
Showing 1 changed file with 20 additions and 2 deletions.
22 changes: 20 additions & 2 deletions example/scalamodule/11-repository-config/build.sc
Original file line number Diff line number Diff line change
Expand Up @@ -17,12 +17,30 @@ object foo extends ScalaModule {
}
}

// Mill read https://get-coursier.io/[coursier] config files automatically.
//
// It is possible to setup mirror with `mirror.properties`
// [source,properties]
// ----
// central.from=https://repo1.maven.org/maven2
// central.to=http://example.com:8080/nexus/content/groups/public
// ----
//
// Note theses default config file locatations:
//
// * Linux: `~/.config/coursier/mirror.properties`
// * MacOS: `~/Library/Preferences/Coursier/mirror.properties`
// * Windows: `C:\Users\<user_name>\AppData\Roaming\Coursier\config\mirror.properties`
//
// You can also set the environment variable `COURSIER_MIRRORS` or the jvm property `coursier.mirrors` to specify config file location.


// To add custom resolvers to the initial bootstrap of the build, you can create a
// custom `ZincWorkerModule`, and override the `zincWorker` method in your
// `ScalaModule` by pointing it to that custom object:

object CustomZincWorkerModule extends ZincWorkerModule with CoursierModule {
def repositoriesTask() = T.task { super.repositoriesTask() ++ sonatypeReleases }
def repositoriesTask = T.task { super.repositoriesTask() ++ sonatypeReleases }
}

object bar extends ScalaModule {
Expand All @@ -37,4 +55,4 @@ object bar extends ScalaModule {
> ./mill bar.compile
*/
*/

0 comments on commit b7e54ab

Please sign in to comment.