Getting XProc-Z up and running on localhost (OSX)
Some things I had to take into account (on OS X v10.11 with JDK 1.8 installed):
Prerequisite: Apache Tomcat
- installing Tomcat, e.g. according to this instruction
- initially this failed with
javax.net.ssl.SSLHandshakeException: sun.security.validator.ValidatorException: PKIX path building failed: sun.security.provider.certpath.SunCertPathBuilderException: unable to find valid certification path to requested target
- this was resolved by downloading
hsivonen.fi.cer
and executing
keytool -import -file hsivonen.fi.cer -alias validator.nu -keystore /Library/Java/JavaVirtualMachines/jdk1.8.0_66.jdk/Contents/Home/jre/lib/security/cacerts
- after adding the certificate to the keystore building with
ant
is successful
two more steps are needed to run XProc-Z on http://localhost:8080/xproc-z/ (Tomcat default port):
- move
dist/xproc-z.war
to/Library/Tomcat/Webapps
- start Tomcat (
sudo /Library/Tomcat/bin/startup.sh
)
- links in the Tomcat Manager are relatively strictly URL encoded; loading the application as http://localhost:8080/xproc%2Dz/ leads to problems; however all works fine with http://localhost:8080/xproc-z/
- similarly, the trailing slash is needed
- the
war
deployment is good for production, but cumbersoe for development; can Tomcat be used to serve frombuild/webapp/xproc
directly? Or is this easier with e.g. Jetty?