Replies: 1 comment
-
The main JARs are already put in the class path with a higher priority than the source ones: @ import $ivy.`com.github.oshi:oshi-core:6.1.5`
@ Thread.currentThread().getContextClassLoader.getResource("oshi.properties")
res14: java.net.URL = jar:file:/home/alexandre/.cache/coursier/v1/https/repo1.maven.org/maven2/com/github/oshi/oshi-core/6.1.5/oshi-core-6.1.5.jar!/oshi.properties
@ Thread.currentThread().getContextClassLoader.getResources("oshi.properties").asScala.toVector
res17: Vector[java.net.URL] = Vector(
jar:file:/home/alexandre/.cache/coursier/v1/https/repo1.maven.org/maven2/com/github/oshi/oshi-core/6.1.5/oshi-core-6.1.5.jar!/oshi.properties,
jar:file:/home/alexandre/.cache/coursier/v1/https/repo1.maven.org/maven2/com/github/oshi/oshi-core/6.1.5/oshi-core-6.1.5-sources.jar!/oshi.properties
) So libraries reading resources should already be able to pick the main resource file. That said, I'd prefer to keep the sources apart too. I don't recall what would be needed for that... |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
I encountered a oshi/oshi#1995 where it would fail to load the oshi.properties from the class loader if getResources returns more than one resource.
I was a little surprised to see that the source JAR was included in the search path. Perhaps it would make more sense for Ammonite to only search the source JAR if the resource is not found in the main JAR?
Beta Was this translation helpful? Give feedback.
All reactions