Client application for setting workstation statuse to the Workstation Tracking server application.
- Java 8
- Apache Maven 3.8.1 or later
Java 8 is used for compilation, because Java 7 is no longer capable of downloading the Maven dependencies from the canonical on-line repositories (it lacks the necessary TLS protocols).
The compiliation process is configured (in the "pom.xml" file) to generate Java 7 bytecode, and so should be compatible with Java 7 or later runtimes.
To build the client (from the "client/" subdirectory):
$ mvn clean install
This will create a .jar file in
./target/wstrack-client-{VERSION}-jar-with-dependencies.jar
where {VERSION} is the current version (from the pom.xml file).
To deploy the client package used by the workstations to Nexus (from the "client/" subdirectory):
$ mvn clean install
$ mvn deploy
The deployment to the Nexus will include a "dist" Zip file, containing the scripts and jar file needed on the workstation. The URL for the Zip file will have the format:
https://maven.lib.umd.edu/nexus/repository/releases/edu/umd/lib/wstrack/client/wstrack-client/<VERSION>/wstrack-client-<VERSION>-dist.zip
where <VERSION> is the version of the distribution.
Note: Snapshot distributions will has an additional timestamp as part of the Zip filename. Access the Nexus to determine the Zip file name, if needed.
-
Build the client application:
$ mvn clean install
-
Switch into the "script" directory:
$ cd script
-
Replace the "wstrack-client.jar" symbolic link with a link to the jar file generated by Maven:
$ rm wstrack-client.jar $ ln -s ../target/wstrack-client-{VERSION}-jar-with-dependencies.jar wstrack-client.jar
where {VERSION} is the current version (from the pom.xml file).
-
To trigger an update to the local "wstrack" server application:
$ ./wstrack-client.sh login local true
The "script/wstrack-client.sh" is used in local develoment to trigger an update on the "wstrack" server application.
The script takes three arguments:
$ wstrack-client <status> [environment] [debug]
The "status" argument is required, indicates whether the workstation status is either of the following values:
- login
- logout
The "environment" argument is optional, and indicates the server to contact, with the default value being "local", to contact a "wstrack" server running on the current host. The list of allowed values at:
- prod - communicates with https://wstrack.lib.umd.edu/track
- qa - communicates with https://wstrack-qa.lib.umd.edu/track
- test - communicates with https://wstrack-test.lib.umd.edu/track
- local - communicates with http://wstrack-local:3000/track
The "debug" argument is optional, and supports two values:
- true - prints diagnostic information
- false - does not print diagnostic information