diff --git a/icu4j/maven-migration/README_MAVEN.md b/icu4j/maven-migration/README_MAVEN.md index 2adf4d1fff81..9023b3e59213 100644 --- a/icu4j/maven-migration/README_MAVEN.md +++ b/icu4j/maven-migration/README_MAVEN.md @@ -20,7 +20,7 @@ checkout ``, and run script from where you copied it. Probably modify the step that produces the .jar files (in the C/C++ world) - done: The tests for localespi should become integration tests - We might want some integration tests to begin with -- `LICENSE`, `security.policy`, anything else from `main/shared/` => LICENSE should be symlink. +- done: `LICENSE`, `security.policy`, anything else from `main/shared/` => LICENSE should be symlink. - done: The `.lst` files. All tests pass without, we can probably delete them. But need more testing. If not, we need a way to generate them (right now I've copied them by hand) - Double-check dependencies. diff --git a/icu4j/maven-migration/main/charset/pom.xml b/icu4j/maven-migration/main/charset/pom.xml index 9280007fc300..630350a957e2 100644 --- a/icu4j/maven-migration/main/charset/pom.xml +++ b/icu4j/maven-migration/main/charset/pom.xml @@ -15,7 +15,8 @@ ${project.basedir}/../.. - com.ibm.icu.charset + charset + charset @@ -55,4 +56,19 @@ + + + + maven-jar-plugin + + + + com.ibm.icu.charset + + + + + + + diff --git a/icu4j/maven-migration/main/core/pom.xml b/icu4j/maven-migration/main/core/pom.xml index 849205595a1f..69db25d3a967 100644 --- a/icu4j/maven-migration/main/core/pom.xml +++ b/icu4j/maven-migration/main/core/pom.xml @@ -53,6 +53,16 @@ + + maven-jar-plugin + + + + com.ibm.icu.util.VersionInfo + + + + diff --git a/icu4j/maven-migration/main/framework/pom.xml b/icu4j/maven-migration/main/framework/pom.xml index e3eec4f8a61f..aee519f4c95a 100644 --- a/icu4j/maven-migration/main/framework/pom.xml +++ b/icu4j/maven-migration/main/framework/pom.xml @@ -39,7 +39,18 @@ + + maven-jar-plugin + + + + com.ibm.icu.dev.test.TestAll + + + + + diff --git a/icu4j/maven-migration/main/icu4j/pom.xml b/icu4j/maven-migration/main/icu4j/pom.xml index 461d8a512e47..c01d56d1eec2 100644 --- a/icu4j/maven-migration/main/icu4j/pom.xml +++ b/icu4j/maven-migration/main/icu4j/pom.xml @@ -16,6 +16,14 @@ ${project.basedir}/../.. + + com.ibm.icu + com.ibm.icu + ICU4J + International Components for Unicode for Java + ${localTitle} + ${localTitle} + ${localTitle} @@ -71,6 +79,17 @@ + + maven-jar-plugin + + + + com.ibm.icu.util.VersionInfo + com.ibm.icu.lang,com.ibm.icu.math,com.ibm.icu.number,com.ibm.icu.text,com.ibm.icu.util + + + + diff --git a/icu4j/maven-migration/pom.xml b/icu4j/maven-migration/pom.xml index 7c68b125cbb6..e3bf992fab49 100644 --- a/icu4j/maven-migration/pom.xml +++ b/icu4j/maven-migration/pom.xml @@ -39,34 +39,40 @@ International Components for Unicode for Java ${project.artifactId} - 1.0 - ${proj-title} (${proj.displayname}) - ${proj-title} (${proj.displayname}) - ${proj-title} (${proj.displayname}) - com.ibm.icu.${project.artifactId} - - 73 Release Candidate + 74 Release Candidate ICU4J ${api.doc.version} ICU4J ${api.doc.version} <font size=-1>Copyright © 2016 Unicode, Inc. and others.</font> ${project.basedir} - 73 - 73.0.1 - 73.0.1 + + + 74 + 74.0.1 + 74.0.1 + + JavaSE-1.8 + + + ${project.artifactId} + + + ${proj-title} (${proj.displayname}) + ${proj-title} (${proj.displayname}) + ${proj-title} (${proj.displayname}) + com.ibm.icu.${module-name} + com.ibm.icu.${module-name} + ICU4J ${proj.displayname} Unicode, Inc. Unicode, Inc. Unicode, Inc. org.unicode + 1.0 2 - ICU4J ${proj.displayname} - - com.ibm.icu.${project.artifactId} © 2016 and later: Unicode, Inc. and others. License & terms of use: http://www.unicode.org/copyright.html - JavaSE-1.8 diff --git a/icu4j/maven-migration/toMaven.sh b/icu4j/maven-migration/toMaven.sh index 2008871a58e8..0611f654ba51 100755 --- a/icu4j/maven-migration/toMaven.sh +++ b/icu4j/maven-migration/toMaven.sh @@ -148,11 +148,14 @@ function mainModuleToMaven() { echo "Migrating $1 to maven" moveMainModuleToMaven $1 classes main moveMainModuleToMaven $1 tests test + mkdir -p main/$MODULE_NAME/src/main/resources/ + ln -s ../../../../../../LICENSE main/$MODULE_NAME/src/main/resources/LICENSE } function simpleModuleToMaven() { # 1. $1: component name (core, charset, etc) export MODULE_NAME=$1 + export LICENSE_PATH=$2 echo "Migrating $MODULE_NAME to maven" safeMoveDir com $MODULE_NAME/src $MODULE_NAME/src/main/java @@ -160,6 +163,9 @@ function simpleModuleToMaven() { removeEclipseProjectFiles $MODULE_NAME + mkdir -p $MODULE_NAME/src/main/resources/ + ln -s $LICENSE_PATH $MODULE_NAME/src/main/resources/LICENSE + echo " Remove empty folders from '$MODULE_NAME'" removeEmptyFolders $MODULE_NAME } @@ -231,15 +237,15 @@ function moveCircDepTestOutOfCore() { # =============================================================== # Here starts the real script execution +if [ -f "main/core/pom.xml" ]; then + echo "ERROR: looks like the structure was already migrated to maven?" + exit +fi if [ ! -f "main/classes/core/build.xml" ]; then echo "ERROR: the current folder when running this script should be /icu4j" echo "It is currently $PWD." exit fi -if [ -f "main/core/pom.xml" ]; then - echo "ERROR: looks like the structure was already migrated to maven?" - exit -fi MVN_MIG_DIR="$(dirname "${BASH_SOURCE[0]}")" @@ -269,10 +275,10 @@ mainModuleToMaven framework echo "====================================" echo "==== Migrating the root modules ====" echo "====================================" -simpleModuleToMaven demos -simpleModuleToMaven samples -simpleModuleToMaven tools/build -simpleModuleToMaven tools/misc +simpleModuleToMaven demos ../../../../../LICENSE +simpleModuleToMaven samples ../../../../../LICENSE +simpleModuleToMaven tools/build ../../../../../../LICENSE +simpleModuleToMaven tools/misc ../../../../../../LICENSE echo "=================================================================================" echo "==== Moving core unit tests that depend on non-core (circular dependencies) =====" diff --git a/icu4j/maven-migration/tools/misc/pom.xml b/icu4j/maven-migration/tools/misc/pom.xml index 766ebcaf251a..913598bb1f19 100644 --- a/icu4j/maven-migration/tools/misc/pom.xml +++ b/icu4j/maven-migration/tools/misc/pom.xml @@ -31,4 +31,19 @@ + + + + maven-jar-plugin + + + + com.ibm.icu.dev.tool.localeconverter.XLIFF2ICUConverter + + + + + + +