Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: module name → com.google.errorprone.annotations #4317

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
34 changes: 34 additions & 0 deletions annotations/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,40 @@
</excludes>
</configuration>
</plugin>
<plugin>
<groupId>biz.aQute.bnd</groupId>
<artifactId>bnd-maven-plugin</artifactId>
<version>6.4.0</version>
<executions>
<execution>
<id>generate-OSGi-manifest</id>
<phase>none</phase>
</execution>
<execution>
<id>generate-OSGi-manifest-annotations</id>
<goals>
<goal>bnd-process</goal>
</goals>
<configuration>
<!--
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>
Comment on lines +108 to +122
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>.

</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>
2 changes: 1 addition & 1 deletion annotations/src/main/java/module-info.java
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

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.

requires java.compiler;

exports com.google.errorprone.annotations;
Expand Down
3 changes: 1 addition & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -150,10 +150,9 @@
<bnd><![CDATA[
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: .*
Comment on lines 151 to -156
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.

]]></bnd>
</configuration>
</execution>
Expand Down
Loading