Skip to content

Commit e96b556

Browse files
retauschindler
andauthored
Upgrade forbiddenapis to 3.5.1 (#6840) (#6898)
* Upgrade forbiddenapis to 3.5 Signed-off-by: Uwe Schindler <[email protected]> * Update to forbiddenapis 3.5.1 and change regex for missing classes Signed-off-by: Uwe Schindler <[email protected]> --------- Signed-off-by: Uwe Schindler <[email protected]> (cherry picked from commit 37b37c5) Co-authored-by: Uwe Schindler <[email protected]>
1 parent b46ecbc commit e96b556

File tree

4 files changed

+4
-7
lines changed

4 files changed

+4
-7
lines changed

buildSrc/build.gradle

+1-1
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ dependencies {
114114
api 'gradle.plugin.com.github.johnrengelman:shadow:7.1.2'
115115
api 'org.jdom:jdom2:2.0.6.1'
116116
api "org.jetbrains.kotlin:kotlin-stdlib-jdk8:${props.getProperty('kotlin')}"
117-
api 'de.thetaphi:forbiddenapis:3.4'
117+
api 'de.thetaphi:forbiddenapis:3.5.1'
118118
api 'com.avast.gradle:gradle-docker-compose-plugin:0.16.11'
119119
api "org.yaml:snakeyaml:${props.getProperty('snakeyaml')}"
120120
api 'org.apache.maven:maven-model:3.9.1'

buildSrc/src/main/java/org/opensearch/gradle/precommit/ThirdPartyAuditPrecommitPlugin.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,7 @@ public class ThirdPartyAuditPrecommitPlugin extends PrecommitPlugin {
5151
public TaskProvider<? extends Task> createTask(Project project) {
5252
project.getPlugins().apply(CompileOnlyResolvePlugin.class);
5353
project.getConfigurations().create("forbiddenApisCliJar");
54-
project.getDependencies().add("forbiddenApisCliJar", "de.thetaphi:forbiddenapis:3.4");
54+
project.getDependencies().add("forbiddenApisCliJar", "de.thetaphi:forbiddenapis:3.5.1");
5555

5656
Configuration jdkJarHellConfig = project.getConfigurations().create(JDK_JAR_HELL_CONFIG_NAME);
5757
if (BuildParams.isInternal() && project.getPath().equals(":libs:opensearch-core") == false) {

buildSrc/src/main/java/org/opensearch/gradle/precommit/ThirdPartyAuditTask.java

+2-4
Original file line numberDiff line numberDiff line change
@@ -79,9 +79,7 @@
7979
@CacheableTask
8080
public class ThirdPartyAuditTask extends DefaultTask {
8181

82-
private static final Pattern MISSING_CLASS_PATTERN = Pattern.compile(
83-
"WARNING: Class '(.*)' cannot be loaded \\(.*\\)\\. Please fix the classpath!"
84-
);
82+
private static final Pattern MISSING_CLASS_PATTERN = Pattern.compile("DEBUG: Class '(.*)' cannot be loaded \\(.*\\)\\.");
8583

8684
private static final Pattern VIOLATION_PATTERN = Pattern.compile("\\s\\sin ([a-zA-Z0-9$.]+) \\(.*\\)");
8785
private static final int SIG_KILL_EXIT_VALUE = 137;
@@ -368,7 +366,7 @@ private String runForbiddenAPIsCli() throws IOException {
368366
spec.jvmArgs("-Xmx1g");
369367
spec.jvmArgs(LoggedExec.shortLivedArgs());
370368
spec.getMainClass().set("de.thetaphi.forbiddenapis.cli.CliMain");
371-
spec.args("-f", getSignatureFile().getAbsolutePath(), "-d", getJarExpandDir(), "--allowmissingclasses");
369+
spec.args("-f", getSignatureFile().getAbsolutePath(), "-d", getJarExpandDir(), "--debug", "--allowmissingclasses");
372370
spec.setErrorOutput(errorOut);
373371
if (getLogger().isInfoEnabled() == false) {
374372
spec.setStandardOutput(new NullOutputStream());

buildSrc/src/testKit/thirdPartyAudit/build.gradle

-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,6 @@ repositories {
4040
}
4141

4242
dependencies {
43-
forbiddenApisCliJar 'de.thetaphi:forbiddenapis:3.3'
4443
jdkJarHell 'org.opensearch:opensearch-core:current'
4544
compileOnly "org.${project.properties.compileOnlyGroup}:${project.properties.compileOnlyVersion}"
4645
implementation "org.${project.properties.compileGroup}:${project.properties.compileVersion}"

0 commit comments

Comments
 (0)