From 9d99ee76f2ca8568b69150f5df7fe845c8545d16 Mon Sep 17 00:00:00 2001 From: Sam Gammon Date: Tue, 12 Mar 2024 11:27:56 -0700 Subject: [PATCH] =?UTF-8?q?fix:=20module=20name=20=E2=86=92=20`com.google.?= =?UTF-8?q?errorprone.annotations`?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit ## Summary Fixes the module name: ~~`com.google.errorprone.annotation`~~ → `com.google.errorprone.annotations`. Amends the OSGi build not to include `Automatic-Module-Name` in the `MANIFEST.MF` for the `annotations` project. ## Changelog - fix: name in `module-info.java` for `annotations` module - fix: don't emit `Automatic-Module-Name` in `annotations` module - chore: preserve all other aspects of OSGi and JAR builds Relates to [discussion](https://github.com/google/error-prone/pull/4311#issuecomment-1990316489) in google/error-prone#4311. Double checked for correct JAR structure; see [these screenshots](https://github.com/google/error-prone/pull/4311#issuecomment-1991007036). cc / @cushon @ben-manes Fixes #4317 COPYBARA_INTEGRATE_REVIEW=https://github.com/google/error-prone/pull/4317 from sgammon:fix/module-name bc52c58b9074eff0003d1b24436d15b4fd05ea18 PiperOrigin-RevId: 615114274 --- annotations/pom.xml | 34 ++++++++++++++++++++++ annotations/src/main/java/module-info.java | 2 +- pom.xml | 3 +- 3 files changed, 36 insertions(+), 3 deletions(-) diff --git a/annotations/pom.xml b/annotations/pom.xml index e68d412cbc2..62ebfe88a40 100644 --- a/annotations/pom.xml +++ b/annotations/pom.xml @@ -90,6 +90,40 @@ + + biz.aQute.bnd + bnd-maven-plugin + 6.4.0 + + + generate-OSGi-manifest + none + + + generate-OSGi-manifest-annotations + + bnd-process + + + + + + + + diff --git a/annotations/src/main/java/module-info.java b/annotations/src/main/java/module-info.java index 532f2758a07..3dccd229104 100644 --- a/annotations/src/main/java/module-info.java +++ b/annotations/src/main/java/module-info.java @@ -14,7 +14,7 @@ * limitations under the License. */ -open module com.google.errorprone.annotation { +open module com.google.errorprone.annotations { requires java.compiler; exports com.google.errorprone.annotations; diff --git a/pom.xml b/pom.xml index 3dc704b4f83..f7cad3c75bd 100644 --- a/pom.xml +++ b/pom.xml @@ -150,10 +150,9 @@ ;_;.> Automatic-Module-Name: $ - -exportcontents: com.google.errorprone*,!META-INF.* + -exportcontents: com.google.errorprone* -noextraheaders: true -removeheaders: Private-Package - -fixupmessages: ^Classes found in the wrong directory: .* ]]>