Skip to content
Permalink
Browse files

Merge pull request #3420 from jglick/gradle-plugin-under-test-JENKINS…

…-51062

[JENKINS-51062] Extend ClassFilterImpl.isLocationWhitelisted Maven-oriented exclusions to plugin under test during Gradle builds
  • Loading branch information
oleg-nenashev committed May 4, 2018
2 parents d1eaafb + b14ba46 commit a4a1355f518f282d1f8f73a640b71aae3680f2a6
Showing with 2 additions and 2 deletions.
  1. +2 −2 core/src/main/java/jenkins/security/ClassFilterImpl.java
@@ -229,12 +229,12 @@ private boolean isLocationWhitelisted(String _loc) {
LOGGER.log(Level.WARNING, "problem checking " + loc, x);
}
}
if (loc.endsWith("/target/classes/")) {
if (loc.endsWith("/target/classes/") || loc.matches(".+/build/classes/[^/]+/main/")) {
LOGGER.log(Level.FINE, "{0} seems to be current plugin classes, OK", loc);
return true;
}
if (Main.isUnitTest) {
if (loc.endsWith("/target/test-classes/") || loc.endsWith("-tests.jar")) {
if (loc.endsWith("/target/test-classes/") || loc.endsWith("-tests.jar") || loc.matches(".+/build/classes/[^/]+/test/")) {
LOGGER.log(Level.FINE, "{0} seems to be test classes, OK", loc);
return true;
}

0 comments on commit a4a1355

Please sign in to comment.