When used in gradle plugin, it throws Unable to load class 'io.github.classgraph.ClassGraph'
See original GitHub issueHi,
I’m using the ClassGraph library inside a custom gradle plugin: https://github.com/RoRoche/plantuml-gradle-plugin/tree/feature/using_classgraph
It’s OK during unit testing and while releasing into local Maven and used in another project.
But since it has been released to gradle plugin portal (https://plugins.gradle.org/plugin/com.github.roroche.plantuml), when using inside another project (https://github.com/RoRoche/eo-plantuml-builder), when running my buildClassDiagram
task, it throws
* What went wrong:
Execution failed for task ':buildClassDiagram'.
> Lio/github/classgraph/ClassGraph;
Any idea of what’s going wrong? Gradle plugin packaging?
Issue Analytics
- State:
- Created 3 years ago
- Comments:17 (6 by maintainers)
Top Results From Across the Web
Custom gradle plugin throws Unable to load class 'io.github ...
Seeing stacktrace, it seems that plantuml doesn't have access to ClassGraph, classpath problem ? Maybe issue on reflection use or initialization ...
Read more >Custom gradle plugin throws Unable to load ... - Gradle Forums
I'm using the ClassGraph library inside a custom gradle plugin: https://github.com/RoRoche/plantuml-gradle-plugin It's OK during unit ...
Read more >nonapi/io/github/classgraph/utils/FileUtils$3 · Issue #331
The order in which classloaders should be asked to load classes seems to be very different depending on what the exact runtime environment...
Read more >Error while running mvn test target: java.lang ... - GitHub
We're using maven-surefire-plugin v.2.22.2 . Having had a quick look, it does appear that io.github.classgraph.ClassGraph.rejectPackages still exists ...
Read more >OOM while loading classpath with large JAR files #338 - GitHub
I managed to write a plugin for Gradle and get all JARs associated with a project once build is finished, and then call...
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 FreeTop 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
Top GitHub Comments
That can be obtained with:
https://docs.gradle.org/current/userguide/java_plugin.html#sec:java_plugin_and_dependency_management https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#N14F9E https://docs.gradle.org/current/dsl/org.gradle.api.artifacts.Configuration.html
Glad you solved it, @RoRoche!
Thanks for all the help, @thc202! I really don’t know anything about Gradle, so couldn’t have come up with the solution easily. Not many community members jump in on bug reports – I’m curious how you saw this bug and decided to help resolve the issue?