Skip to content

Commit

Permalink
Added Automatic-Module-Name to published jars. Context: https://b.cor…
Browse files Browse the repository at this point in the history
  • Loading branch information
tvislavski authored Dec 2, 2024
1 parent 918b67c commit 8e85fad
Show file tree
Hide file tree
Showing 5 changed files with 94 additions and 43 deletions.
26 changes: 17 additions & 9 deletions java/carrier/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.googlecode.libphonenumber</groupId>
<artifactId>carrier</artifactId>
<version>1.236-SNAPSHOT</version>
<packaging>jar</packaging>
Expand All @@ -24,8 +25,10 @@
</resources>
<testResources>
<testResource>
<directory>test/com/google/i18n/phonenumbers/carrier/testing_data</directory>
<targetPath>com/google/i18n/phonenumbers/carrier/testing_data</targetPath>
<directory>test/com/google/i18n/phonenumbers/carrier/testing_data
</directory>
<targetPath>com/google/i18n/phonenumbers/carrier/testing_data
</targetPath>
</testResource>
</testResources>
<plugins>
Expand All @@ -35,24 +38,29 @@
<version>5.1.9</version>
<configuration>
<instructions>
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestFile>
${project.build.outputDirectory}/META-INF/MANIFEST.MF
</manifestFile>
<manifestEntries>
<Automatic-Module-Name>com.google.i18n.phonenumbers.carrier
</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
Expand Down
32 changes: 21 additions & 11 deletions java/geocoder/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.googlecode.libphonenumber</groupId>
<artifactId>geocoder</artifactId>
<version>2.246-SNAPSHOT</version>
<packaging>jar</packaging>
Expand All @@ -28,12 +29,16 @@
</resources>
<testResources>
<testResource>
<directory>test/com/google/i18n/phonenumbers/geocoding/testing_data</directory>
<targetPath>com/google/i18n/phonenumbers/geocoding/testing_data</targetPath>
<directory>test/com/google/i18n/phonenumbers/geocoding/testing_data
</directory>
<targetPath>com/google/i18n/phonenumbers/geocoding/testing_data
</targetPath>
</testResource>
<testResource>
<directory>test/com/google/i18n/phonenumbers/timezones/testing_data</directory>
<targetPath>com/google/i18n/phonenumbers/timezones/testing_data</targetPath>
<directory>test/com/google/i18n/phonenumbers/timezones/testing_data
</directory>
<targetPath>com/google/i18n/phonenumbers/timezones/testing_data
</targetPath>
</testResource>
</testResources>
<plugins>
Expand All @@ -43,24 +48,29 @@
<version>5.1.9</version>
<configuration>
<instructions>
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestFile>
${project.build.outputDirectory}/META-INF/MANIFEST.MF
</manifestFile>
<manifestEntries>
<Automatic-Module-Name>com.google.i18n.phonenumbers.geocoder
</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</executions>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>animal-sniffer-maven-plugin</artifactId>
Expand Down
28 changes: 19 additions & 9 deletions java/internal/prefixmapper/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.googlecode.libphonenumber</groupId>
<artifactId>prefixmapper</artifactId>
<version>2.246-SNAPSHOT</version>
<packaging>jar</packaging>
Expand All @@ -19,8 +20,11 @@
<testSourceDirectory>test</testSourceDirectory>
<testResources>
<testResource>
<directory>../../geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data</directory>
<targetPath>com/google/i18n/phonenumbers/geocoding/testing_data</targetPath>
<directory>
../../geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data
</directory>
<targetPath>com/google/i18n/phonenumbers/geocoding/testing_data
</targetPath>
</testResource>
</testResources>
<plugins>
Expand All @@ -30,24 +34,30 @@
<version>5.1.9</version>
<configuration>
<instructions>
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestFile>
${project.build.outputDirectory}/META-INF/MANIFEST.MF
</manifestFile>
<manifestEntries>
<Automatic-Module-Name>
com.google.i18n.phonenumbers.prefixmapper
</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</execution>
</executions>
</plugin>
</executions>
</plugin>

<plugin>
<groupId>org.codehaus.mojo</groupId>
Expand Down
26 changes: 20 additions & 6 deletions java/libphonenumber/pom.xml
Original file line number Diff line number Diff line change
@@ -1,7 +1,8 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.googlecode.libphonenumber</groupId>
<artifactId>libphonenumber</artifactId>
<version>8.13.52-SNAPSHOT</version>
<packaging>jar</packaging>
Expand Down Expand Up @@ -35,20 +36,26 @@
<version>5.1.9</version>
<configuration>
<instructions>
<Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI>
<Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI>
<Export-Package>com.google.i18n.phonenumbers</Export-Package>
</instructions>
</configuration>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
<executions>
<execution>
<id>default-jar</id>
<configuration>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestFile>
${project.build.outputDirectory}/META-INF/MANIFEST.MF
</manifestFile>
<manifestEntries>
<Automatic-Module-Name>
com.google.i18n.phonenumbers.libphonenumber
</Automatic-Module-Name>
</manifestEntries>
</archive>
</configuration>
</execution>
Expand All @@ -61,7 +68,14 @@
<configuration>
<classifier>no-metadata</classifier>
<archive>
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
<manifestFile>
${project.build.outputDirectory}/META-INF/MANIFEST.MF
</manifestFile>
<manifestEntries>
<Automatic-Module-Name>
com.google.i18n.phonenumbers.libphonenumber
</Automatic-Module-Name>
</manifestEntries>
</archive>
<excludes>
<exclude>com/google/i18n/phonenumbers/data/*</exclude>
Expand Down
25 changes: 17 additions & 8 deletions java/pom.xml
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
<?xml version="1.0"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>com.googlecode.libphonenumber</groupId>
<artifactId>libphonenumber-parent</artifactId>
Expand All @@ -14,7 +16,8 @@
</parent>

<description>
Google's common Java library for parsing, formatting, storing and validating international phone numbers.
Google's common Java library for parsing, formatting, storing and validating
international phone numbers.
Optimized for running on smartphones.
</description>

Expand All @@ -31,8 +34,10 @@
</licenses>

<scm>
<connection>scm:git:https://github.com/google/libphonenumber.git</connection>
<developerConnection>scm:git:[email protected]:googlei18n/libphonenumber.git</developerConnection>
<connection>scm:git:https://github.com/google/libphonenumber.git
</connection>
<developerConnection>scm:git:[email protected]:googlei18n/libphonenumber.git
</developerConnection>
<url>https://github.com/google/libphonenumber/</url>
<tag>v8.13.51</tag>
</scm>
Expand Down Expand Up @@ -108,6 +113,10 @@
<artifactId>animal-sniffer-maven-plugin</artifactId>
<version>1.15</version>
</plugin>
<plugin>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
Expand Down Expand Up @@ -162,20 +171,20 @@
<version>3.11.0</version>
<configuration>
<source>1.7</source>
<target>1.7</target>
<encoding>UTF-8</encoding>
<target>1.7</target>
<encoding>UTF-8</encoding>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>1.6.13</version>
<version>1.6.13</version>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus-staging</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<stagingProfileId>23ed8fbc71e875</stagingProfileId>
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
</configuration>
</plugin>
</plugins>
Expand Down

0 comments on commit 8e85fad

Please sign in to comment.