Skip to content

Commit

Permalink
Add OSGi headers to pom files.
Browse files Browse the repository at this point in the history
This addresses #12017.

PiperOrigin-RevId: 511587640
  • Loading branch information
deannagarcia committed Feb 23, 2023
1 parent 9ee7b56 commit e909bfc
Show file tree
Hide file tree
Showing 3 changed files with 58 additions and 0 deletions.
20 changes: 20 additions & 0 deletions java/core/pom_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -18,4 +18,24 @@
<dependencies>
{dependencies}
</dependencies>

<build>
<plugins>
<!-- OSGI bundle configuration -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Automatic-Module-Name>com.google.protobuf</Automatic-Module-Name> <!-- Java9+ Jigsaw module name -->
<Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL>
<Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName>
<Export-Package>com.google.protobuf;version=${project.version}</Export-Package>
<Import-Package>sun.misc;resolution:=optional,*</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
19 changes: 19 additions & 0 deletions java/lite/pom_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -19,4 +19,23 @@
{dependencies}
</dependencies>

<build>
<plugins>
<!-- OSGI bundle configuration -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Automatic-Module-Name>com.google.protobuf</Automatic-Module-Name> <!-- Java9+ Jigsaw module name -->
<Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL>
<Bundle-SymbolicName>com.google.protobuf</Bundle-SymbolicName>
<Export-Package>com.google.protobuf;version=${project.version}</Export-Package>
<Import-Package>sun.misc;resolution:=optional,*</Import-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>
</project>
19 changes: 19 additions & 0 deletions java/util/pom_template.xml
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,23 @@
{dependencies}
</dependencies>

<build>
<plugins>
<!-- OSGI bundle configuration -->
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Automatic-Module-Name>com.google.protobuf.util</Automatic-Module-Name> <!-- Java9+ Jigsaw module name -->
<Bundle-DocURL>https://developers.google.com/protocol-buffers/</Bundle-DocURL>
<Bundle-SymbolicName>com.google.protobuf.util</Bundle-SymbolicName>
<Export-Package>com.google.protobuf.util;version=${project.version}</Export-Package>
</instructions>
</configuration>
</plugin>
</plugins>
</build>

</project>

0 comments on commit e909bfc

Please sign in to comment.