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

g8Test does not respect custom resolvers #650

Open
Jacoby6000 opened this issue Jan 20, 2022 · 1 comment
Open

g8Test does not respect custom resolvers #650

Jacoby6000 opened this issue Jan 20, 2022 · 1 comment

Comments

@Jacoby6000
Copy link

steps

sbt version: 1.5.5
g8 version: 0.14.0
Create a template with a dependency on a project not in a default maven/ivy resolver.
Create a .repositories file in the template, containing your custom resolver

problem

Executing sbt g8Test fails, if there is a dependency on a non-default repository within the project. It does not read the .repositories file and unresolved dependencies throw errors.

[info] [error] (update) sbt.librarymanagement.ResolveException: Error downloading com.acmeproduct.super:super-project;sbtVersion=1.0;scalaVersion=2.12:2.2.2
[info] [error]   Not found
[info] [error]   Not found
[info] [error]   not found: https://repo1.maven.org/maven2/com/acmeproduct/super/super-project_2.12_1.0/2.2.2/super-project-2.2.2.pom
[info] [error]   not found: /home/jbarber/.ivy2/local/com.acmeproduct.super/super-project/scala_2.12/sbt_1.0/2.2.2/ivys/ivy.xml
[info] [error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.acmeproduct.super/super-project/scala_2.12/sbt_1.0/2.2.2/ivys/ivy.xml
[info] [error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.acmeproduct.super/super-project/scala_2.12/sbt_1.0/2.2.2/ivys/ivy.xml
[info] [error] Error downloading com.acmeproduct.module:sbt-plugin-workflow;sbtVersion=1.0;scalaVersion=2.12:1.1.2
[info] [error]   Not found
[info] [error]   Not found
[info] [error]   not found: https://repo1.maven.org/maven2/com/acmeproduct/module/sbt-plugin-workflow_2.12_1.0/1.1.2/sbt-plugin-workflow-1.1.2.pom
[info] [error]   not found: /home/jbarber/.ivy2/local/com.acmeproduct.module/sbt-plugin-workflow/scala_2.12/sbt_1.0/1.1.2/ivys/ivy.xml
[info] [error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.acmeproduct.module/sbt-plugin-workflow/scala_2.12/sbt_1.0/1.1.2/ivys/ivy.xml
[info] [error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.acmeproduct.module/sbt-plugin-workflow/scala_2.12/sbt_1.0/1.1.2/ivys/ivy.xml
[info] [error] Error downloading com.acmeproduct.module:sbt-magic-plugin;sbtVersion=1.0;scalaVersion=2.12:1.2.1
[info] [error]   Not found
[info] [error]   Not found
[info] [error]   not found: https://repo1.maven.org/maven2/com/acmeproduct/module/sbt-magic-plugin_2.12_1.0/1.2.1/sbt-magic-plugin-1.2.1.pom
[info] [error]   not found: /home/jbarber/.ivy2/local/com.acmeproduct.module/sbt-magic-plugin/scala_2.12/sbt_1.0/1.2.1/ivys/ivy.xml
[info] [error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.acmeproduct.module/sbt-magic-plugin/scala_2.12/sbt_1.0/1.2.1/ivys/ivy.xml
[info] [error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.acmeproduct.module/sbt-magic-plugin/scala_2.12/sbt_1.0/1.2.1/ivys/ivy.xml
[info] [error] Error downloading com.acmeproduct.module:sbt-plugin-module;sbtVersion=1.0;scalaVersion=2.12:1.1.2
[info] [error]   Not found
[info] [error]   Not found
[info] [error]   not found: https://repo1.maven.org/maven2/com/acmeproduct/module/sbt-plugin-module_2.12_1.0/1.1.2/sbt-plugin-module-1.1.2.pom
[info] [error]   not found: /home/jbarber/.ivy2/local/com.acmeproduct.module/sbt-plugin-module/scala_2.12/sbt_1.0/1.1.2/ivys/ivy.xml
[info] [error]   not found: https://repo.scala-sbt.org/scalasbt/sbt-plugin-releases/com.acmeproduct.module/sbt-plugin-module/scala_2.12/sbt_1.0/1.1.2/ivys/ivy.xml
[info] [error]   not found: https://repo.typesafe.com/typesafe/ivy-releases/com.acmeproduct.module/sbt-plugin-module/scala_2.12/sbt_1.0/1.1.2/ivys/ivy.xml

expectation

The .repositories file should be read and the proper resolvers should be loaded.

notes

I don't think this is a problem with sbt-scripted. I have written sbt-plugins that use our custom resolvers and those seem to work

@TonioGela
Copy link
Member

Thanks for reporting. May I ask you if this happens with custom resolvers defined directly in the sbt build?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants