Skip to content

Commit 25408f4

Browse files
sgammonError Prone Team
authored and
Error Prone Team
committed
fix: module name → com.google.errorprone.annotations
## 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
1 parent ea5ef6d commit 25408f4

File tree

3 files changed

+36
-3
lines changed

3 files changed

+36
-3
lines changed

annotations/pom.xml

+34
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,40 @@
9090
</excludes>
9191
</configuration>
9292
</plugin>
93+
<plugin>
94+
<groupId>biz.aQute.bnd</groupId>
95+
<artifactId>bnd-maven-plugin</artifactId>
96+
<version>6.4.0</version>
97+
<executions>
98+
<execution>
99+
<id>generate-OSGi-manifest</id>
100+
<phase>none</phase>
101+
</execution>
102+
<execution>
103+
<id>generate-OSGi-manifest-annotations</id>
104+
<goals>
105+
<goal>bnd-process</goal>
106+
</goals>
107+
<configuration>
108+
<!--
109+
The OSGi bundle build is overridden here to allow for MRJAR classes in the
110+
versioned class space underneath META-INF.
111+
112+
The `annotations` module also should not have an `Automatic-Module-Name`.
113+
Otherwise, these flags should stay in-sync with the same block in the root
114+
`pom.xml`.
115+
-->
116+
<bnd><![CDATA[
117+
Bundle-SymbolicName: com.google.errorprone.annotations
118+
-exportcontents: com.google.errorprone*,!META-INF.*
119+
-noextraheaders: true
120+
-removeheaders: Private-Package
121+
-fixupmessages: ^Classes found in the wrong directory: .*
122+
]]></bnd>
123+
</configuration>
124+
</execution>
125+
</executions>
126+
</plugin>
93127
</plugins>
94128
</build>
95129
</project>

annotations/src/main/java/module-info.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
open module com.google.errorprone.annotation {
17+
open module com.google.errorprone.annotations {
1818
requires java.compiler;
1919

2020
exports com.google.errorprone.annotations;

pom.xml

+1-2
Original file line numberDiff line numberDiff line change
@@ -150,10 +150,9 @@
150150
<bnd><![CDATA[
151151
Bundle-SymbolicName: com.google.$<replacestring;$<replacestring;${project.artifactId};^error_prone;errorprone>;_;.>
152152
Automatic-Module-Name: $<Bundle-SymbolicName>
153-
-exportcontents: com.google.errorprone*,!META-INF.*
153+
-exportcontents: com.google.errorprone*
154154
-noextraheaders: true
155155
-removeheaders: Private-Package
156-
-fixupmessages: ^Classes found in the wrong directory: .*
157156
]]></bnd>
158157
</configuration>
159158
</execution>

0 commit comments

Comments
 (0)