|
Name |
|
Date |
Size |
#Lines |
LOC |
| .. | | - | - |
| README.txt | D | 23-Nov-2023 | 3.5 KiB | 102 | 71 |
README.txt
1*********************************************************************
2*** © 2019 and later: Unicode, Inc. and others. ***
3*** License & terms of use: http://www.unicode.org/copyright.html ***
4*********************************************************************
5
6What is this directory and why is it empty?
7-------------------------------------------
8
9This is the root of a local Maven repository which needs to be populated before
10code which uses the CLDR data API can be executed.
11
12To do this, you need to have a local copy of the CLDR project configured on your
13computer and be able able to build the API jar file and copy an existing utility
14jar file. In the examples below it is assumed that $CLDR_ROOT references this
15CLDR release.
16
17Setup
18-----
19
20This project relies on the Maven build tool for managing dependencies and uses
21Ant for configuration purposes, so both will need to be installed. On a Debian
22based system, this should be as simple as:
23
24$ sudo apt-get install maven ant
25
26
27Installing the CLDR API jar
28---------------------------
29
30From this directory:
31
32$ ./install-cldr-jars.sh "$CLDR_DIR"
33
34
35Manually installing the CLDR API jar
36------------------------------------
37
38Only follow these remaining steps if the installation script isn't suitable or
39doesn't work on your system.
40
41To regenerate the CLDR API jar you need to build the "jar" target manually
42using the Ant build.xml file in the "tools/java" directory of the CLDR project:
43
44$ cd "$CLDR_ROOT/tools/java"
45$ ant clean jar
46
47This should result in the cldr.jar file being built into that directory, which
48can then be installed as a Maven dependency as described above.
49
50
51Updating local Maven repository
52-------------------------------
53
54To update the local Maven repository (e.g. to install the CLDR jar) then from
55this directory (lib/) you should run:
56
57$ mvn install:install-file \
58 -Dproject.parent.relativePath="" \
59 -DgroupId=org.unicode.cldr \
60 -DartifactId=cldr-api \
61 -Dversion=0.1-SNAPSHOT \
62 -Dpackaging=jar \
63 -DgeneratePom=true \
64 -DlocalRepositoryPath=. \
65 -Dfile="$CLDR_ROOT/tools/java/cldr.jar"
66
67And if you have updated one of these libraries then from this directory run:
68
69$ mvn dependency:purge-local-repository \
70 -Dproject.parent.relativePath="" \
71 -DmanualIncludes=org.unicode.cldr:cldr-api:jar
72
73After doing this, you should see something like the following list of files in
74this directory:
75
76README.txt <-- this file
77org/unicode/cldr/cldr-api/maven-metadata-local.xml
78org/unicode/cldr/cldr-api/0.1-SNAPSHOT/maven-metadata-local.xml
79org/unicode/cldr/cldr-api/0.1-SNAPSHOT/cldr-api-0.1-SNAPSHOT.pom
80org/unicode/cldr/cldr-api/0.1-SNAPSHOT/cldr-api-0.1-SNAPSHOT.jar
81
82Finally, if you choose to update the version number of the snapshot, then also
83update all the the pom.xml files which reference it (but this is unlikely to be
84necessary).
85
86Troubleshooting
87---------------
88
89While the Maven system should keep the CLDR JAR up to date, there is a chance
90that you may have an out of date JAR installed elsewhere. If you have any
91issues with the JAR not being the expected version (e.g. after making changes)
92then run the above "purge" step again, from this directory.
93
94This should re-resolve the current JAR snapshot from the repository in this
95directory. Having purged the Maven cache, next time you build a project, you
96should see something like:
97
98[exec] Downloading from <xxx>: <url>/org/unicode/cldr/cldr-api/0.1-SNAPSHOT/maven-metadata.xml
99[exec] [INFO] Building jar: <path-to-icu-root>/tools/cldr/cldr-to-icu/target/cldr-to-icu-1.0-SNAPSHOT-jar-with-dependencies.jar
100
101This shows that it has had to re-fetch the JAR file.
102