-
Notifications
You must be signed in to change notification settings - Fork 1.9k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
property file passed to start.jar is not read #2719
Comments
that particular syntax is not supported. But you can do this (as you have already noted) ...
now that properties file will be read as properties by start.jar |
Oh, okay. You're right. Thanks for the quick answer. I guess what brought me on the wrong track was some debugging and the observations that Then this is perhaps a potential improvement that can build on the already available foundation in |
closing as already supported. |
Sorry, but property files are not yet supported. |
I think there is some kind of problem here.... consider the following: gregw@pellet: /tmp/test
[2019] java -jar $JETTY_HOME/start.jar
2018-08-21 11:29:25.439:INFO::main: Logging initialized @311ms to org.eclipse.jetty.util.log.StdErrLog
2018-08-21 11:29:25.593:INFO:oejs.Server:main: jetty-9.4.12-SNAPSHOT; built: 2018-08-15T23:30:14.041Z; git: 56afcb96115c6ef3cd9cba896596d380c95a7d46; jvm 10.0.1+10
2018-08-21 11:29:25.613:INFO:oejs.AbstractConnector:main: Started ServerConnector@78ffe6dc{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
2018-08-21 11:29:25.614:INFO:oejs.Server:main: Started @486ms
^C2018-08-21 11:29:28.007:INFO:oejs.AbstractConnector:Thread-10: Stopped ServerConnector@78ffe6dc{HTTP/1.1,[http/1.1]}{0.0.0.0:8080}
gregw@pellet: /tmp/test
[2020] java -jar $JETTY_HOME/start.jar jetty.http.port=8888
2018-08-21 11:30:16.133:INFO::main: Logging initialized @779ms to org.eclipse.jetty.util.log.StdErrLog
2018-08-21 11:30:16.779:INFO:oejs.Server:main: jetty-9.4.12-SNAPSHOT; built: 2018-08-15T23:30:14.041Z; git: 56afcb96115c6ef3cd9cba896596d380c95a7d46; jvm 10.0.1+10
2018-08-21 11:30:16.844:INFO:oejs.AbstractConnector:main: Started ServerConnector@192011f4{HTTP/1.1,[http/1.1]}{0.0.0.0:8888}
2018-08-21 11:30:16.847:INFO:oejs.Server:main: Started @1492ms
^C2018-08-21 11:30:18.791:INFO:oejs.AbstractConnector:Thread-10: Stopped ServerConnector@192011f4{HTTP/1.1,[http/1.1]}{0.0.0.0:8888}
gregw@pellet: /tmp/test
[2021] java -jar $JETTY_HOME/start.jar jetty.http.port=8888 --list-config
Java Environment:
[ ... snip ... ]
Properties:
-----------
java.version = 10.0.1
java.version.major = 10
java.version.micro = 1
java.version.minor = 0
java.version.platform = 10
jetty.base = /tmp/test
jetty.base.uri = file:///tmp/test
jetty.home = /usr/local/home/gregw/src/jetty-9.4.x/jetty-home/target/jetty-home
jetty.home.uri = file:///usr/local/home/gregw/src/jetty-9.4.x/jetty-home/target/jetty-home
jetty.http.port = 8888
[... snip ...]
gregw@pellet: /tmp/test
[2022] echo jetty.http.port=8888 > config.properties
gregw@pellet: /tmp/test
[2023] java -jar $JETTY_HOME/start.jar config.properties --list-config
Java Environment:
[... snip ...]
Properties:
-----------
java.version = 10.0.1
java.version.major = 10
java.version.micro = 1
java.version.minor = 0
java.version.platform = 10
jetty.base = /tmp/test
jetty.base.uri = file:///tmp/test
jetty.home = /usr/local/home/gregw/src/jetty-9.4.x/jetty-home/target/jetty-home
jetty.home.uri = file:///usr/local/home/gregw/src/jetty-9.4.x/jetty-home/target/jetty-home
[... snip ...]
gregw@pellet: /tmp/test
[2024] java -jar $JETTY_HOME/start.jar config.properties
2018-08-21 11:31:02.449:INFO::main: Logging initialized @337ms to org.eclipse.jetty.util.log.StdErrLog
2018-08-21 11:31:02.593:INFO:oejs.Server:main: jetty-9.4.12-SNAPSHOT; built: 2018-08-15T23:30:14.041Z; git: 56afcb96115c6ef3cd9cba896596d380c95a7d46; jvm 10.0.1+10
2018-08-21 11:31:02.613:INFO:oejs.AbstractConnector:main: Started ServerConnector@78ffe6dc{HTTP/1.1,[http/1.1]}{0.0.0.0:8888}
2018-08-21 11:31:02.614:INFO:oejs.Server:main: Started @502ms
^C2018-08-21 11:31:05.581:INFO:oejs.AbstractConnector:Thread-10: Stopped ServerConnector@78ffe6dc{HTTP/1.1,[http/1.1]}{0.0.0.0:8888}
So the property file appears to be working, but it is impossible to see that in --list-configs |
Signed-off-by: Greg Wilkins <gregw@webtide.com>
45d5bd2 fixes the list config issue. |
Thanks for dealing with that issue. |
@jscheible-tpgroup in my testing, the property file was working fine to actually affect the settings, but was not be reported if I did a |
I mistakenly assumed that the properties weren't there cause they did not appear in the |
When passing a property file to start.jar like
the existence of the file is check (a not existing file causes an error) but the properties are not read (file containts a property named
foo
):The odd thing is that passing a key-value pair directly (
java -jar start.jar foo=bar --list-config
) or placing a ini-file instart.d
folder works:The text was updated successfully, but these errors were encountered: