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

The installLiberty task can be UP-TO-DATE when no image is installed #329

Closed
aguibert opened this issue Oct 11, 2019 · 0 comments · Fixed by #826
Closed

The installLiberty task can be UP-TO-DATE when no image is installed #329

aguibert opened this issue Oct 11, 2019 · 0 comments · Fixed by #826
Assignees
Labels

Comments

@aguibert
Copy link
Contributor

Occasionally I run into issues where the install task thinks it's up to date but there is no wlp image installed. I've ran into two different flavors of this issue:

  1. I've attempted to do a ./gradlew clean libertyStart, but the entire wlp dir can't be deleted sucessfully because there is still a server process holding a lock on ws-server.jar which leaves a single file at wlp/bin/tools/ws-server.jar and everything else gets deleted. Since the install task sees the wlp dir, it thinks that there is a full liberty install present.
  2. I've written some custom gradle tasks that copy a JDBC driver into my server dir. At first, these copy tasks would run early on in my gradle build, causing creation of wlp/usr/servers/<myserver>/jdbc/driver.jar. This would also result in the liberty install task skipping, because the wlp dir was present. I was able to work around this by saying my copy task mustRunAfter installLiberty, but ideally I wouldn't have to do that.

Currently the installLiberty task computes up-to-date as follows:

        outputs.upToDateWhen {
            getInstallDir(project).exists() && project.buildDir.exists() && new File(project.buildDir, 'liberty-plugin-config.xml').exists()
        }

but I think we should make this a little more specific than the install dir existing. Perhaps also checking that wlp/lib/ws-launch.jar, or some other kernel-type file that will be part of any install exists.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants