yesamer commented on code in PR #3881:
URL:
https://github.com/apache/incubator-kie-kogito-runtimes/pull/3881#discussion_r2030946465
##########
kogito-maven-plugin/src/main/java/org/kie/kogito/maven/plugin/util/MojoUtil.java:
##########
@@ -107,6 +107,25 @@ private static KieModuleModel getDependencyKieModel(final
File jar) throws IOExc
return null;
}
+ public static boolean hasClassOnClasspath(final MavenProject project,
String className) {
+ try {
+ Set<Artifact> elements = project.getArtifacts();
+ URL[] urls = new URL[elements.size()];
+
+ int i = 0;
+ for (Artifact artifact : elements) {
+ urls[i] = artifact.getFile().toURI().toURL();
+ i++;
+ }
+ try (URLClassLoader cl = new URLClassLoader(urls)) {
Review Comment:
@gitgabrio Done
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]