Skip to content

Conversation

sgammon
Copy link
Contributor

@sgammon sgammon commented Mar 12, 2024

Summary

Fixes the module name: com.google.errorprone.annotationcom.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 in #4311. Double checked for correct JAR structure; see these screenshots.

cc / @cushon @ben-manes

*/

open module com.google.errorprone.annotation {
open module com.google.errorprone.annotations {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Module fix. One million palms on face.

Comment on lines 151 to -156
Bundle-SymbolicName: com.google.$<replacestring;$<replacestring;${project.artifactId};^error_prone;errorprone>;_;.>
Automatic-Module-Name: $<Bundle-SymbolicName>
-exportcontents: com.google.errorprone*,!META-INF.*
-exportcontents: com.google.errorprone*
-noextraheaders: true
-removeheaders: Private-Package
-fixupmessages: ^Classes found in the wrong directory: .*
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice silver lining: the OSGI configuration at the top level is now completely restored to what it was before. Only the annotations module has OSGi build customizations. In fact, my original JPMS PR (after this) is probably localized completely to annotations/pom.xml.

- 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: google#4311
Signed-off-by: Sam Gammon <[email protected]>
Comment on lines +108 to +122
<!--
The OSGi bundle build is overridden here to allow for MRJAR classes in the
versioned class space underneath META-INF.
The `annotations` module also should not have an `Automatic-Module-Name`.
Otherwise, these flags should stay in-sync with the same block in the root
`pom.xml`.
-->
<bnd><![CDATA[
Bundle-SymbolicName: com.google.errorprone.annotations
-exportcontents: com.google.errorprone*,!META-INF.*
-noextraheaders: true
-removeheaders: Private-Package
-fixupmessages: ^Classes found in the wrong directory: .*
]]></bnd>
Copy link
Contributor Author

@sgammon sgammon Mar 12, 2024

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fix: OSGI plugin now has a dedicated run within the child project, and suppresses the parent run with <phase>none</phase>.

copybara-service bot pushed a commit that referenced this pull request Mar 12, 2024
## 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](#4311 (comment)) in #4311. Double checked for correct JAR structure; see [these screenshots](#4311 (comment)).

cc / @cushon @ben-manes

Fixes #4317

FUTURE_COPYBARA_INTEGRATE_REVIEW=#4317 from sgammon:fix/module-name bc52c58
PiperOrigin-RevId: 615074017
copybara-service bot pushed a commit that referenced this pull request Mar 12, 2024
## 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](#4311 (comment)) in #4311. Double checked for correct JAR structure; see [these screenshots](#4311 (comment)).

cc / @cushon @ben-manes

Fixes #4317

FUTURE_COPYBARA_INTEGRATE_REVIEW=#4317 from sgammon:fix/module-name bc52c58
PiperOrigin-RevId: 615074017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants