vrealize:clean
does not work as expected and does not clean well
#319
Labels
area/artifact-manager
Relates to the `artifact-manager` maven module
area/mojo
Relates to changes to some of the mvn mojos
kind/refactor
Refactoring of existing features
triage/accepted
The issue was accepted and will be done
version/major
Introduces a breaking change
Description
This is the documentation for the command. Read through it to understand what is the purpose of
vrealize:clean
.This is how vrealize:clean can be called:
The problem is that currently it doesn't work as expected. There are actually a few issues here:
cleanupOldVersions
andcleanUpLastVersion
at the same time due to a bugGenericPackageStore.java
>deletePackage
pollLast
will remove and return the last element (aka latest) from the array and the delete later on in the if statement will deletefor (Package p : all) {
but latest is actually not thereall.size === 0
we are all good, cause it deletes thelatest
package that waspollLast
-ed before...Proposed solutions
Delete old packages
deletePackageVersion
, aka deleting the package and any obsolete/deprecated/left over code.Cleanup Environment
This will be essentially delete latest and old at the same time
The text was updated successfully, but these errors were encountered: