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

Resolving meta-build without maven access in 0.11+? #2673

Closed
Quafadas opened this issue Jul 25, 2023 · 3 comments
Closed

Resolving meta-build without maven access in 0.11+? #2673

Quafadas opened this issue Jul 25, 2023 · 3 comments

Comments

@Quafadas
Copy link
Contributor

Up to mill 0.10.0, I believe it was possible to setup "predef" scripts. If I'm honest, I was a little hazy on exactly which one was used, but as far as I can tell, the presence of (one of?) these two files

C:\Users\partens\.mill\ammonite\predef.sc
C:\Users\partens\.mill\ammonite\predefScript.sc

which (both!) have content

import coursierapi.MavenRepository

interp.repositories() = List(  
  MavenRepository.of("https://packages.corp.com/artifactory/maven/"),
  MavenRepository.of("https://packages.corp.com/artifactory/maven-jitpack-remote/")
)

etc, appeared to configure mill to forget about the public maven instance (which I can't use, sadly), and hit up the corporate repository for resolving it's worker modules. This worked in the 0.10 series.

I have been unable to find a replacement for this functionality in the mill 0.11 series. It was suggested to open an issue following a short discussion on matrix (@lefou).

I've followed the CustomZincWorker instructions in the docs as best I am able. From what I've managed to glean, that CustomWorkerModule will kick in, if we were able to jump the hurdle of mill has resolving it's own meta build...

@Quafadas
Copy link
Contributor Author

Quafadas commented Jul 26, 2023

A solution was proposed by @chikei on matrix. Adding this at the beginning of the millw script,
set "COURSIER_REPOSITORIES=https://packages.corp.com/artifactory/maven/"

Successfully resolved the initial bootstrap part of the build. I'm unclear whether it's "canonical", but it works and I'm running with it!

On that basis, I'm happy to close this issue? @lefou - would you like a docs PR to the repositories section of the docs?

@lihaoyi
Copy link
Member

lihaoyi commented Jul 26, 2023

Hey! Yes that is the expected solution, at least that's what I tested to work as a replacement before we rolled out 0.11.0.

We must have overlooked putting it in the migration documentation. Please send a PR if you can :)

@lefou
Copy link
Member

lefou commented Jul 26, 2023

You should also be able to set the environment variable from the cli.

$ COURSIER_REPOSITORIES=https://packages.corp.com/artifactory/maven/ mill resolve _

Quafadas added a commit to Quafadas/mill that referenced this issue Aug 4, 2023
lihaoyi pushed a commit that referenced this issue Aug 8, 2023
As promised, a small contribution to documentation.
@lihaoyi lihaoyi closed this as completed Aug 9, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants