ICU-12811 Build ICU4J using Maven

See #2251
This commit is contained in:
Elango Cheran 2022-12-07 05:16:30 +00:00
parent 57c9313eb7
commit 45e98d4f67
28 changed files with 1821 additions and 0 deletions

View file

@ -55,6 +55,54 @@ jobs:
[ -d icu4j/out/junit-results ] && cd icu4j && cat `find out/junit-results -name "*.txt" -exec grep -l FAILED {} \;`;
if: ${{ failure() }}
# Java8 ICU4J build and unit tests using Maven
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-java-with-maven
# Run `test` to execute unit tests and ensure it is possible for tests to run even without packaging submodule
# dependencies as jar files
java8-icu4j-test-maven:
name: Run unit tests with Maven using JDK 8
runs-on: ubuntu-latest
steps:
- name: Checkout and setup
uses: actions/checkout@v2
with:
lfs: true
- name: Checkout lfs objects
run: git lfs pull
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: maven
- name: Run Maven test
run: |
cd icu4j/maven-build;
mvn --batch-mode test
# Run `verify` to ensure that `package` (creating .jar files) and `integration-test` (special setup for localespi tests) work
java8-icu4j-verify-maven:
name: Run integration tests with Maven using JDK 8
runs-on: ubuntu-latest
steps:
- name: Checkout and setup
uses: actions/checkout@v2
with:
lfs: true
- name: Checkout lfs objects
run: git lfs pull
- uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '8'
cache: maven
# The Maven `verify` phase causes the following to happen first, and in order:
# build/compile (`compile`), unit tests (`test`), Jar building (`package`),
# integration tests, if any (`integration-test`)
- name: Run Maven verify
run: |
cd icu4j/maven-build;
mvn --batch-mode verify
# ICU4J build and unit test under Java11
java11-icu4j-build-and-test:

1
.gitignore vendored
View file

@ -63,6 +63,7 @@ lib/
!tools/cldr/lib
out/
release/
target/
!docs/processes/release/
tmp/
x64/

120
icu4j/maven-build/README.md Normal file
View file

@ -0,0 +1,120 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
# ICU4J Maven Build
This directory exists as part of work to build ICU4J with Maven.
Specifically, this directory was created to exist alongside the code
directory structure without changing it.
This preserves the existing behavior of Ant build targets and BRS tasks / artifact
deploy processes based on the output of those Ant builds.
If / when the Ant build is suitable to be replaced and remove by Maven
or other such build tool, this directory should be removed.
Note: This directory is the root of the directory structure that defines
the Maven build without changing the existing code structure and Ant build.
## Usage
Maven is a pretty standard build tool in the Java ecosystem with a very well-defined
preferred way to do file layout and build execution.
Thus, many IDEs for Java will have some level of support for Maven.
The command line invocation is still, of course, the standard of truth for the build.
In this current setup for the ICU4J Maven build, in which the existing file layout and
processes remain the same in order to keep the Ant build unchanged,
the Maven build is configured in ways that are non-standard for a typical Maven setup.
Therefore, IDE support for this non-standard Maven build might be less than if ICUJ4's
directories and build process were modified to be more consistent with Maven expectations.
However, there still exist IDEs with good support, and the results of the command line
invocation's test and artifact jar packaging are designed to be equivalent to the Ant build.
### Usage in IDEs
Users of IDEs should familiarize themselves with the information about how to use Maven at
the command line,
which also includes information about Maven builds.
#### IntelliJ
IntelliJ does a good job of understanding multi-module Maven projects,
including the non-standard configuration here.
It also recognizes the customized locations of source code files and test code files in the configuration here.
To import into IntelliJ:
1. In IntelliJ, open a new project.
a. Recent versions of IntelliJ provide a dialog box on startup to select a project. Click the "Open" button.)
2. Select the `pom.xml` in this same directory (ex: `<ICU>/icu4j/maven-build/pom.xml`)
3. That's it. Note: IntelliJ will take a few minutes to do a one-time indexing of the new source code.
Navigating the source code files between main code and test code, and running tests individually or for an entire module,
work as they do normally in IntelliJ.
#### VS Code
VS Code's support of Maven projects is not as robust as IntelliJ's when it comes to the non-standard file layout for sources and tests.
The Maven support comes from the standard Java extension (which depends on the standard Maven extension) from the extension marketplace.
Source and test code files are not recognized properly, and it is not clear how to execute the tests.
However, a workaround exists for those who want to use VS Code as their preferred editor and still execute commands to recompile or run tests.
The workaround relies on invoking the Maven commands in a shell, and using a VS Code extension to create shortcuts within the IDE to invoke those commands.
The extension is [Command Runner](https://marketplace.visualstudio.com/items?itemName=edonet.vscode-command-runner).
Next, create a VS Code workspace (File > Open Folder...) at the ICU4J root at `<ICU>/icu4j`.
Then edit your settings for your VS Code workspace for ICU4J (this is the file at `<ICU>/icu4j/.vscode/settings.json`)
by adding this section to the settings:
```json
{
...
"command-runner.commands": {
// The following commands assume your VS Code workspace is rooted at `<ICU_ROOT>/icu4j`. If not,
// then adjust accordingly.
"core > all > compile": "cd ${workspaceFolder}/maven-build; mvn -am -pl maven-icu4j compile",
"core > all > test": "cd ${workspaceFolder}/maven-build; mvn -am -pl maven-icu4j test -DfailIfNoTests=false",
"core > number > test": "cd ${workspaceFolder}/maven-build; mvn -am -pl maven-icu4j test -Dtest=\"com.ibm.icu.dev.test.number.*,com.ibm.icu.dev.impl.number.*\" -DfailIfNoTests=false",
"core > text > test": "cd ${workspaceFolder}/maven-build; mvn -am -pl maven-icu4j test -Dtest=\"com.ibm.icu.dev.test.text.*\" -DfailIfNoTests=false",
"charset > compile": "cd ${workspaceFolder}/maven-build; mvn -am -pl maven-icu4j-charset compile",
"charset > test": "cd ${workspaceFolder}/maven-build; mvn -am -pl maven-icu4j-charset test -DfailIfNoTests=false",
"localespi > compile": "cd ${workspaceFolder}/maven-build; mvn -am -pl maven-icu4j-localespi compile",
"localespi > test": "cd ${workspaceFolder}/maven-build; mvn -am -pl maven-icu4j-localespi test -DfailIfNoTests=false",
}
...
}
```
As the extension's documentation describes, there are multiple ways to open up the palette of command shortcuts.
One way is to hit Ctrl/Cmd+Shift+P, then type "Run Command", then hit enter.
Another way is to right-click the background of any editor pane.
After the palette appears, you can choose which Maven build target to execute.
#### Eclipse
Although Eclipse's Maven plugin works reasonably well and can support the import of a multi-module Maven project,
the non-Maven-standard layout that it currently has seems to prevent an effective usage.
In particular, even though Eclipse can be configured to build the project,
it does not dispay the source code files and test code files for editing within the IDE through any of the usual Views.
### Usage at the command line
Maven divides its concept of a build into a "lifecycle" of a linear sequence of steps, called "phases".
These phases have a predefined order, and each phase can only begin if all of the previous phases have finished successfully.
Phases also serve as default build targets.
The sequence of phases include ... `compile` ... `test` ... `package` ... `integration-test` ... `deploy`.
At the root of the project, you can run `mvn compile` to build/compile, and `mvn test` to run all of the tests (after first compiling successfully).
To only execute a command within a submodule of the project, from the root, use the `-am -pl <projectlist>` syntax like this:
```
mvn test -am -pl maven-icu4j
```
where `<projectlist>` is a comma-separated list of names of the subfolders which contain the submodule configuration pom.xml files.
If you want to run only a specific test(s), use the `-Dtest="<test>"` option, where `<test>` can be a test name, a class name / package prefix, or a comma-separate list of them.
If you want to skip tests, use the `-DskipTests=true` option.

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:54e9a192377b1032381e29d7544e710bd126cc21187961aafa6e93792d989bc1
size 14175366

View file

@ -0,0 +1,13 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.icu</groupId>
<artifactId>icudata</artifactId>
<version>73.1-SNAPSHOT</version>
<description>POM was created from install:install-file</description>
</project>

View file

@ -0,0 +1,28 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
<groupId>com.ibm.icu</groupId>
<artifactId>icudata</artifactId>
<versioning>
<lastUpdated>20221207000422</lastUpdated>
<snapshot>
<localCopy>true</localCopy>
</snapshot>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>73.1-SNAPSHOT</value>
<updated>20221207000422</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>73.1-SNAPSHOT</value>
<updated>20221207000422</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
<version>73.1-SNAPSHOT</version>
</metadata>

View file

@ -0,0 +1,15 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.ibm.icu</groupId>
<artifactId>icudata</artifactId>
<versioning>
<versions>
<version>73.1-SNAPSHOT</version>
</versions>
<lastUpdated>20221207000422</lastUpdated>
</versioning>
</metadata>

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:2154e3d3fba1741cd55258a9c3ef33898c033af917951f2b44d1220912705cc9
size 93607

View file

@ -0,0 +1,13 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.icu</groupId>
<artifactId>icutzdata</artifactId>
<version>73.1-SNAPSHOT</version>
<description>POM was created from install:install-file</description>
</project>

View file

@ -0,0 +1,28 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
<groupId>com.ibm.icu</groupId>
<artifactId>icutzdata</artifactId>
<versioning>
<lastUpdated>20221207000426</lastUpdated>
<snapshot>
<localCopy>true</localCopy>
</snapshot>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>73.1-SNAPSHOT</value>
<updated>20221207000426</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>73.1-SNAPSHOT</value>
<updated>20221207000426</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
<version>73.1-SNAPSHOT</version>
</metadata>

View file

@ -0,0 +1,15 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.ibm.icu</groupId>
<artifactId>icutzdata</artifactId>
<versioning>
<versions>
<version>73.1-SNAPSHOT</version>
</versions>
<lastUpdated>20221207000426</lastUpdated>
</versioning>
</metadata>

View file

@ -0,0 +1,28 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
<?xml version="1.0" encoding="UTF-8"?>
<metadata modelVersion="1.1.0">
<groupId>com.ibm.icu</groupId>
<artifactId>testdata</artifactId>
<versioning>
<lastUpdated>20221207000430</lastUpdated>
<snapshot>
<localCopy>true</localCopy>
</snapshot>
<snapshotVersions>
<snapshotVersion>
<extension>jar</extension>
<value>73.1-SNAPSHOT</value>
<updated>20221207000430</updated>
</snapshotVersion>
<snapshotVersion>
<extension>pom</extension>
<value>73.1-SNAPSHOT</value>
<updated>20221207000430</updated>
</snapshotVersion>
</snapshotVersions>
</versioning>
<version>73.1-SNAPSHOT</version>
</metadata>

View file

@ -0,0 +1,3 @@
version https://git-lfs.github.com/spec/v1
oid sha256:b6c10566f57e9f09ae050bc038f87a9a054b5ccc019e7b41ac72ca1b44410c1d
size 831615

View file

@ -0,0 +1,13 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.icu</groupId>
<artifactId>testdata</artifactId>
<version>73.1-SNAPSHOT</version>
<description>POM was created from install:install-file</description>
</project>

View file

@ -0,0 +1,15 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
<?xml version="1.0" encoding="UTF-8"?>
<metadata>
<groupId>com.ibm.icu</groupId>
<artifactId>testdata</artifactId>
<versioning>
<versions>
<version>73.1-SNAPSHOT</version>
</versions>
<lastUpdated>20221207000430</lastUpdated>
</versioning>
</metadata>

View file

@ -0,0 +1,15 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
# maven-icu4j-charset
This directory exists as part of work to build ICU4J with Maven.
Specifically, this directory was created to exist alongside the code
directory structure without changing it.
This preserves the existing behavior of Ant build targets and BRS tasks / artifact
deploy processes based on the output of those Ant builds.
If / when the Ant build is suitable to be replaced and remove by Maven
or other such build tool, this directory should be removed.

View file

@ -0,0 +1,240 @@
<?xml version="1.0"?>
<!--
* © 2016 and later: Unicode, Inc. and others.
* License & terms of use: http://www.unicode.org/copyright.html
*******************************************************************************
* Copyright (C) 2010-2016, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
-->
<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">
<parent>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-root</artifactId>
<version>73.1-SNAPSHOT</version>
<!-- default relativePath for parent -->
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-charset</artifactId>
<version>73.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name> ICU4J Charset Provider</name>
<description>icu4j-charset is a supplemental library for icu4j, implementing Java Charset SPI.</description>
<properties>
<!-- Bundle-SymbolicName -->
<jar.symbolic.name>org.ibm.icu.charset</jar.symbolic.name>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<!-- add directories with main executable code -->
<execution>
<id>add-source</id>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>../../main/classes/charset/src</source>
</sources>
</configuration>
</execution>
<!-- add directories with test code -->
<execution>
<id>add-test-source</id>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>../../main/tests/charset/src</source>
<source>../../main/tests/framework/src</source>
</sources>
</configuration>
</execution>
<!-- add directories with main executable resources -->
<execution>
<id>add-resource</id>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>../../main/classes/charset/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<!-- add directories with test resources -->
<execution>
<id>add-test-resource</id>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>../../main/tests/charset/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../main/tests/framework/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!--
Extract the resource files from the icu4j-datafiles dependency so that it is available during `test`.
Note: The extraction here will not result in these files being included in the packaged jar.
-->
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<id>process-remote-resources</id>
<goals>
<goal>process</goal>
</goals>
<configuration>
<resourceBundles>
<resourceBundle>com.ibm.icu:icu4j-datafiles:${icu4j.version}</resourceBundle>
<resourceBundle>com.ibm.icu:icu4j-test-datafiles:${icu4j.version}</resourceBundle>
</resourceBundles>
</configuration>
</execution>
</executions>
</plugin>
<!--
Extract and unpack the *.cnv files + cnvalias.icu from the *.jar files in the upstream depenendency
`com.ibm.icu:icu4j-datafiles`.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>com.ibm.icu</includeGroupIds>
<!-- exclude test resource files which come through dependencies as `provided` scope -->
<excludeScope>provided</excludeScope>
<includes>**/*.cnv,**/cnvalias.icu</includes>
<excludes>**/*.jar</excludes>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!--
Enable configuration of the Manifest file, etc. during the process of packaging the .jar file.
For future reference: https://stackoverflow.com/questions/38548271/difference-between-maven-plugins-assembly-plugins-jar-plugins-shaded-plugi
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
<X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
<Specification-Title>${jar.spec.title}</Specification-Title>
<Specification-Version>${jar.spec.version}</Specification-Version>
<Specification-Vendor>${jar.spec.vendor}</Specification-Vendor>
<Implementation-Title>${jar.impl.title}</Implementation-Title>
<Implementation-Version>${jar.impl.version}</Implementation-Version>
<Implementation-Vendor>${jar.impl.vendor}</Implementation-Vendor>
<Implementation-Vendor-Id>${jar.impl.vendor.id}</Implementation-Vendor-Id>
<Bundle-ManifestVersion>${jar.manifest.version}</Bundle-ManifestVersion>
<Bundle-Name>${jar.name}</Bundle-Name>
<Bundle-Description>${jar.description}</Bundle-Description>
<Bundle-SymbolicName>${jar.symbolic.name}</Bundle-SymbolicName>
<Bundle-Version>${jar.version}</Bundle-Version>
<Bundle-Vendor>${jar.vendor}</Bundle-Vendor>
<Bundle-Copyright>${jar.copyright.info}</Bundle-Copyright>
<!-- TODO: We should remove this, right??? -->
<Main-Class>${jar.main.class}</Main-Class>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-test-datafiles</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- this is for parameterized JUnit tests -->
<dependency>
<groupId>pl.pragmatists</groupId>
<artifactId>JUnitParams</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,15 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
# maven-icu4j-charset
This directory exists as part of work to build ICU4J with Maven.
Specifically, this directory was created to exist alongside the code
directory structure without changing it.
This preserves the existing behavior of Ant build targets and BRS tasks / artifact
deploy processes based on the output of those Ant builds.
If / when the Ant build is suitable to be replaced and remove by Maven
or other such build tool, this directory should be removed.

View file

@ -0,0 +1,98 @@
<?xml version="1.0"?>
<!--
* © 2016 and later: Unicode, Inc. and others.
* License & terms of use: http://www.unicode.org/copyright.html
*******************************************************************************
* Copyright (C) 2010-2016, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
-->
<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">
<parent>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-root</artifactId>
<version>73.1-SNAPSHOT</version>
<!-- default relativePath for parent -->
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-datafiles</artifactId>
<version>73.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>ICU4J Data Files</name>
<description>Various *.jar files needed by ICU4J components' main code.</description>
<!--
We need to put the local repo repository here because it didn't seem possible
to put it in the parent POM and correctly inherit the information and find the
artifacts accordingly.
-->
<!--
The ${basedir} will (hopefully) only be resolved from this child directory, and
not the root directory or anywhere else.
-->
<repositories>
<repository>
<id>local-maven-repo</id>
<url>file:${basedir}/../local-maven-repo</url>
</repository>
</repositories>
<dependencies>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icudata</artifactId>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icutzdata</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<id>process-remote-resources</id>
<goals>
<goal>bundle</goal>
</goals>
<configuration>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>com.ibm.icu</includeGroupIds>
<excludes>**/*.jar</excludes>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,15 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
# maven-icu4j-localespi
This directory exists as part of work to build ICU4J with Maven.
Specifically, this directory was created to exist alongside the code
directory structure without changing it.
This preserves the existing behavior of Ant build targets and BRS tasks / artifact
deploy processes based on the output of those Ant builds.
If / when the Ant build is suitable to be replaced and remove by Maven
or other such build tool, this directory should be removed.

View file

@ -0,0 +1,242 @@
<?xml version="1.0"?>
<!--
* © 2016 and later: Unicode, Inc. and others.
* License & terms of use: http://www.unicode.org/copyright.html
*******************************************************************************
* Copyright (C) 2010-2016, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
-->
<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">
<parent>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-root</artifactId>
<version>73.1-SNAPSHOT</version>
<!-- default relativePath for parent -->
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-localespi</artifactId>
<version>73.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>ICU4J Locale Service Provider</name>
<description>icu4j-localespi is a supplemental library for icu4j, implementing Java Locale SPI.</description>
<properties>
<!-- Bundle-SymbolicName -->
<jar.symbolic.name>org.ibm.icu.localespi</jar.symbolic.name>
</properties>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<!-- add directories with main executable code -->
<execution>
<id>add-source</id>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>../../main/classes/localespi/src</source>
</sources>
</configuration>
</execution>
<!-- add directories with test code -->
<execution>
<id>add-test-source</id>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>../../main/tests/localespi/src</source>
<source>../../main/tests/framework/src</source>
</sources>
</configuration>
</execution>
<!-- add directories with main executable resources -->
<execution>
<id>add-resource</id>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>../../main/classes/localespi/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<!-- add directories with test resources -->
<execution>
<id>add-test-resource</id>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>../../main/tests/localespi/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../main/tests/framework/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
<!--
Do not run localespi tests as unit tests because they depend on loading the main code via a .jar file
via the Java extensions mechanism.
-->
<skipTests>true</skipTests>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>integration-test</goal>
</goals>
</execution>
</executions>
<configuration>
<includes>
<!-- treat localespi tests as integration tests because they depend on .jar files from package phase -->
<include>**/*.java</include>
<!-- default integration test wildcard patterns -->
<include>**/IT*.java</include>
<include>**/*IT.java</include>
<include>**/*ITCase.java</include>
</includes>
<!-- Set up the locale service provider using the .jar file of `icu4j-localespi` main code from the `package` phase -->
<systemPropertyVariables>
<!--
https://stackoverflow.com/a/5039973/2077918
The `java.ext.dirs` is a special Java system property that activates the Java extension mechanism.
The Java extension mechanism was deprecated in Java 8 (users are recommended to use `-classpath` instead),
and the extension mechanism was removed in Java 9 altogether.
For backwards compatibility testing for users of the Java extension mechansim,
this configuration achieves the effect of having the localespi code in a .jar file that gets loaded
by running this test in a phase following the `package` phase in which the .jar file is created.
-->
<java.ext.dirs>${project.build.directory}</java.ext.dirs>
<!--
https://stackoverflow.com/questions/45223908/why-does-the-java-extension-mechanism-not-check-the-classpath-for-an-optional-pa
-->
<java.locale.providers>SPI,JRE</java.locale.providers>
</systemPropertyVariables>
</configuration>
</plugin>
<!--
Enable configuration of the Manifest file, etc. during the process of packaging the .jar file.
For future reference: https://stackoverflow.com/questions/38548271/difference-between-maven-plugins-assembly-plugins-jar-plugins-shaded-plugi
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
<X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
<Specification-Title>${jar.spec.title}</Specification-Title>
<Specification-Version>${jar.spec.version}</Specification-Version>
<Specification-Vendor>${jar.spec.vendor}</Specification-Vendor>
<Implementation-Title>${jar.impl.title}</Implementation-Title>
<Implementation-Version>${jar.impl.version}</Implementation-Version>
<Implementation-Vendor>${jar.impl.vendor}</Implementation-Vendor>
<Implementation-Vendor-Id>${jar.impl.vendor.id}</Implementation-Vendor-Id>
<Bundle-ManifestVersion>${jar.manifest.version}</Bundle-ManifestVersion>
<Bundle-Name>${jar.name}</Bundle-Name>
<Bundle-Description>${jar.description}</Bundle-Description>
<Bundle-SymbolicName>${jar.symbolic.name}</Bundle-SymbolicName>
<Bundle-Version>${jar.version}</Bundle-Version>
<Bundle-Vendor>${jar.vendor}</Bundle-Vendor>
<Bundle-Copyright>${jar.copyright.info}</Bundle-Copyright>
<!-- TODO: We should remove this, right??? -->
<Main-Class>${jar.main.class}</Main-Class>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-test-datafiles</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
<!-- this is for parameterized JUnit tests -->
<dependency>
<groupId>pl.pragmatists</groupId>
<artifactId>JUnitParams</artifactId>
</dependency>
</dependencies>
</project>

View file

@ -0,0 +1,15 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
# maven-icu4j-charset
This directory exists as part of work to build ICU4J with Maven.
Specifically, this directory was created to exist alongside the code
directory structure without changing it.
This preserves the existing behavior of Ant build targets and BRS tasks / artifact
deploy processes based on the output of those Ant builds.
If / when the Ant build is suitable to be replaced and remove by Maven
or other such build tool, this directory should be removed.

View file

@ -0,0 +1,92 @@
<?xml version="1.0"?>
<!--
* © 2016 and later: Unicode, Inc. and others.
* License & terms of use: http://www.unicode.org/copyright.html
*******************************************************************************
* Copyright (C) 2010-2016, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
-->
<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">
<parent>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-root</artifactId>
<version>73.1-SNAPSHOT</version>
<!-- default relativePath for parent -->
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-test-datafiles</artifactId>
<version>73.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>ICU4J Test Data Files</name>
<description>Various *.jar files needed by ICU4J components' test code.</description>
<distributionManagement>
<repository>
<id>icu4j-releases</id>
<name>ICU4J Central Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<id>icu4j-snapshots</id>
<name>ICU4J Central Development Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<!--
We need to put the local repo repository here because it didn't seem possible
to put it in the parent POM and correctly inherit the information and find the
artifacts accordingly.
-->
<!--
The ${basedir} will (hopefully) only be resolved from this child directory, and
not the root directory or anywhere else.
-->
<repositories>
<repository>
<id>local-maven-repo</id>
<url>file:${basedir}/../local-maven-repo</url>
</repository>
</repositories>
<dependencies>
<!--
Shouldn't declare this dependency with scope=test because downstream
submodule consumers are the ones to declare <scope>test</scope> in
the <dependency> configuration.
-->
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>testdata</artifactId>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<id>process-remote-resources</id>
<goals>
<goal>bundle</goal>
</goals>
<configuration>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</project>

View file

@ -0,0 +1,15 @@
<!--
© 2022 and later: Unicode, Inc. and others.
License & terms of use: http://www.unicode.org/copyright.html
-->
# maven-icu4j
This directory exists as part of work to build ICU4J with Maven.
Specifically, this directory was created to exist alongside the code
directory structure without changing it.
This preserves the existing behavior of Ant build targets and BRS tasks / artifact
deploy processes based on the output of those Ant builds.
If / when the Ant build is suitable to be replaced and remove by Maven
or other such build tool, this directory should be removed.

View file

@ -0,0 +1,18 @@
#!/bin/bash
# Copyright (C) 2016 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
# This command lists all the resource files in a single directory that we want to match on.
# Then we filter the locale resource files, based on the file name, using the same match pattern
# used in the corresponding target in the Ant build.xml configuration.
# Then, we store the locale names in a file in that directory, which ICUResourceBundle.java might look for.
#
# Input argument $1 = directory containing containing *.res files
ls $1/*.res\
| ruby -lane 'puts "basename "+$F[0]' \
| sh \
| ruby -lane 'puts $F[0].match(/^(..\.res|.._.*\.res|...\.res|..._.*\.res|root.res)$/)' \
| egrep -v "res_index.res|^$" \
| ruby -lane 'puts $F[0].match(/(.*).res$/)[1]' \
| sort \
> $1/fullLocaleNames.lst

View file

@ -0,0 +1,11 @@
#!/bin/bash
# Copyright (C) 2016 and later: Unicode, Inc. and others.
# License & terms of use: http://www.unicode.org/copyright.html
# For every directory in the locale data files, the Ant build creates a file with the
# names of all locales. Find all such directories and execute the script that replicates
# the logic of generating that file.
#
# Command is intended to run from the root of the directory of the Maven submodule project
# in which the shaded/assembly/uberjar is being created (ex: for the `icu4j` artifact).
find target/classes/com/ibm/icu/impl/data/* -type d -exec ./create-fullLocaleNames.sh {} \;

View file

@ -0,0 +1,336 @@
<?xml version="1.0"?>
<!--
* © 2016 and later: Unicode, Inc. and others.
* License & terms of use: http://www.unicode.org/copyright.html
*******************************************************************************
* Copyright (C) 2010-2016, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
-->
<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">
<parent>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-root</artifactId>
<version>73.1-SNAPSHOT</version>
<!-- default relativePath for parent -->
</parent>
<modelVersion>4.0.0</modelVersion>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>73.1-SNAPSHOT</version>
<packaging>jar</packaging>
<name>ICU4J</name>
<description>International Component for Unicode for Java (ICU4J) is a mature, widely used Java library providing Unicode and Globalization support</description>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<executions>
<!-- add directories with main executable code -->
<execution>
<id>add-source</id>
<goals>
<goal>add-source</goal>
</goals>
<configuration>
<sources>
<source>../../main/classes/collate/src</source>
<source>../../main/classes/core/src</source>
<source>../../main/classes/currdata/src</source>
<source>../../main/classes/langdata/src</source>
<source>../../main/classes/regiondata/src</source>
<source>../../main/classes/translit/src</source>
</sources>
</configuration>
</execution>
<!-- add directories with test code -->
<execution>
<id>add-test-source</id>
<goals>
<goal>add-test-source</goal>
</goals>
<configuration>
<sources>
<source>../../main/tests/collate/src</source>
<source>../../main/tests/core/src</source>
<source>../../main/tests/framework/src</source>
<source>../../main/tests/packaging/src</source>
<source>../../main/tests/translit/src</source>
<source>../../tools/misc/src</source>
</sources>
</configuration>
</execution>
<!-- add directories with main executable resources -->
<execution>
<id>add-resource</id>
<goals>
<goal>add-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>../../main/classes/collate/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../main/classes/core/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../main/classes/currdata/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../main/classes/langdata/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../main/classes/regiondata/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../main/classes/translit/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
<!-- add directories with test resources -->
<execution>
<id>add-test-resource</id>
<goals>
<goal>add-test-resource</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>../../main/tests/collate/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../main/tests/core/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../main/tests/framework/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../main/tests/packaging/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../main/tests/translit/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
<resource>
<directory>../../tools/misc/src</directory>
<excludes>
<exclude>**/*.java</exclude>
</excludes>
</resource>
</resources>
</configuration>
</execution>
</executions>
</plugin>
<!--
Extract the resource files from the icu4j-datafiles dependency so that it is available during `test`.
Note: The extraction here will not result in these files being included in the packaged jar.
-->
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<executions>
<execution>
<id>process-remote-resources</id>
<goals>
<goal>process</goal>
</goals>
<configuration>
<resourceBundles>
<resourceBundle>com.ibm.icu:icu4j-datafiles:${icu4j.version}</resourceBundle>
</resourceBundles>
</configuration>
</execution>
</executions>
</plugin>
<!--
Extract and unpack the *.res files from the *.jar files in the upstream depenendency `com.ibm.icu:icu4j-datafiles`.
Enables the creation of *.lst files in the next phase using the helper script.
Use the ./target/classes directory as the output directory so that the files (included generated *.lst files)
get included in the shaded .jar file.
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>unpack-dependencies</id>
<phase>prepare-package</phase>
<goals>
<goal>unpack-dependencies</goal>
</goals>
<configuration>
<includeGroupIds>com.ibm.icu</includeGroupIds>
<!-- exclude test resource files which come through dependencies as `provided` scope -->
<excludeScope>provided</excludeScope>
<excludes>**/*.cnv,**/cnvalias.icu,**/*.jar</excludes>
<outputDirectory>${project.build.directory}/classes</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<!--
Process and transform the resource files before they get packaged up in the .jar file.
-->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<!--
Replicate the creation of fullLocaleNames.lst files in every subdirectory of the dir of copied data
that the Ant build.xml file encodes.
-->
<execution>
<id>full-locale-names</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>./file-listing-helper.sh</executable>
</configuration>
</execution>
<!-- Copy the license file. -->
<execution>
<id>copy-license-file</id>
<phase>prepare-package</phase>
<goals>
<goal>exec</goal>
</goals>
<configuration>
<executable>cp</executable>
<arguments>
<argument>../../../icu4c/LICENSE</argument>
<argument>${project.build.directory}/classes</argument>
</arguments>
</configuration>
</execution>
</executions>
</plugin>
<!--
Enable configuration of the Manifest file, etc. during the process of packaging the .jar file.
For future reference: https://stackoverflow.com/questions/38548271/difference-between-maven-plugins-assembly-plugins-jar-plugins-shaded-plugi
-->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<configuration>
<archive>
<manifestEntries>
<X-Compile-Source-JDK>${maven.compiler.source}</X-Compile-Source-JDK>
<X-Compile-Target-JDK>${maven.compiler.target}</X-Compile-Target-JDK>
<Specification-Title>${jar.spec.title}</Specification-Title>
<Specification-Version>${jar.spec.version}</Specification-Version>
<Specification-Vendor>${jar.spec.vendor}</Specification-Vendor>
<Implementation-Title>${jar.impl.title}</Implementation-Title>
<Implementation-Version>${jar.impl.version}</Implementation-Version>
<Implementation-Vendor>${jar.impl.vendor}</Implementation-Vendor>
<Implementation-Vendor-Id>${jar.impl.vendor.id}</Implementation-Vendor-Id>
<Bundle-ManifestVersion>${jar.manifest.version}</Bundle-ManifestVersion>
<Bundle-Name>${jar.name}</Bundle-Name>
<Bundle-Description>${jar.description}</Bundle-Description>
<Bundle-SymbolicName>${jar.symbolic.name}</Bundle-SymbolicName>
<Bundle-Version>${jar.version}</Bundle-Version>
<Bundle-Vendor>${jar.vendor}</Bundle-Vendor>
<Bundle-Copyright>${jar.copyright.info}</Bundle-Copyright>
<!-- TODO: We should remove this, right??? -->
<Main-Class>${jar.main.class}</Main-Class>
</manifestEntries>
</archive>
</configuration>
</plugin>
</plugins>
</build>
<dependencies>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-datafiles</artifactId>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-test-datafiles</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<scope>test</scope>
</dependency>
<!-- this is for parameterized JUnit tests -->
<dependency>
<groupId>pl.pragmatists</groupId>
<artifactId>JUnitParams</artifactId>
<scope>test</scope>
</dependency>
</dependencies>
</project>

363
icu4j/maven-build/pom.xml Normal file
View file

@ -0,0 +1,363 @@
<?xml version="1.0"?>
<!--
* © 2016 and later: Unicode, Inc. and others.
* License & terms of use: http://www.unicode.org/copyright.html
*******************************************************************************
* Copyright (C) 2010-2016, International Business Machines Corporation and *
* others. All Rights Reserved. *
*******************************************************************************
-->
<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.ibm.icu</groupId>
<artifactId>icu4j-root</artifactId>
<version>73.1-SNAPSHOT</version>
<packaging>pom</packaging>
<name>ICU4J Root</name>
<description>
International Component for Unicode for Java (ICU4J) is a mature, widely used Java library
providing Unicode and Globalization support
</description>
<url>https://icu.unicode.org/</url>
<inceptionYear>2001</inceptionYear>
<licenses>
<license>
<name>Unicode/ICU License</name>
<url>https://raw.githubusercontent.com/unicode-org/icu/main/icu4c/LICENSE</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>macchiati</id>
<name>Mark Davis</name>
<organization>Google</organization>
<roles>
<role>PMC Member</role>
</roles>
</developer>
<developer>
<id>JCEmmons</id>
<name>John Emmons</name>
<organization>IBM Corporation</organization>
<roles>
<role>PMC Member</role>
</roles>
</developer>
<developer>
<id>dougfelt</id>
<name>Doug Felt</name>
<organization>Google</organization>
<roles>
<role>PMC Member</role>
</roles>
</developer>
<developer>
<id>deborah</id>
<name>Deborah Goldsmith</name>
<organization>Apple</organization>
<roles>
<role>PMC Member</role>
</roles>
</developer>
<developer>
<id>srl295</id>
<name>Steven Loomis</name>
<organization>IBM Corporation</organization>
<roles>
<role>PMC Member</role>
</roles>
</developer>
<developer>
<id>markusicu</id>
<name>Markus Scherer</name>
<organization>Google</organization>
<roles>
<role>PMC Member</role>
</roles>
</developer>
<developer>
<id>pedberg</id>
<name>Peter Edberg</name>
<organization>Apple</organization>
<roles>
<role>PMC Member</role>
</roles>
</developer>
<developer>
<id>yumaoka</id>
<name>Yoshito Umaoka</name>
<organization>IBM Corporation</organization>
<roles>
<role>PMC Member</role>
</roles>
</developer>
</developers>
<mailingLists>
<mailingList>
<name>icu-support</name>
<subscribe>https://lists.sourceforge.net/lists/listinfo/icu-support</subscribe>
<unsubscribe>https://lists.sourceforge.net/lists/listinfo/icu-support</unsubscribe>
<post>icu-support@lists.sourceforge.net</post>
<archive>http://sourceforge.net/mailarchive/forum.php?forum_name=icu-support</archive>
</mailingList>
<mailingList>
<name>icu-announce</name>
<subscribe>https://lists.sourceforge.net/lists/listinfo/icu-announce</subscribe>
<unsubscribe>https://lists.sourceforge.net/lists/listinfo/icu-announce</unsubscribe>
<post>icu-announce@lists.sourceforge.net</post>
<archive>http://sourceforge.net/mailarchive/forum.php?forum_name=icu-announce</archive>
</mailingList>
<mailingList>
<name>icu-design</name>
<subscribe>https://lists.sourceforge.net/lists/listinfo/icu-design</subscribe>
<unsubscribe>https://lists.sourceforge.net/lists/listinfo/icu-design</unsubscribe>
<post>icu-design@lists.sourceforge.net</post>
<archive>http://sourceforge.net/mailarchive/forum.php?forum_name=icu-design</archive>
</mailingList>
</mailingLists>
<scm>
<connection>scm:git:git://github.com/unicode-org/icu.git</connection>
<developerConnection>scm:git:git@github.com:unicode-org/icu.git</developerConnection>
<url>https://github.com/unicode-org/icu</url>
</scm>
<issueManagement>
<system>JIRA</system>
<url>https://unicode-org.atlassian.net/projects/ICU</url>
</issueManagement>
<distributionManagement>
<repository>
<id>icu4j-releases</id>
<name>ICU4J Central Repository</name>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2</url>
</repository>
<snapshotRepository>
<id>icu4j-snapshots</id>
<name>ICU4J Central Development Repository</name>
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
</snapshotRepository>
</distributionManagement>
<properties>
<!--
Main ICU4J version number.
Note: This version string must also be repeated in <version> of this root pom.xml above.
Note: Keep the `jar.spec.version` number in sync with this value, too.
-->
<icu4j.version>73.1-SNAPSHOT</icu4j.version>
<!-- ICU4J currently builds with Java 8 sources -->
<maven.compiler.source>1.8</maven.compiler.source>
<!-- Keep the target class file versions consistent with the source file version -->
<maven.compiler.target>1.8</maven.compiler.target>
<!-- The encoding / encoding form of the source files -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- ICU4J currently builds with Java 8 sources -->
<maven.compiler.source>1.8</maven.compiler.source>
<!-- Keep the target class file versions consistent with the source file version -->
<maven.compiler.target>1.8</maven.compiler.target>
<!-- The encoding / encoding form of the source files -->
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<!-- Specification-Title -->
<jar.spec.title>International Components for Unicode for Java</jar.spec.title>
<!-- Specification-Version -->
<jar.spec.version>73</jar.spec.version>
<!-- Specification-Vendor -->
<jar.spec.vendor>Unicode, Inc.</jar.spec.vendor>
<!-- Implementation-Title -->
<jar.impl.title>International Components for Unicode for Java</jar.impl.title>
<!-- Implementation-Version -->
<jar.impl.version>${icu4j.version}</jar.impl.version>
<!-- Implementation-Vendor -->
<jar.impl.vendor>Unicode, Inc.</jar.impl.vendor>
<!-- Implementation-Vendor-Id -->
<jar.impl.vendor.id>org.unicode</jar.impl.vendor.id>
<!-- Bundle-ManifestVersion -->
<jar.manifest.version>2</jar.manifest.version>
<!-- Bundle-Name -->
<jar.name>${project.name}</jar.name>
<!-- Bundle-Description -->
<jar.description>${project.name}</jar.description>
<!-- Bundle-SymbolicName -->
<jar.symbolic.name>${project.groupId}</jar.symbolic.name>
<!-- Bundle-Version -->
<jar.version>${project.version}</jar.version>
<!-- Bundle-Vendor -->
<jar.vendor>Unicode, Inc.</jar.vendor>
<!-- Bundle-Copyright -->
<jar.copyright.info>&#169; 2016 and later: Unicode, Inc. and others. License &#38; terms of use: http://www.unicode.org/copyright.html</jar.copyright.info>
<!-- Main-Class -->
<jar.main.class>com.ibm.icu.util.VersionInfo</jar.main.class>
</properties>
<!--
Note: the .jar files in ./local-maven-repo are copies of the files at
icu4j/main/shared/data/*.jar
-->
<!--
Note: this overall solution of a local filesystem repository is based on the
answer here: https://stackoverflow.com/a/28762617/2077918
The directory structure and files were created using the `mvn install-file` command,
with the copied .jar files being replaced by symlinks to avoid duplicating files on
developers' local filesystems.
Ex: for version 73.1-SNAPSHOT, when running the current directory (<ICU>/icu4j/maven-build):
```
mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file \
-Dfile=../main/shared/data/icudata.jar \
-DgroupId=com.ibm.icu -DartifactId=icudata \
-Dversion=73.1-SNAPSHOT -Dpackaging=jar \
-DlocalRepositoryPath=./local-maven-repo \
-DgeneratePom=true
mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file \
-Dfile=../main/shared/data/icutzdata.jar \
-DgroupId=com.ibm.icu -DartifactId=icutzdata \
-Dversion=73.1-SNAPSHOT -Dpackaging=jar \
-DlocalRepositoryPath=./local-maven-repo \
-DgeneratePom=true
mvn org.apache.maven.plugins:maven-install-plugin:2.5.2:install-file \
-Dfile=../main/shared/data/testdata.jar \
-DgroupId=com.ibm.icu -DartifactId=testdata \
-Dversion=73.1-SNAPSHOT -Dpackaging=jar \
-DlocalRepositoryPath=./local-maven-repo \
-DgeneratePom=true
```
-->
<modules>
<module>maven-icu4j</module>
<module>maven-icu4j-datafiles</module>
<module>maven-icu4j-charset</module>
<module>maven-icu4j-localespi</module>
<module>maven-icu4j-test-datafiles</module>
</modules>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.8.1</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>build-helper-maven-plugin</artifactId>
<version>3.2.0</version>
</plugin>
<plugin>
<artifactId>maven-surefire-plugin</artifactId>
<version>2.22.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>3.3.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>3.0.0-M7</version>
</plugin>
<plugin>
<artifactId>maven-remote-resources-plugin</artifactId>
<version>3.0.0</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>3.1.0</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.12</version>
<scope>test</scope>
</dependency>
<!-- this is for parameterized JUnit tests -->
<dependency>
<groupId>pl.pragmatists</groupId>
<artifactId>JUnitParams</artifactId>
<version>1.0.5</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-datafiles</artifactId>
<version>${icu4j.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j-test-datafiles</artifactId>
<version>${icu4j.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icu4j</artifactId>
<version>${icu4j.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icudata</artifactId>
<version>${icu4j.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>icutzdata</artifactId>
<version>${icu4j.version}</version>
</dependency>
<dependency>
<groupId>com.ibm.icu</groupId>
<artifactId>testdata</artifactId>
<version>${icu4j.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
</project>