war not starting
Closed this issue · 0 comments
phobrain commented
I tried a dropin replacement for simple jetty due to gradle4, but my war file isn't started, and the site just says Under Construction. The only thing that's changed config-wise is the gretty lines below, and the date on the resulting war file, as well as code within the war. I think I had it working with slightly different magic, before I lost a hard drive. Same result with gradle 2.10 and 4.5.1, Java(TM) SE Runtime Environment (build 1.8.0_161-b12).
UPDATE: disk migration had log going to unexpected place, Stdout println can be your friend. Underlying issue was a missing resource.
apply plugin: 'war'
//apply plugin: 'jetty'
apply from: 'https://raw.github.com/akhikhl/gretty/master/pluginScripts/gretty.plugin'
war {
archiveName = 'pr.war' // expt.html: var servletRoot = "/pr";
webXml = file('src/web.xml') // copies to WEB-INF/web.xml
}
# added
gretty {
webXml = file('src/web.xml') // copies to WEB-INF/web.xml
servletContainer = 'jetty9'
httpPort = 8080
}
My run script:
java -jar ./jetty-distribution-9.4.6.v20170531/start.jar \
jetty.home=./jetty-distribution-9.4.6.v20170531 \
jetty.base=./jetty-base
Where jetty-base has e.g. war and other files:
./jetty-base/webapps/pr.war
./jetty-base/webapps/ROOT
./jetty-base/webapps/ROOT/index.html
./jetty-base/webapps/pr.xml
./jetty-base/resources/jetty-logging.properties
./jetty-base/resources/logback.xml
./jetty-base/lib/ext/c3p0-0.9.1.2.jar
./jetty-base/lib/ext/postgresql-9.4-1203.jdbc42.jar
Logging to stdout:
...
INFO: Initializing c3p0 pool... [ ... ]