Checking out the CLDR Archive
A number of the tools in CLDR depend on access to older versions. These tools include:
- Generating Charts
- Update Validity XML
- Updating English/Root
- [Note: add others when we find them]
- Some tests
- TestCompatibility.java
- TestTransforms.java
- TestValidity.java
- Some other tools (typically when given a version argument on the command line)
- FindPluralDifferences
- β¦
Hereβs how to do that.
- Create an archive directory cldr-archive. The Simplest is if it on the same level as your local CLDR repository. In other words, if your CLDR_DIR is β¦/workspace/cldr, then create the directory β¦/workspace/cldr-archive
(Note: The Java property ARCHIVE can be used to overide the path to cldr-archive). - Open up ToolConstants.java and look at ToolConstants.CLDR_VERSIONS. Youβll see something like:
- public static final List<String> CLDR_VERSIONS = ImmutableList.of(
- β1.1.1β,
- β1.2β,
- β1.3β,
- β1.4.1β,
- β1.5.1β,
- β1.6.1β,
- β1.7.2β,
- β1.8.1β,
- β¦
- β41.0β
- // add to this once the release is final!
- );
- NOTE: this should also match CldrVersion.java (those two need to be merged together)
- Add the just-released version, such as β42.0β to the list above
- Also update DEV_VERSION to β43β (the next development version)
- Finally, update CldrVersion.java and make similar changes.
- Now, run the tool org.unicode.cldr.tool.CheckoutArchive
- Or from the command line:
mvn -DCLDR_DIR= path_to/cldr --file=tools/pom.xml -pl cldr-code compile -DskipTests=true exec:java -Dexec.mainClass=org.unicode.cldr.tool.CheckoutArchive -Dexec.args=ββ - Note other options for this tool: --help will give help --prune will run a βgit workspace pruneβ before proceeding --echo will just show the commands that would be run, without running anything (For example, -Dexec.args=β--pruneβ in the above command line)
- Or from the command line:
The end result (where you need all of the releases) looks something like the following:
Advanced Configuration
- You can set the property -DCLDR_ARCHIVE to point to a different parent directory for the archive
- You can set -DCLDR_HAS_ARCHIVE=false to tell unit tests and tools not to look for the archive