### Notes for COMPILING WEBSWING # Setup ------------------- ** Need JDK, Maven, Nodejs: cd ext-cli ./get-selfcontained-jdk.sh ./get-selfcontained-mvn.sh ./get-selfcontained-nodejs.sh source ./SETUP-CLI.sh cd ../ Note, if you are not using selfcontained-jdk, then you need to set $JAVA_HOME ** Missing Jars: Webswing tried to download pom/jars from a repository that is no longer available. We have a tar file of those: MISSING-POM-JARS.tar.gz Add them into your maven repository: tar xvzf MISSING-POM-JARS.tar.gz /bin/cp -r MISSING-POM-JARS/* ~/.m2/repository/. # Run the actual compile --------------------------------- ./COMPILE.sh This compiles up the entire webswing project. However, we only need the webswing-server.war file for Greenstone, so at the end of COMPILE, this is copied to the top level folder. Copy that file into the web folder of the Greenstone3 webswing extension if you want to update the extension. # Notes ------------------------------- Note 1: If you are compiling this up outside of your home directory (say /opt/greenstone3-svn/ext/webswing) then you will need a directory: /.Trash-$UID for the 'trash' command-line utility to use COMPILE.sh will prompt you about this and give you the command to use. Explanation: For one of the mvn stages for compiling, it looks to run a npm 'clean' target, before compiling. The clean target uses 'trash', which (if things have previously been run) there there is a directory that needs to be moved to its 'trash folder'. When running in a disk partition that does not contian your /home/ account, then the XDG specification specifies this to be /.Trash-$UID ==== Note 2: Maven downloads and stores a lot of jar and related maven repository files in: /home/$USER/.m2 If compiling on a computer where the disk area for /home is small, consider: export HOME=/tmp/$USER Or some other (ideally local) disk with plenty of disk space tar xvzf MISSING-POM-JARS.tar.gz /bin/cp -r MISSING-POM-JARS/* $HOME/.m2/repo/. cd webswing-20.2.5-gs Maven still needs help with a relocated .m2 directory: mvn -Pbuild,release -Dmaven.repo.local=$HOME/.m2/repo clean mvn -Pbuild,release -Dmaven.repo.local=$HOME/.m2/repo install ==== Note 3: There are some Errors reported when compiling related to generating Javadoc [INFO] [INFO] --- maven-javadoc-plugin:3.0.1:jar (attach-javadocs) @ modpatch-jdk-jsobject --- [ERROR] Error fetching link: /Expanse/research/code-unmanaged/webswing-complete/webswing-encore/webswing/webswing-app-toolkit/target/apidocs/package-list. Ignored it. [INFO] These seem to be benign.