Setup your maven environment’s .m2/settings.xml
as per CLDR instructions. You don’t need to actually need to download or build CLDR itself.
Run mvn -am -pl UnicodeJsps package -DskipTests
at the root directory of the repository to build the JSPs.
UnicodeJsps can be imported into eclipse using the Import->existing maven project menu option. If you already have UnicodeJsps
in eclipse, it might be better to remove it from eclipse before the import.
mvn -DCLDR_DIR=/path/to/cldr -DUNICODETOOLS_REPO_DIR=/path/to/unicodetools org.eclipse.jetty:jetty-maven-plugin:run
If port 8080 is in use, another port can be specified with -Djetty.port=⟨port number⟩
.
The following system properties described in Building Unicode Tools must be set in order for the JSPs to function properly: CLDR_DIR
, UNICODETOOLS_REPO_DIR
; this can be done with -DCLDR_DIR=⟨some path⟩ -DUNICODETOOLS_REPO_DIR=.
.
You can now connect to http://127.0.0.1:8080 as suggested from the command line. Use Control-C to stop the server.
Note: this used to be
mvn jetty:run
but a more verbose command is needed at present.
This screenshot shows creating a org.eclipse.jetty:jetty-maven-plugin:run
maven run configuration.
Note: Please change the Goal to
org.eclipse.jetty:jetty-maven-plugin:run
instead ofjetty:run
Jetty provides instructions here for debugging within eclipse. It is unknown whether this has been attempted with the UnicodeJsps.
org.unicode.tools.UpdateJspFiles
This will copy a number of files from the unicodetools to the Jsp directory. The items it doesn't cover are discussed below.
{$workspace}/unicodetools/data/emoji/\<VERSION\>
Other files:
Files to investigate
Go to XPropertyFactory.java
to add new properties other than the ones in /props/
In org.unicode.text.Settings, set latestVersionPhase
to BETA
.
Build & Test
mvn test
:construction: TODO: These need a lot of work; they mostly print out a lot of gorp that you need to scan over.
Run the server (see above)
Look at http://localhost:8080/UnicodeJsps/properties.jsp, and make sure that there aren‘t any Z-Other props at the bottom (you’ll need to update via Adding New Properties if there are).
compile java stuff
mvn -B package -am -pl UnicodeJsps -DskipTests=true
make a copy of CLDR - lots of ways to do this. --reference-if-able ~/src/cldr
is another directory on my disk which has a copy of CLDR, to save copying. The CLDR_REF calculation is to make sure you have the same CLDR version as the build.
git clone https://github.com/unicode-org/cldr.git --reference-if-able ~/src/cldr CLDR_REF=$(mvn help:evaluate -Dexpression=cldr.version -q -DforceStdout | cut -d- -f3) (cd cldr ; git reset --hard ${CLDR_REF}) mkdir -p UnicodeJsps/target && tar -cpz --exclude=.git -f UnicodeJsps/target/cldr-unicodetools.tgz ./cldr/ ./unicodetools/
Now, finally build.
docker build -t unicode/unicode-jsp:latest UnicodeJsps/
… And run. Control-C to cancel it, otherwise visit http://127.0.0.1:8080
docker run --rm -p 8080:8080 unicode/unicode-jsp:latest
When it is time to push a new version of the JSPs and tools, it is time to make a “release”. A release is a snapshot of the entire repository, including all Unicode Tools.
Go to the UnicodeTools repository release page at https://github.com/unicode-org/unicodetools/releases
Draft a New ReleaseClick the button,
Now, go to the (A) Actions tab in GitHub, and click on the (B) “Push to GCR Github Action” workflow. (see illustration)