sane-city / wot-servient

W3C Web of Things implementation for Java
MIT License
29 stars 5 forks source link

wot-servient-cli/bin/wot-servient not working #4

Closed ajs124 closed 3 years ago

ajs124 commented 4 years ago

Hey, I'm trying to test this WoT servient implementation, but I'm running into some issues.

The first thing I noticed is that the wot-servient script in wot-servient-cli/bin doesn't seem to work on my system.

It fails like this:

Error: Could not find or load main class city.sane.wot.cli.Cli
Caused by: java.lang.ClassNotFoundException: city.sane.wot.cli.Cli

What does work is something like

cd wot-servient-cli/target/classes/
java -cp $(ls ../lib/*|tr '\n' ':') city.sane.wot.cli.Cli

I'm not sure what might be the cause of this, but my maven and java versions are this:

Apache Maven 3.6.3 (cecedd343002696d0abb50b32b541b8a6ba2883f)
Maven home: /nix/store/8b9z89kxpyxdgxldcslwhmfpy17cwwba-apache-maven-3.6.3/maven
Java version: 12.0.2-internal, vendor: N/A, runtime: /nix/store/b1cfagrdj8w62nijgnvwpzqjmpgfsac7-openjdk-headless-12.0.2-ga/lib/openjdk
Default locale: en_US, platform encoding: ANSI_X3.4-1968
OS name: "linux", version: "5.4.60", arch: "amd64", family: "unix"
HeikoBornholdt commented 4 years ago

Hi!

These two files require a lib directory with all Java classes. See the attachment:

Bildschirmfoto 2020-08-27 um 01 16 52

You can use Maven (mvn -DskipTests package) to create a zip archive under wot-servient-cli/target/wot-servient-1.15-SNAPSHOT.zip with all required files.