Skip to content

Commit 8e85fad

Browse files
authored
Added Automatic-Module-Name to published jars. Context: https://b.corp.google.com/issues/308334884 (#3729)
1 parent 918b67c commit 8e85fad

File tree

5 files changed

+94
-43
lines changed

5 files changed

+94
-43
lines changed

java/carrier/pom.xml

Lines changed: 17 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35
<modelVersion>4.0.0</modelVersion>
4-
<groupId>com.googlecode.libphonenumber</groupId>
56
<artifactId>carrier</artifactId>
67
<version>1.236-SNAPSHOT</version>
78
<packaging>jar</packaging>
@@ -24,8 +25,10 @@
2425
</resources>
2526
<testResources>
2627
<testResource>
27-
<directory>test/com/google/i18n/phonenumbers/carrier/testing_data</directory>
28-
<targetPath>com/google/i18n/phonenumbers/carrier/testing_data</targetPath>
28+
<directory>test/com/google/i18n/phonenumbers/carrier/testing_data
29+
</directory>
30+
<targetPath>com/google/i18n/phonenumbers/carrier/testing_data
31+
</targetPath>
2932
</testResource>
3033
</testResources>
3134
<plugins>
@@ -35,24 +38,29 @@
3538
<version>5.1.9</version>
3639
<configuration>
3740
<instructions>
38-
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
41+
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
3942
</instructions>
4043
</configuration>
4144
</plugin>
4245
<plugin>
4346
<artifactId>maven-jar-plugin</artifactId>
44-
<version>3.3.0</version>
4547
<executions>
4648
<execution>
4749
<id>default-jar</id>
4850
<configuration>
4951
<archive>
50-
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
52+
<manifestFile>
53+
${project.build.outputDirectory}/META-INF/MANIFEST.MF
54+
</manifestFile>
55+
<manifestEntries>
56+
<Automatic-Module-Name>com.google.i18n.phonenumbers.carrier
57+
</Automatic-Module-Name>
58+
</manifestEntries>
5159
</archive>
5260
</configuration>
5361
</execution>
54-
</executions>
55-
</plugin>
62+
</executions>
63+
</plugin>
5664
<plugin>
5765
<groupId>org.codehaus.mojo</groupId>
5866
<artifactId>animal-sniffer-maven-plugin</artifactId>

java/geocoder/pom.xml

Lines changed: 21 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35
<modelVersion>4.0.0</modelVersion>
4-
<groupId>com.googlecode.libphonenumber</groupId>
56
<artifactId>geocoder</artifactId>
67
<version>2.246-SNAPSHOT</version>
78
<packaging>jar</packaging>
@@ -28,12 +29,16 @@
2829
</resources>
2930
<testResources>
3031
<testResource>
31-
<directory>test/com/google/i18n/phonenumbers/geocoding/testing_data</directory>
32-
<targetPath>com/google/i18n/phonenumbers/geocoding/testing_data</targetPath>
32+
<directory>test/com/google/i18n/phonenumbers/geocoding/testing_data
33+
</directory>
34+
<targetPath>com/google/i18n/phonenumbers/geocoding/testing_data
35+
</targetPath>
3336
</testResource>
3437
<testResource>
35-
<directory>test/com/google/i18n/phonenumbers/timezones/testing_data</directory>
36-
<targetPath>com/google/i18n/phonenumbers/timezones/testing_data</targetPath>
38+
<directory>test/com/google/i18n/phonenumbers/timezones/testing_data
39+
</directory>
40+
<targetPath>com/google/i18n/phonenumbers/timezones/testing_data
41+
</targetPath>
3742
</testResource>
3843
</testResources>
3944
<plugins>
@@ -43,24 +48,29 @@
4348
<version>5.1.9</version>
4449
<configuration>
4550
<instructions>
46-
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
51+
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
4752
</instructions>
4853
</configuration>
4954
</plugin>
5055
<plugin>
5156
<artifactId>maven-jar-plugin</artifactId>
52-
<version>3.3.0</version>
5357
<executions>
5458
<execution>
5559
<id>default-jar</id>
5660
<configuration>
5761
<archive>
58-
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
62+
<manifestFile>
63+
${project.build.outputDirectory}/META-INF/MANIFEST.MF
64+
</manifestFile>
65+
<manifestEntries>
66+
<Automatic-Module-Name>com.google.i18n.phonenumbers.geocoder
67+
</Automatic-Module-Name>
68+
</manifestEntries>
5969
</archive>
6070
</configuration>
6171
</execution>
62-
</executions>
63-
</plugin>
72+
</executions>
73+
</plugin>
6474
<plugin>
6575
<groupId>org.codehaus.mojo</groupId>
6676
<artifactId>animal-sniffer-maven-plugin</artifactId>

java/internal/prefixmapper/pom.xml

Lines changed: 19 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35
<modelVersion>4.0.0</modelVersion>
4-
<groupId>com.googlecode.libphonenumber</groupId>
56
<artifactId>prefixmapper</artifactId>
67
<version>2.246-SNAPSHOT</version>
78
<packaging>jar</packaging>
@@ -19,8 +20,11 @@
1920
<testSourceDirectory>test</testSourceDirectory>
2021
<testResources>
2122
<testResource>
22-
<directory>../../geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data</directory>
23-
<targetPath>com/google/i18n/phonenumbers/geocoding/testing_data</targetPath>
23+
<directory>
24+
../../geocoder/test/com/google/i18n/phonenumbers/geocoding/testing_data
25+
</directory>
26+
<targetPath>com/google/i18n/phonenumbers/geocoding/testing_data
27+
</targetPath>
2428
</testResource>
2529
</testResources>
2630
<plugins>
@@ -30,24 +34,30 @@
3034
<version>5.1.9</version>
3135
<configuration>
3236
<instructions>
33-
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
37+
<Fragment-Host>com.googlecode.libphonenumber</Fragment-Host>
3438
</instructions>
3539
</configuration>
3640
</plugin>
3741
<plugin>
3842
<artifactId>maven-jar-plugin</artifactId>
39-
<version>3.3.0</version>
4043
<executions>
4144
<execution>
4245
<id>default-jar</id>
4346
<configuration>
4447
<archive>
45-
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
48+
<manifestFile>
49+
${project.build.outputDirectory}/META-INF/MANIFEST.MF
50+
</manifestFile>
51+
<manifestEntries>
52+
<Automatic-Module-Name>
53+
com.google.i18n.phonenumbers.prefixmapper
54+
</Automatic-Module-Name>
55+
</manifestEntries>
4656
</archive>
4757
</configuration>
4858
</execution>
49-
</executions>
50-
</plugin>
59+
</executions>
60+
</plugin>
5161

