Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merge new changes #807

Merged
merged 3 commits into from
Sep 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -56,19 +56,29 @@ public static String getAgentJarPath(){

private static boolean isAgentJar(String path) throws IllegalArgumentException{

if(path.endsWith("classes")){
/*
we need to treat this specially:
eg, Jenkins/Maven on Linux on a module with only tests ended up
with not creating "target/classes" (it does on Mac though) but still putting
it on the classpath
*/
return false;
}
// if(path.endsWith("classes")){
// /*
// we need to treat this specially:
// eg, Jenkins/Maven on Linux on a module with only tests ended up
// with not creating "target/classes" (it does on Mac though) but still putting
// it on the classpath
// */
// return false;
// }

File file = new File(path);
if(!file.exists()){
throw new IllegalArgumentException("Non-existing file "+path);
//throw new IllegalArgumentException("Non-existing file "+path);

/*
quite tricky, not only the case of "classes" discussed above, but also so same
kind of issue with Gradle and IntelliJ, eg with build\resources\main being
put on classpath even if it does not exist.
looks like there are way too many cases here to handle adhoc, so let's just issue a log
instead of crashing
*/
SimpleLogger.error("Entry on classpath does NOT exist: " + path);
return false;
}

String name = file.getName();
Expand Down
Loading
Loading