OpenLiberty / OpenLiberty/ci.maven

Open Liberty runtime is uninstalled/reinstalled if archive is removed from maven repository

Open
#720 4 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
Java
Stars
139
Forks
100
Avg merge
20h 57m
Merged PRs (30d)
4

Description

Before installing the Open Liberty runtime, the plugin does a comparison between the "last modified" time of the .installed file in the installation and the OL zip archive in the local .m2 repository. If, however, the archive is removed between runs (or not there at all), OL will redownload the archive and uninstall/reinstall the same runtime.

Recreate steps:

  • Run mvn liberty:dev on any project.
  • Stop server
  • Remove archive from local .m2 repository
  • run mvn liberty:dev again

The recreate scenario itself isn't very interesting since deleting archives in the local repository isn't expected, but moving into a Docker development space where mounting local .m2 repositories is common, we can't always guarantee that the local repository will have the archive used to originally install the Liberty runtime. This can lead to an unnecessary download/uninstall/reinstall of the same runtime that was already there.

A possible fix could be comparing the artifact info of the configured runtimeArtifact against the artifact info of the installation. If they match, we can bypass downloading and reinstalling the runtime.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start with the code behind mvn liberty:dev and trace how the configured runtimeArtifact, the .installed file, and the local Maven archive are compared. Reproduce the listed steps, then verify that removing the archive does not trigger a download or reinstall when the existing installation matches the configured artifact.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
build-system, devops
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
38/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.