Skip to content
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

Issue #5256 Adding start.jar --add-module #5258

Merged
merged 6 commits into from
Sep 15, 2020

Conversation

gregw
Copy link
Contributor

@gregw gregw commented Sep 12, 2020

Fixes #5256

  • added --add-module
  • added --create-start-ini

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
usage.txt

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@joakime joakime changed the title Jetty 10.0.x 5256 add module Issue #5256 Adding start.jar --add-module Sep 13, 2020
@sbordet
Copy link
Contributor

sbordet commented Sep 14, 2020

@gregw can you please add a check to abort start if there is an unrecognized option?

For example:

java -jar $JETTY_HOME/start.jar --foo-bar=http

This still starts the server, I think it's better to abort with "Unrecognized option --foo-bar".

@@ -128,7 +128,7 @@ protected Path getDestination(URI uri, String location) throws IOException
protected void download(URI uri, Path destination) throws IOException
{
if (FS.ensureDirectoryExists(destination.getParent()))
StartLog.log("MKDIR", _basehome.toShortForm(destination.getParent()));
StartLog.log("INFO", "mkdir " + _basehome.toShortForm(destination.getParent()));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I kind of liked the previous format, although it was not consistent (e.g. was using INFO for module activity).

If you go this direction, then there are 3 occurrences of StartLog.log("COPY", ...) and 1 of StartLog.log("DOWNLD", ...) to replace.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm torn.... but on balance I think that INFO/WARN are least surprise.

@sbordet
Copy link
Contributor

sbordet commented Sep 14, 2020

@gregw also:

INFO : server transitively enabled, ini template available with --add-to-start=server

should be --add-module=server at end of line.

updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw
Copy link
Contributor Author

gregw commented Sep 14, 2020

@sbordet If we want to warn about unknown args, we will have to get rid of jvm.mod. Not necessarily a bad thing to do..... thoughts?

@gregw gregw requested a review from sbordet September 14, 2020 10:38
@sbordet
Copy link
Contributor

sbordet commented Sep 14, 2020

If we want to warn about unknown args, we will have to get rid of jvm.mod. Not necessarily a bad thing to do..... thoughts?

I retract, we want unknown arguments to start.jar be passed to the JVM, like you pointed out.

{
StartLog.log("MKDIR", baseHome.toShortForm(startd));
StartLog.info("create " + baseHome.toShortForm(startini));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be mkdir for consistency with other logs, not create.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

but it is not a directory! "touch" ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changed from startd to startini ?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@joakime exectly because the option is now --create-start-ini and --create-startd is a noop

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note that --create-start-ini takes all the files in start.d and concats them into a start.ini and then removes start.d

updates from review

Signed-off-by: Greg Wilkins <gregw@webtide.com>
Signed-off-by: Greg Wilkins <gregw@webtide.com>
@gregw gregw merged commit 0f40310 into jetty-10.0.x Sep 15, 2020
@gregw gregw deleted the jetty-10.0.x-5256-add-module branch September 15, 2020 09:58
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Cleanup Jetty 10 Start
3 participants