Replies: 7 comments 1 reply
-
Is there a sample dependency we could try this with? |
Beta Was this translation helpful? Give feedback.
-
Because the maven.pkg.github.com is private resolver and it is github package, so the dependency jar is from another project under our company. I am aware of that all the dependency jar will cached to the same directory by old cache strategy(ivy2), but for couriser it will split to different directory, such as (maven.pkg.github.com / repo1.maven.org / ...). So I found the dependency classes cannot be found under the directory named maven.pkg.github.com. And as I said ,I am confused that copy the dependency jar to the repo1.maven.org directory, it can work. |
Beta Was this translation helpful? Give feedback.
-
Is |
Beta Was this translation helpful? Give feedback.
-
Yes |
Beta Was this translation helpful? Give feedback.
-
That is a sample: "com.companyname" % "business-client-java11" % "1.55.6", other dependencies will be cached to ~/Library/Caches/Coursier/v1/https/repo1.maven.org You know the order of downloading dependencies is repo1.maven.org, and then from https/maven.pkg.github.com. I checked the dependencyClasspath, business-client-java11 is included. |
Beta Was this translation helpful? Give feedback.
-
You might run sbt with |
Beta Was this translation helpful? Give feedback.
-
I'm going to convert this to a discussion, as we don't yet have a way of reproducing this on anyone's computer but yours, and we don't have yet clear evidence that the root cause is a bug in sbt. |
Beta Was this translation helpful? Give feedback.
-
steps
1.Add new resolver such as
2.Add the dependency like this
problem
When I run
sbt compile
the dependency jar from that repo can be download successfully, but finally it will be failed and it will pop this error: object xxx is not memeber of the package...... I am sure the class(com.xxx.AuditEvent) is under the dependency jar.Error Info:
note
sbt is 1.9.8 and scala 2.12
Workaround
If I copy the dependency jar from
Users/ethan/Library/Caches/Coursier/v1/https/maven.pkg.github.com/com/xxx/1.0.6/xxx.jar
to
Users/ethan/Library/Caches/Coursier/v1/https/repo1.maven.org/com/xxx/1.0.6/xxx.jar
It can work well, so I guess that , sbt can add the jars from https/repo1.maven.org(default resolver) to classpath but can not add the new resolver repo such as
maven.pkg.github.com(private resolver)
to the classpath.Beta Was this translation helpful? Give feedback.
All reactions