5262
<plugin>
5363
<groupId>org.codehaus.mojo</groupId>

java/libphonenumber/pom.xml

Lines changed: 20 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,8 @@
11
<?xml version="1.0"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35
<modelVersion>4.0.0</modelVersion>
4-
<groupId>com.googlecode.libphonenumber</groupId>
56
<artifactId>libphonenumber</artifactId>
67
<version>8.13.52-SNAPSHOT</version>
78
<packaging>jar</packaging>
@@ -35,20 +36,26 @@
3536
<version>5.1.9</version>
3637
<configuration>
3738
<instructions>
38-
<Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI>
39+
<Eclipse-ExtensibleAPI>true</Eclipse-ExtensibleAPI>
3940
<Export-Package>com.google.i18n.phonenumbers</Export-Package>
4041
</instructions>
4142
</configuration>
4243
</plugin>
4344
<plugin>
4445
<artifactId>maven-jar-plugin</artifactId>
45-
<version>3.3.0</version>
4646
<executions>
4747
<execution>
4848
<id>default-jar</id>
4949
<configuration>
5050
<archive>
51-
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
51+
<manifestFile>
52+
${project.build.outputDirectory}/META-INF/MANIFEST.MF
53+
</manifestFile>
54+
<manifestEntries>
55+
<Automatic-Module-Name>
56+
com.google.i18n.phonenumbers.libphonenumber
57+
</Automatic-Module-Name>
58+
</manifestEntries>
5259
</archive>
5360
</configuration>
5461
</execution>
@@ -61,7 +68,14 @@
6168
<configuration>
6269
<classifier>no-metadata</classifier>
6370
<archive>
64-
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
71+
<manifestFile>
72+
${project.build.outputDirectory}/META-INF/MANIFEST.MF
73+
</manifestFile>
74+
<manifestEntries>
75+
<Automatic-Module-Name>
76+
com.google.i18n.phonenumbers.libphonenumber
77+
</Automatic-Module-Name>
78+
</manifestEntries>
6579
</archive>
6680
<excludes>
6781
<exclude>com/google/i18n/phonenumbers/data/*</exclude>

java/pom.xml

Lines changed: 17 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<?xml version="1.0"?>
2-
<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">
2+
<project xmlns="http://maven.apache.org/POM/4.0.0"
3+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4+
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
35
<modelVersion>4.0.0</modelVersion>
46
<groupId>com.googlecode.libphonenumber</groupId>
57
<artifactId>libphonenumber-parent</artifactId>
@@ -14,7 +16,8 @@
1416
</parent>
1517

1618
<description>
17-
Google's common Java library for parsing, formatting, storing and validating international phone numbers.
19+
Google's common Java library for parsing, formatting, storing and validating
20+
international phone numbers.
1821
Optimized for running on smartphones.
1922
</description>
2023

@@ -31,8 +34,10 @@
3134
</licenses>
3235

3336
<scm>
34-
<connection>scm:git:https://github.com/google/libphonenumber.git</connection>
35-
<developerConnection>scm:git:[email protected]:googlei18n/libphonenumber.git</developerConnection>
37+
<connection>scm:git:https://github.com/google/libphonenumber.git
38+
</connection>
39+
<developerConnection>scm:git:[email protected]:googlei18n/libphonenumber.git
40+
</developerConnection>
3641
<url>https://github.com/google/libphonenumber/</url>
3742
<tag>v8.13.51</tag>
3843
</scm>
@@ -108,6 +113,10 @@
108113
<artifactId>animal-sniffer-maven-plugin</artifactId>
109114
<version>1.15</version>
110115
</plugin>
116+
<plugin>
117+
<artifactId>maven-jar-plugin</artifactId>
118+
<version>3.3.0</version>
119+
</plugin>
111120
</plugins>
112121
</pluginManagement>
113122
<plugins>
@@ -162,20 +171,20 @@
162171
<version>3.11.0</version>
163172
<configuration>
164173
<source>1.7</source>
165-
<target>1.7</target>
166-
<encoding>UTF-8</encoding>
174+
<target>1.7</target>
175+
<encoding>UTF-8</encoding>
167176
</configuration>
168177
</plugin>
169178
<plugin>
170179
<groupId>org.sonatype.plugins</groupId>
171180
<artifactId>nexus-staging-maven-plugin</artifactId>
172-
<version>1.6.13</version>
181+
<version>1.6.13</version>
173182
<extensions>true</extensions>
174183
<configuration>
175184
<serverId>sonatype-nexus-staging</serverId>
176185
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
177186
<stagingProfileId>23ed8fbc71e875</stagingProfileId>
178-
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
187+
<skipStagingRepositoryClose>true</skipStagingRepositoryClose>
179188
</configuration>
180189
</plugin>
181190
</plugins>

0 commit comments

Comments
 (0)