deploying this specific war
file to jetty
is somewhat awkward:
nicholas@mordor:~/NetBeansProjects/x$
nicholas@mordor:~/NetBeansProjects/x$ sudo cp build/libs/x.war /var/lib/jetty9/webapps/ -v
'build/libs/x.war' -> '/var/lib/jetty9/webapps/x.war'
nicholas@mordor:~/NetBeansProjects/x$
nicholas@mordor:~/NetBeansProjects/x$ lynx localhost:8081/x --dump
fron netbeans
nicholas@mordor:~/NetBeansProjects/x$
nicholas@mordor:~/NetBeansProjects/x$ cp build/libs/x.war /var/lib/jetty9/webapps/ -v
'build/libs/x.war' -> '/var/lib/jetty9/webapps/x.war'
cp: cannot create regular file '/var/lib/jetty9/webapps/x.war': Permission denied
nicholas@mordor:~/NetBeansProjects/x$
nicholas@mordor:~/NetBeansProjects/x$ uname -a
Linux mordor 5.11.0-25-generic #27-Ubuntu SMP Fri Jul 9 23:06:29 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
nicholas@mordor:~/NetBeansProjects/x$
So, tried as:
nicholas@mordor:~/NetBeansProjects/x$
nicholas@mordor:~/NetBeansProjects/x$ java -jar /usr/share/jetty9/start.jar build/libs/x.war
ERROR : Unrecognized argument: "build/libs/x.war" in <command-line>
Usage: java -jar $JETTY_HOME/start.jar [options] [properties] [configs]
java -jar $JETTY_HOME/start.jar --help # for more information
nicholas@mordor:~/NetBeansProjects/x$
nicholas@mordor:~/NetBeansProjects/x$ echo $JETTY_HOME
nicholas@mordor:~/NetBeansProjects/x$
I would expect apt
to somewhat configure the environment a bit more when installing jetty
.
1.) what should $JETTY_HOME
get set to?
2.) how should it be set so that the environment variable
persists?
Hmm, not seeing a jetty-runner.jar
file from dpkg
to run a war
file as it's no longer part of jetty
itself but must be compiled separately.
What's a work-around to deploy a war
file without resorting to sudo
?