![]() NEXUSBASEURL = "/nexus/service/local/repositories/"ĪRTIFACTGROUP = "nl." #requiredĪRTIFACTNAME = None #"testproject" #can be an artifact name or None. used to build the URL in get_nexus_artifact_version_listing and get_nexus_artifact_names Thus for example setting the ARTIFACTVERSIONMIN to None means all previous versions could become part of the selection. If empty, any test related to the selection criteria passes. All other criteria can be left empty (None). First the connection information for Nexus followed by artifact selection criteria. ![]() The script starts with some configuration. Also I have not used any third party Python libraries so a default installation should suffice. I’ve used the NetBeans Python plugin you can find here. ![]() You can download the NetBeans 8.0.2 project containing the code of the script here. If they differ, it is easy to alter the script to suit your particular needs. First check if the artifacts are the ones you expect to be selected based on your criteria before actually performing the artifact deletion. For example, I have only used the Releases repository and no snapshot versions. The script has been created for my specific sample situation. In this article I have provided a Python 2.7 script which allows you to do just that. I only want to delete artifacts from before a certain date with a specified groupid. Suppose you want to make a selection though. You can also specifically remove a single artifact or an entire group using the API (see here). You can schedule a job to keep only specified number of the latest releases (see here). Sonatype Nexus provides several mechanisms to remove artifacts from the repository.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |