diff --git a/NOTICES b/NOTICES index 3b2de56a6c..1916735547 100644 --- a/NOTICES +++ b/NOTICES @@ -45,7 +45,7 @@ Snappy Java (org.xerial.snappy:snappy-java:1.*) - Apache License, Version 2.0 -Aircompressor (io.airlift:aircompressor:0.*) +Aircompressor (io.airlift:aircompressor:2.*) - Apache License, Version 2.0 @@ -254,10 +254,6 @@ Eclipse Jetty (org.eclipse.jetty:*:9.*, org.eclipse.jetty.http2:*:9.*, org.eclip - Apache License, Version 2.0 - Eclipse Public License 1.0 -Jettison (org.codehaus.jettison:jettison:1.*) - -- Apache License, Version 2.0 - JSON Path (com.jayway.jsonpath:json-path:2.*) - Apache License, Version 2.0 diff --git a/java/build/src/main/java/sleeper/build/notices/NoticeDeclaration.java b/java/build/src/main/java/sleeper/build/notices/NoticeDeclaration.java index 236bce1527..13eccf9343 100644 --- a/java/build/src/main/java/sleeper/build/notices/NoticeDeclaration.java +++ b/java/build/src/main/java/sleeper/build/notices/NoticeDeclaration.java @@ -32,6 +32,7 @@ public static List findDeclarations(String notices) { int number = 0; while (matcher.find()) { matches.add(NoticeDeclaration.from(number, matcher.group(), matcher.group(1), matcher.group(2), matcher.group(3))); + number++; } return matches; } diff --git a/java/build/src/test/java/sleeper/build/notices/CheckNoticesTest.java b/java/build/src/test/java/sleeper/build/notices/CheckNoticesTest.java index 3f065c89af..31d6a96f3e 100644 --- a/java/build/src/test/java/sleeper/build/notices/CheckNoticesTest.java +++ b/java/build/src/test/java/sleeper/build/notices/CheckNoticesTest.java @@ -127,4 +127,17 @@ void shouldFindExtraNoticeNotInDependencies() { assertThat(CheckNotices.findProblemsInNotices(notices, versions)) .containsExactly("Dependency not present in pom.xml: org.junit.jupiter:junit-jupiter-*:5.*"); } + + @Test + void shouldFindOneOfTwoNoticesNotInDependencies() { + String notices = """ + JUnit (org.junit.jupiter:junit-jupiter-*:5.*) + Jettison (org.codehaus.jettison:jettison:1.*) + """; + DependencyVersions versions = DependencyVersions.builder() + .dependency("org.junit.jupiter", "junit-jupiter-api", "5.11.3") + .build(); + assertThat(CheckNotices.findProblemsInNotices(notices, versions)) + .containsExactly("Dependency not present in pom.xml: org.codehaus.jettison:jettison:1.*"); + } } diff --git a/java/pom.xml b/java/pom.xml index 87328d0d67..174610ab23 100644 --- a/java/pom.xml +++ b/java/pom.xml @@ -92,8 +92,8 @@ We were getting multiple versions added to the classpath, and they both have vulnerabilities. --> 1.1.10.7 - - 0.27 + + 2.0.2 4.29.1 @@ -167,9 +167,6 @@ 9.4.56.v20240826 - 1.5.4 - 2.9.0 - 2.10.0 2.1.3 2.3.3 1.4 @@ -186,6 +183,8 @@ 2.35.2 3.26.3 24.12.0 + 2.9.0 + 2.10.0 4.1.0 10.21.0 @@ -685,11 +684,6 @@ http2-server ${jetty.version} - - org.codehaus.jettison - jettison - ${jettison.version} - com.jayway.jsonpath json-path