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

libraryDependencies += dependency from "some url" not working with sbt version 1.4.5 #6293

Open
logicpluscode opened this issue Feb 3, 2021 · 3 comments

Comments

@logicpluscode
Copy link

logicpluscode commented Feb 3, 2021

[Simplified example]
https://github.com/logicpluscode/ReproduceSbtFetchDependencyIssue

[DESCRIPTION]

This is a simplified example to reproduce below problem statement :-
libraryDependencies += "dependency" from "some url"
successfully downloads dependency if sbt.version is 1.2.8 in project/build.properties,
but dependency is not downloaded, if sbt.version is 1.4.5 in project/build.properties.


[STEPS]

Step 1] simplified jar is required, that can be fetched from a http url.

Step 2] one sbt project build.sbt is required with dependency on above simplified jar

libraryDependencies += "dependency" from "url of simplified jar"


[PROJECT]

Step 1 :-
There is a multi-module sbt project DependencyAndService with
first module Dependency from which sample jar will be created, and
second module Service, that will be used to serve jar over http.

sbt clean compile run
from DependencyAndService directory will create sample dependency
and start service to serve jar over http.

Step 2 :-
load SbtFromDependency sbt project in intelllij and verify that
"example" % "dependency" % "0.0.1" is not there in External libraries

image

Now, modify sbt.version to 1.2.8 in SbtFromDependency/project/build.properties and verify that
"example" % "dependency" % "0.0.1" is there in External libraries

image

@logicpluscode logicpluscode changed the title libraryDependencies += sbt from "some url" not working with sbt version 1.4.5 libraryDependencies += dependency from "some url" not working with sbt version 1.4.5 Feb 3, 2021
@eed3si9n
Copy link
Member

eed3si9n commented Feb 6, 2021

@logicpluscode Thanks for the report and repro project. Could you also report this to coursier/coursier since it looks like a dependency resolution problem on the Coursier side, and I don't know if there's much we can do on sbt's side beyond suggesting maybe you do useCoursier := false for the affected subprojects.

Also this is possibly a duplicate of #5418

@bpossolo
Copy link

just wanted to voice that coursier has lots of problems so the useCoursier := false feature is very helpful

@rkq5411
Copy link

rkq5411 commented Oct 28, 2022

useCoursier := false
Helps to resolve the issue, though build is slow, tested for sbt version 1.5.5.

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

No branches or pull requests

4 participants