a simple proxy resolver created with the intention of being used with scala-cli, which does not support custom resolver protocols
Note this proxy resolver does not allow publishing artifacts
using scala-cli directly
scala-cli ProxyResolver.scalawith docker
scala-cli --power package --docker ProxyResolver.scala --docker-image-repository s3-proxy-resolver
docker run --rm -it -v /path/to/.s3credentials:/root/.s3credentials -p 8080:8080 s3-proxy-resolverand then resolver can be added to your scala-cli script
//> using repository http://localhost:8080/some-bucket
//> using repository http://localhost:8080/some-other-bucket
//> using lib "org.example::lib-from-custom-resolver:0.0.1"
credentials can be provided as environment variables
AWS_ACCESS_KEY_IDAWS_SECRET_ACCESS_KEYAWS_DEFAULT_REGION(optional, defaultEU_CENTRAL_1)
or the script will look for files in the following locations:
- current working directory
- user home directory
.sbtdirectory in user home directory.coursierdirectory in user home directory
the credential file name should be in one of two forms:
.s3credentials.some-bucket-name_s3credentials
example credentials file content:
accessKey = XXXXXXX
secretKey = abcdefgh
# optional region
region = EU_CENTRAL_1PROXY_SERVER_PORT (default 8080)