"configuration not public" on local test->test dependency if the same version has been resolved out of a public Maven repository
See original GitHub issueProblem
I saw this problem on stackoverflow too, but it didn’t seem like it had been solved, and I couldn’t find an issue, so I’m posting it here.
I’m trying to do development on twitter/util, but when I try to run update on util-collection, it tells me:
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: UNRESOLVED DEPENDENCIES ::
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn] :: com.twitter#util-core_2.10;6.23.0: configuration not public in com.twitter#util-core_2.10;6.23.0: 'test'. It was required from com.twitter#util-collection_2.10;6.23.0 test
[warn] ::::::::::::::::::::::::::::::::::::::::::::::
[warn]
[warn] Note: Unresolved dependencies path:
[warn] com.twitter:util-core_2.10:6.23.0
[warn] +- com.twitter:util-collection_2.10:6.23.0
[trace] Stack trace suppressed: run last util-collection/*:update for the full output.
[error] (util-collection/*:update) sbt.ResolveException: unresolved dependency: com.twitter#util-core_2.10;6.23.0: configuration not public in com.twitter#util-core_2.10;6.23.0: 'test'. It was required from com.twitter#util-collection_2.10;6.23.0 test
[error] Total time: 1 s, completed Jan 27, 2015 1:49:54 AM
I tried making a demo project to repro, and I found that I could only repro when I chose the same version, organization, and artifact name.
Issue Analytics
- State:
- Created 9 years ago
- Reactions:4
- Comments:23 (13 by maintainers)
Top Results From Across the Web
dependency resolution - Maven fails to find local artifact
The local Maven repo tracks where artifacts originally came from using a file named "_maven.repositories" in the artifact directory.
Read more >Maven Error: Failed to collect dependencies - When trying to ...
I am facing an issue when trying to execute any Maven supported scenarios from ... the local repository, resolution will not be reattempted...
Read more >Frequently Asked Technical Questions - Apache Maven
What is a Mojo? How to find dependencies on public Maven repositories? Why is my Javadoc JAR built twice during release?
Read more >Maven packages in the Package Registry - GitLab Docs
If multiple packages have the same name and version, when you install a package, the most recently-published package is retrieved.
Read more >Add build dependencies - Android Developers
Most app and test modules should use this configuration. api, Gradle adds the dependency to the compile classpath and build output. When a...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I’m running into this now as I’m trying to do
"compile->compile;test->test"
using a Maven style repository. It seems like when Maven’s"test"
scope is translated into an Ivy configuration, Ivy makes it a private one.https://github.com/sbt/ivy/blob/3cf31483b03e0ba294c76f5391dc7570b7649090/src/java/org/apache/ivy/plugins/parser/m2/PomModuleDescriptorBuilder.java#L92-L96:
Modifying Ivy to make that public may have other consequences like
update
trying to resolve normally-unnecessary test dependencies. Not sure.Here’s my current workaround:
This is pretty easy to run into when building Spark (fixed by
rm -rf ~/.ivy2/cache
):