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

Maven metdata still references a version whose assets were deleted #524

Open
yakirm-cr opened this issue Nov 22, 2024 · 0 comments
Open
Assignees
Labels

Comments

@yakirm-cr
Copy link

  • What problem are you trying to solve?
    When deleting all of the assets under a specific version in a Maven repository, the version is NOT deleted from the maven-metadata.xml file of that GA (GroupId and ArtifactId) coordinates.
    Manually, uploading the maven-metadata.xml file without that version remains like this until another version's assets are removed (after which, the contents of the maven-metadata.xml of that GA coordinates are restored with the deleted versions).
    The issue is not encountered when the parent component (i.e. the version folder) is deleted.

  • Do you have a workaround you are using at present?
    If we upload a dummy artifact with the same GAV (GroupId, ArtifactId and Version) coordinates of the deleted version and then delete parent component (i.e. the version folder), the maven-metadata.xml is regenerated without the deleted version.
    However, this might be complicated when there are many corrupted maven-metadata.xml files.

In addition, the repair task which rebuilds the maven-metadata.xml files also picks up the components for which all the assets were deleted and adds them back to the maven-metadata.xml files (so, it is not an option to use this task as a workaround).

  • What feature or behavior is this required for?
    Moving of old versions from one Maven repository to another or deleting old versions (for multiple artifacts with the same version).

  • How could we solve this issue? (Not knowing is okay!)
    Update the delete asset API to make sure that the parent component is also deleted when the last asset under it is deleted.

  • Tell us about your Nexus Repository deployment: what version, operating system, and database are you using?
    We are using OSS Nexus 3.73.0 with the internal H2 DB running in Docker.

  • Anything else?
    Nope. 🙂

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

No branches or pull requests

2 participants