Skip to content

Commit

Permalink
fix: module name → com.google.errorprone.annotations
Browse files Browse the repository at this point in the history
- 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]>
  • Loading branch information
sgammon committed Mar 12, 2024
1 parent ea5ef6d commit bc52c58
Show file tree
Hide file tree
Showing 3 changed files with 36 additions and 3 deletions.
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>
</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 {
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: .*
]]></bnd>
</configuration>
</execution>
Expand Down

0 comments on commit bc52c58

Please sign in to comment.