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

Enhance error handling for tasks #851

Merged
merged 2 commits into from
Oct 16, 2023

Conversation

cherylking
Copy link
Member

@cherylking cherylking commented Oct 13, 2023

Fixes #850

The following logic has been added to help deal with a missing server.xml file in a running Liberty server.

CreateTask

  • change the upToDateWhen check to include the existence of the server.xml file
  • change the create logic to handle the server directory existing but the server.xml file not existing by copying over the defaultServer template server.xml file (this file will get overwritten by the project provided server.xml file if one exists)

RunTask

  • change the shutdown hook logic to handle the server directory existing but the server.xml file not existing by copying over the defaultServer template server.xml file (this file will get overwritten by the project provided server.xml file if one exists)

StatusTask

  • check for existence of server.xml before issuing the server status command

StopTask

  • change the stop logic to handle the server directory existing but the server.xml file not existing by copying over the defaultServer template server.xml file
  • after the server stops, delete the server.xml file that was copied over (this will allow the CreateTask to detect that it is not upToDate and replace with the appropriate server.xml file on a subsequent task)

@cherylking cherylking merged commit 8f3178b into OpenLiberty:main Oct 16, 2023
14 of 15 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Clean task issues libertyDev daemon error handler gradle
2 participants