Nexus repository product synchronization method and apparatus, computer device, and storage medium

By using the synchronization program to process Select, List and Sync commands in the Nexus private library, detecting path validity and filtering data, the problem of difficult big data migration in the Nexus private library is solved, and efficient data migration and synchronization are achieved.

WO2024212622A1PCT designated stage expired Publication Date: 2024-10-17CHINA TELECOM CLOUD TECH CO LTD

Patent Information

Application Number
PCT/CN2023/143302
Authority / Receiving Office
WO · WO
Patent Type
Applications
Current Assignee / Owner
Priority Date
2023-12-11
Filing Date
2023-12-29
Publication Date
2024-10-17

AI Technical Summary

Technical Problem

The large amount of data left behind in the Nexus private database and the unavailable network in the remote computer room resulted in the problem that the private database product data could not be migrated normally.

Method used

The control layer receives the Select command, List command and Sync command through the synchronization program request, determines and synchronizes the data paths of the Nexus source product library and the target product library, detects the validity of the paths, filters useless data, and realizes data synchronization through 4A springboard connection.

Benefits of technology

It achieves efficient migration of Nexus private database data, solves the data migration problem caused by network failure in remote computer rooms, and reduces synchronization workload and time.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN2023143302_17102024_PF_FP_ABST
    Figure CN2023143302_17102024_PF_FP_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of data synchronization and discloses a Nexus repository artifact synchronization method and apparatus, a computer device, and a storage medium. The method comprises: determining context data of a current artifact path by means of receiving a select command; in response to a list command, determining artifact data of the context data in a Nexus source artifact repository; and if a sync command is received, synchronizing target data among the artifact data from the Nexus source artifact repository with a Nexus target artifact repository to complete Nexus repository artifact synchronization. By this means, according to target data of a user-defined Nexus source artifact repository and a Nexus target artifact repository, and on the basis of different commands such as select, list, and sync, the target data undergoes different processing to implement synchronization of the target data from the Nexus source artifact repository with the Nexus target artifact repository; and the problem where private repository artifact data cannot be normally migrated due to the large amount of legacy data in a Nexus private repository and that the network of a remote server room is not connected is thus solved.
Need to check novelty before this filing date? Find Prior Art

Description

Nexus warehouse product synchronization method, device, computer equipment and storage medium Technical Field

[0001] The present application relates to the field of data synchronization technology, and in particular to a method, device, computer equipment and storage medium for synchronizing Nexus warehouse products. Background Art

[0002] Nexus private repositories are widely used, primarily for storing company binary artifacts, acting as proxy servers for central repositories, and storing mirrored data. Consequently, over time, the inventory of artifacts in these repositories has grown enormous, making migration a challenging task. Therefore, addressing the large amount of legacy data in Nexus private repositories and the difficulty migrating private repository data due to network issues in remote data centers has become a pressing technical challenge.

[0003] Summary of the Invention

[0004] The present application provides a method, apparatus, computer equipment and storage medium for synchronizing Nexus warehouse products to solve the problem that the amount of legacy data in Nexus private warehouses is large and the network connection in remote computer rooms is poor, resulting in the inability to migrate private warehouse product data normally.

[0005] In a first aspect, the present application provides a method for synchronizing Nexus warehouse artifacts, the method comprising:

[0006] Request the control layer to receive the Select command through the synchronization program to determine the context data of the current product path;

[0007] In response to a List command, requesting the control layer to determine, through the synchronization program, artifact data of the context data in the Nexus source artifact library;

[0008] When the synchronization program requests the control layer to receive the Sync command, the target data in the product data is synchronized from the Nexus source product library to the Nexus target product library, thereby completing the synchronization of the Nexus warehouse products.

[0009] Furthermore, in response to the List command, before the synchronization program requests the control layer to determine the artifact data of the context data in the Nexus source artifact library, the method further includes:

[0010] Check whether the current product path is a real and valid path;

[0011] In the case that the current product path is the real and valid path, all product data in the current product path are listed, and all product data are filtered to remove useless product data in all product data.

[0012] Furthermore, before detecting whether the current product path is a real and valid path, the method further includes:

[0013] Based on the List command, configure the corresponding account and password.

[0014] Furthermore, after detecting whether the current product path is a real and valid path, the following steps are included:

[0015] In the case where the current product path is not the real valid path, and / or

[0016] When the target data does not exist in the current product path, a Reback command is sent to return to the preset path.

[0017] Furthermore, the preset path includes a root directory or an upper directory.

[0018] Furthermore, when the synchronization program requests the control layer to receive a Sync command, the target data in the artifact data is synchronized from the Nexus source artifact library to the Nexus target artifact library, thereby completing the synchronization of the Nexus warehouse artifacts, including:

[0019] Based on the Sync command, convert the target data into source product data corresponding to the Nexus OpenAPI interface;

[0020] Synchronize the source artifact data from the Nexus source artifact library to the Nexus target artifact library.

[0021] Furthermore, the Nexus source product library and the Nexus target product library are connected via a 4A jump server.

[0022] In a second aspect, the present application further provides a device for synchronizing products in a Nexus warehouse, the device comprising:

[0023] The context data determination module is used to request the control layer to receive the Select command through the synchronization program and determine the context data of the current product path;

[0024] an artifact data determination module, configured to, in response to a List command, request the control layer to determine artifact data of the context data in the Nexus source artifact library through the synchronization program;

[0025] The synchronization module is used to synchronize the target data in the product data from the Nexus source product library to the Nexus target product library when the synchronization program requests the control layer to receive the Sync command, thereby completing the synchronization of the Nexus warehouse products.

[0026] In a third aspect, the present application also provides a computer device comprising a memory and a processor; the memory is used to store a computer program; the processor is used to execute the computer program and implement the Nexus warehouse product synchronization method as described above when executing the computer program.

[0027] In a fourth aspect, the present application further provides a computer-readable storage medium, wherein the computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the processor implements the Nexus warehouse product synchronization method as described above.

[0028] The present application discloses a method, device, computer equipment and storage medium for synchronizing Nexus warehouse products. The method for synchronizing Nexus warehouse products includes: requesting the control layer to receive a Select command through a synchronization program to determine the context data of the current product path; in response to a List command, requesting the control layer to determine the product data of the context data in the Nexus source product library through the synchronization program; and synchronizing the target data in the product data from the Nexus source product library to the Nexus target product library when the synchronization program requesting the control layer receives a Sync command, thereby completing the synchronization of Nexus warehouse products. In the above manner, the present application configures the target data in the Nexus source product library and the Nexus target product library according to the custom configuration, and according to different commands such as the Select command, the List command and the Sync command, performs different processing on the target data to synchronize the target data from the Nexus source product library to the Nexus target product library, thereby solving the problem that the Nexus private library has a large amount of legacy data and the network of the remote computer room is not accessible, resulting in the inability to migrate the private library product data normally. BRIEF DESCRIPTION OF THE DRAWINGS

[0029] In order to more clearly illustrate the technical solutions of the embodiments of the present application, the following is a brief introduction to the drawings required for use in the description of the embodiments. Obviously, the drawings described below are some embodiments of the present application. For ordinary technicians in this field, other drawings can be obtained based on these drawings without any creative work.

[0030] FIG1 is a schematic flow chart of a method for synchronizing Nexus warehouse products according to a first embodiment of the present application;

[0031] FIG2 is a schematic flow chart of a method for synchronizing Nexus warehouse products according to a second embodiment of the present application;

[0032] FIG3 is a schematic block diagram of a Nexus warehouse product synchronization device provided in an embodiment of the present application;

[0033] FIG4 is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. DETAILED DESCRIPTION

[0034] The following will be combined with the drawings in the embodiments of this application to clearly and completely describe the technical solutions in the embodiments of this application. Obviously, the embodiments described are part of the embodiments of this application, not all of them. Based on the embodiments in this application, all other embodiments obtained by ordinary technicians in this field without making creative efforts are within the scope of protection of this application.

[0035] The flowcharts shown in the accompanying drawings are for illustrative purposes only and do not necessarily include all contents and operations / steps, nor must they be executed in the order described. For example, some operations / steps may be decomposed, combined, or partially merged, so the actual execution order may vary depending on the actual situation.

[0036] It should be understood that the terms used in this specification are only for the purpose of describing specific embodiments and are not intended to limit the present application. As used in this specification and the appended claims, the singular forms "a", "an", and "the" are intended to include the plural forms unless the context clearly indicates otherwise.

[0037] It will also be understood that the term "and / or" used in this specification and the appended claims refers to and includes any and all possible combinations of one or more of the associated listed items.

[0038] The embodiments of the present application provide a method, device, computer equipment and storage medium for synchronizing Nexus warehouse products. Among them, the method for synchronizing Nexus warehouse products can be applied to a server, according to the target data in the Nexus source product library and the Nexus target product library, and according to different commands such as Select command, List command and Sync command, the target data is processed differently to synchronize the target data from the Nexus source product library to the Nexus target product library, solving the problem that the Nexus private library has a large amount of legacy data and the network connection of the remote computer room is not connected, resulting in the inability to migrate the private library product data normally. Among them, the server can be an independent server or a server cluster.

[0039] The following describes some embodiments of the present application in detail with reference to the accompanying drawings. In the absence of conflict, the following embodiments and features therein may be combined with each other.

[0040] Please refer to Figure 1, which is a schematic flow chart of a method for synchronizing Nexus warehouse products provided in the first embodiment of the present application. The method for synchronizing Nexus warehouse products can be applied to a server, and according to the target data in the Nexus source product library and the Nexus target product library, the target data is processed differently according to different commands such as the Select command, the List command, and the Sync command to synchronize the target data from the Nexus source product library to the Nexus target product library, thereby solving the problem that the private library product data cannot be normally migrated due to the large amount of legacy data in the Nexus private library and the poor network connection in the remote computer room.

[0041] As shown in FIG1 , the Nexus warehouse product synchronization method specifically includes steps S10 to S30 .

[0042] Step S10: Request the control layer to receive a Select command through the synchronization program to determine the context data of the current product path;

[0043] In one embodiment, the Select command is used to determine the context data of the current artifact path. Its purpose is to tell the user the starting path for synchronizing data, making it easier for the user to proceed to the next step. For example, Selectcom / ctg / devops means: the path currently selected by the user is ${repository.source.url} / com / ctg / devops, and subsequent user queries and synchronization data are all under this path. The biggest function of this command is to determine the synchronization path, reduce the amount of synchronized artifact data, and meet on-demand synchronization requirements. It is also an original command of the MSAP product, specifically designed to solve the problem of MAVEN warehouse artifact synchronization.

[0044] Step S20: In response to the List command, request the control layer to determine the artifact data of the context data in the Nexus source artifact library through the synchronization program;

[0045] In one embodiment, the List command is used to list the subdirectories or product data under the currently selected directory, for example, List. When executing the List command, you first need to ensure that the current path is real and valid, and then obtain the corresponding list data return through the Nexus openapi; if an account and password are required, you need to configure the corresponding warehouse account and password in the device; the biggest function of this command is to list the product data under the current directory and further filter the data that the user needs to synchronize.

[0046] Step S30: When the synchronization program requests the control layer to receive the Sync command, the target data in the product data is synchronized from the Nexus source product library to the Nexus target product library, thereby completing the synchronization of the Nexus warehouse products.

[0047] In one embodiment, the Sync command is used to synchronize artifacts. This embodiment can synchronize specific artifacts in the NexusB source repository to the target artifact repository NexusA. It includes the following input parameters: -Dfolder, -Dfile, -DgroupId, -DartifactId, -Dversion, -Dpackaging, and -DpomFile, for example, Sync-Dfolder=org / apache. -Dfolder and -Dfile cannot be used at the same time. The former is used to synchronize the entire directory, and the latter is used to synchronize specific artifacts. The five input parameters -DgroupId, -DartifactId, -Dversion, -Dpackaging, and -DpomFile are used together. This command is the key to synchronizing artifacts. It converts the user's operation command into the data required by the corresponding Nexus openapi interface, uploads the source artifact repository data to the target artifact repository, and completes the corresponding synchronization process. This command is the key command for synchronizing artifacts. It is an independently implemented capability that is not affected by other MAVEN private library versions. It is flexible and simple and compatible with Maven native commands.

[0048] This embodiment discloses a method, device, computer equipment and storage medium for synchronizing Nexus warehouse products. The method for synchronizing Nexus warehouse products includes receiving a Select command through a synchronization program requesting the control layer to determine the context data of the current product path; in response to a List command, determining the product data of the context data in the Nexus source product library through the synchronization program requesting the control layer; when the synchronization program requesting the control layer receives a Sync command, synchronizing the target data in the product data from the Nexus source product library to the Nexus target product library to complete the synchronization of Nexus warehouse products. In the above manner, the present application configures the target data in the Nexus source product library and the Nexus target product library according to the custom configuration, and according to different commands such as the Select command, the List command and the Sync command, performs different processing on the target data to synchronize the target data from the Nexus source product library to the Nexus target product library, thereby solving the problem that the Nexus private library has a large amount of legacy data and the network of the remote computer room is not accessible, resulting in the inability to migrate the private library product data normally.

[0049] Please refer to Figure 2, which is a schematic flow chart of a method for synchronizing Nexus warehouse products provided in the second embodiment of the present application. The method for synchronizing Nexus warehouse products can be applied to a server, and according to the target data in the Nexus source product library and the Nexus target product library, the target data is processed differently according to different commands such as the Select command, the List command, and the Sync command to synchronize the target data from the Nexus source product library to the Nexus target product library, thereby solving the problem that the private library product data cannot be normally migrated due to the large amount of legacy data in the Nexus private library and the poor network connection in the remote computer room.

[0050] Based on the embodiment shown in FIG1 , this embodiment is shown in FIG2 , and the steps before step S20 include steps S11 to S12 .

[0051] Step S11: Detect whether the current product path is a real and valid path;

[0052] Step S12: When the current product path is the real and valid path, all product data in the current product path are listed, and all product data are filtered to remove useless product data from the total product data.

[0053] In one embodiment, taking the synchronization folder com / ctg / itrdc / cache as an example, the synchronization command is:

[0054] To synchronize folders, you must first confirm that there is product data under the current user Select com / ctg / itrdc / cache path, that is, use the / v1 / search interface to query the product data. If there is product data, it will be returned to the user, otherwise it will be empty. Note that when synchronizing folders, you need to block some verification files such as md5 and sha1 files to reduce the synchronization workload.

[0055] Considering that the number of artifact files may be large or there may be a single large file, the following four technologies are used:

[0056] 1. Pre-read stream size of network file stream;

[0057] 2. Read network file stream data in segments;

[0058] 3. Files are merged again;

[0059] 4.Java multithreading.

[0060] Pre-read the file size based on the value of the Content-Length field in the response header. This is convenient for determining whether to split the file. If the product exceeds 512MB, reading a single file stream alone is very time-consuming.

[0061] Read stream data in segments, use the RandomAccessFile class to speed up the acquisition of source product data, and write it to the tmp file, thereby improving the synchronization speed;

[0062] Merge the files again, merge the multiple segmented tmp files into one source file, verify the correctness of the merged file, and facilitate the next upload process;

[0063] Java multithreading is used for segmented reading of network file stream data, uploading of multi-product data, and speeding up the synchronization process to reduce user waiting time.

[0064] This embodiment discloses a method, apparatus, computer equipment and storage medium for synchronizing products in a Nexus warehouse. The method for synchronizing products in a Nexus warehouse includes requesting a control layer to receive a Select command through a synchronization program to determine the context data of a current product path; detecting whether the current product path is a real and valid path; if the current product path is the real and valid path, listing all product data in the current product path, filtering all product data, and removing useless product data from all product data; in response to a List command, requesting a control layer to determine the product data of the context data in a Nexus source product library through the synchronization program; and synchronizing the target data in the product data from the Nexus source product library to the Nexus target product library when the synchronization program requests the control layer to receive a Sync command, thereby completing the synchronization of products in the Nexus warehouse. Through the above method, this application customizes the target data in the Nexus source product library and the Nexus target product library, and processes the target data differently according to different commands such as the Select command, List command, and Sync command to synchronize the target data from the Nexus source product library to the Nexus target product library, solving the problem that the Nexus private library has a large amount of legacy data and the network connection of the remote computer room is not connected, resulting in the inability to migrate the private library product data normally.

[0065] Based on the embodiment shown in FIG2 , in this embodiment, before step S12, the following steps are further included:

[0066] Based on the List command, configure the corresponding account and password.

[0067] Based on the embodiment shown in FIG2 , in this embodiment, before step S11, the following steps are included:

[0068] In the case where the current product path is not the real valid path, and / or

[0069] When the target data does not exist in the current product path, a Reback command is sent to return to the preset path.

[0070] In one embodiment, the Reback command is used to roll back to a specified directory. When using this command, the validity of the target path will be verified. For example, Reback.. rolls back to the previous directory. If the current directory is the root directory, it cannot roll back. The biggest function of this command is that when the user finds that there is no required product in the current path, it can roll back to the corresponding target path.

[0071] Based on the above embodiment, in one embodiment, the preset path includes a root directory or an upper-level directory.

[0072] Based on the embodiment shown in FIG1 , in this embodiment, step S30 includes:

[0073] Based on the Sync command, convert the target data into source product data corresponding to the Nexus OpenAPI interface;

[0074] Synchronize the source artifact data from the Nexus source artifact library to the Nexus target artifact library.

[0075] Based on any of the above embodiments, in this embodiment, the Nexus source product library and the Nexus target product library are connected via a 4A jump server.

[0076] In one embodiment, the project application.properties configuration example is as follows

[0077] The Nexus OpenApi involved are as follows:

[0078] Taking the synchronized ctg-cache-nclient-2.8.2.jar product as an example, its Maven dependencies are as follows:

[0079] The synchronization commands are as follows:

[0080] The -Dpackaging and -DpomFile parameters are optional. The default value of packaging is jar. If it is war type, it is -Dpackaging=war. pomFile is the synchronized Maven pom file. If synchronization is required, you need to add this parameter, for example: -DpomFile=ctg-cache-nclient-2.8.2.pom.

[0081] This embodiment supports on-demand synchronization, avoiding the time-consuming full synchronization, the large amount of redundant data, and the serious waste of disk. Currently, the present invention supports synchronization by folder and by individual file;

[0082] Fast synchronization speed. For large files, a single file stream is cut and multi-threaded to quickly read the stream data. Then, the merge technology is used to verify the correctness of the file. Finally, multi-threading is used to synchronize the data of multiple products to the target product library.

[0083] High scalability. First, it is self-developed by the company and supports user customization requirements. Second, although it currently only supports Maven products, Nexus OpenAPI also supports uploading other mainstream products such as Docker and NPM. As long as it is developed according to its specifications, it can support the synchronization of various product types required by users.

[0084] The deployment and operation are simple and flexible, and the hardware resources used are few. The present invention is built based on the Springboot scaffolding framework, and the development, compilation and packaging are very simple;

[0085] Existing technologies or tools currently available on the market, such as Nexus, firstly do not support synchronization by volume, only full synchronization. Secondly, even if Nexus 3 can directly copy to the target artifact repository, its storage structure is encrypted, not a traditional folder or file structure. Without the metadata of the source artifact repository, it cannot be properly parsed, wasting storage space and doing useless work. This invention is designed to help users solve these two major problems. Considering that most private libraries contain mainly public packages and have limited private artifacts, since we only need to synchronize the file data of private artifacts in most cases, this greatly reduces the synchronization workload and speeds up the synchronization process of artifact data.

[0086] Please refer to Figure 3, which is a schematic block diagram of a Nexus warehouse product synchronization device provided in an embodiment of the present application, wherein the Nexus warehouse product synchronization device is used to execute the aforementioned Nexus warehouse product synchronization method.

[0087] As shown in Figure 3, the synchronization device for Nexus warehouse products includes:

[0088] The context data determination module 410 is used to request the control layer to receive a Select command through a synchronization program and determine the context data of the current artifact path;

[0089] The artifact data determination module 420 is configured to determine the artifact data of the context data in the Nexus source artifact library via the synchronization program request control layer in response to a List command;

[0090] The synchronization module 430 is used to synchronize the target data in the product data from the Nexus source product library to the Nexus target product library when the synchronization program requests the control layer to receive a Sync command, thereby completing the synchronization of the Nexus warehouse products.

[0091] Furthermore, the synchronization device for the Nexus warehouse products further includes:

[0092] A real and effective path detection module, used to detect whether the current product path is a real and effective path;

[0093] The product data screening module is used to list all product data in the current product path when the current product path is the real and valid path, and to screen all the product data to remove useless product data from the total product data.

[0094] Furthermore, the synchronization device for the Nexus warehouse products further includes:

[0095] The account and password configuration module is used to configure the corresponding account and password based on the List command.

[0096] Furthermore, the synchronization device for the Nexus warehouse products further includes:

[0097] Reback command return module, used when the current product path is not the real valid path, and / or

[0098] When the target data does not exist in the current product path, a Reback command is sent to return to the preset path.

[0099] Furthermore, the synchronization module 430 includes:

[0100] A source product data conversion unit, configured to convert the target data into source product data corresponding to the Nexus OpenAPI interface based on the Sync command;

[0101] The source product data synchronization unit is used to synchronize the source product data from the Nexus source product library to the Nexus target product library.

[0102] It should be noted that those skilled in the art will clearly understand that, for the convenience and brevity of description, the specific working processes of the above-described devices and modules can refer to the corresponding processes in the aforementioned method embodiments and will not be repeated here.

[0103] The above-mentioned apparatus may be implemented in the form of a computer program, and the computer program may be run on the computer device shown in FIG. 4 .

[0104] Please refer to Figure 4, which is a schematic block diagram of the structure of a computer device provided in an embodiment of the present application. The computer device may be a server.

[0105] 4 , the computer device includes a processor, a memory, and a network interface connected via a system bus, wherein the memory may include a non-volatile storage medium and an internal memory.

[0106] The non-volatile storage medium can store an operating system and a computer program. The computer program includes program instructions, which, when executed, can cause a processor to perform any method for synchronizing artifacts in a Nexus repository.

[0107] The processor is used to provide computing and control capabilities and support the operation of the entire computer equipment.

[0108] The internal memory provides an environment for the operation of the computer program in the non-volatile storage medium. When the computer program is executed by the processor, the processor can execute any method for synchronizing the Nexus warehouse products.

[0109] The network interface is used for network communication, such as sending assigned tasks, etc. Those skilled in the art will understand that the structure shown in FIG4 is merely a block diagram of a portion of the structure related to the solution of the present application, and does not constitute a limitation on the computer device to which the solution of the present application is applied. A specific computer device may include more or fewer components than shown in the figure, or combine certain components, or have a different arrangement of components.

[0110] It should be understood that the processor may be a central processing unit (CPU), or other general-purpose processors, digital signal processors (DSP), application-specific integrated circuits (ASIC), field-programmable gate arrays (FPGA), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or any conventional processor, etc.

[0111] In one embodiment, the processor is configured to execute a computer program stored in the memory to implement the following steps:

[0112] Request the control layer to receive the Select command through the synchronization program to determine the context data of the current product path;

[0113] In response to a List command, requesting the control layer to determine, through the synchronization program, artifact data of the context data in the Nexus source artifact library;

[0114] When the synchronization program requests the control layer to receive the Sync command, the target data in the product data is synchronized from the Nexus source product library to the Nexus target product library, thereby completing the synchronization of the Nexus warehouse products.

[0115] In one embodiment, in response to a List command, before the synchronization program requests the control layer to determine the artifact data of the context data in the Nexus source artifact library, the synchronization program is further configured to implement:

[0116] Check whether the current product path is a real and valid path;

[0117] In the case that the current product path is the real and valid path, all product data in the current product path are listed, and all product data are filtered to remove useless product data in all product data.

[0118] In one embodiment, before detecting whether the current product path is a real and valid path, it is also used to implement:

[0119] Based on the List command, configure the corresponding account and password.

[0120] In one embodiment, after detecting whether the current product path is a real and valid path, it is used to implement:

[0121] In the case where the current product path is not the real valid path, and / or

[0122] When the target data does not exist in the current product path, a Reback command is sent to return to the preset path.

[0123] In one embodiment, when the synchronization program request control layer receives a Sync command, the target data in the artifact data is synchronized from the Nexus source artifact repository to the Nexus target artifact repository, completing the synchronization of the Nexus repository artifacts, so as to achieve:

[0124] Based on the Sync command, convert the target data into source product data corresponding to the Nexus OpenAPI interface;

[0125] Synchronize the source artifact data from the Nexus source artifact library to the Nexus target artifact library.

[0126] An embodiment of the present application also provides a computer-readable storage medium, which stores a computer program, and the computer program includes program instructions. The processor executes the program instructions to implement any Nexus warehouse product synchronization method provided in the embodiment of the present application.

[0127] The computer-readable storage medium may be an internal storage unit of the computer device described in the aforementioned embodiment, such as a hard disk or memory of the computer device. The computer-readable storage medium may also be an external storage device of the computer device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc., equipped on the computer device.

[0128] The above description is merely a specific embodiment of the present application, but the scope of protection of the present application is not limited thereto. Any person skilled in the art can easily conceive of various equivalent modifications or substitutions within the technical scope disclosed in the present application, and such modifications or substitutions should be included in the scope of protection of the present application. Therefore, the scope of protection of the present application should be based on the scope of protection of the claims.

Claims

1. A method for synchronizing Nexus warehouse products, characterized in that: include: Request the control layer to receive the Select command through the synchronization program to determine the context data of the current product path; In response to a List command, requesting the control layer to determine artifact data of the context data in the Nexus source artifact library through the synchronization program; When the synchronization program requests the control layer to receive the Sync command, the target data in the product data is synchronized from the Nexus source product library to the Nexus target product library, thereby completing the synchronization of the Nexus warehouse products.

2. The method for synchronizing Nexus warehouse products according to claim 1, characterized in that: Before the control layer is requested by the synchronization program to determine the artifact data of the context data in the Nexus source artifact library in response to the List command, the method further includes: Detecting whether the current product path is a real and valid path; In the case where the current product path is the real and valid path, all product data in the current product path are listed, and all product data are screened to remove useless product data from all product data.

3. The method for synchronizing Nexus warehouse products according to claim 2, characterized in that: Before detecting whether the current product path is a real and valid path, the method further includes: Based on the List command, configure the corresponding account and password.

4. The method for synchronizing Nexus warehouse products according to claim 2, characterized in that: After the detection of whether the current product path is a real and valid path, the method includes: In the case where the current product path is not the real valid path, and / or When the target data does not exist in the current product path, a Reback command is sent to return to the preset path.

5. The method for synchronizing Nexus warehouse products according to claim 4, characterized in that: The preset path includes a root directory or an upper-level directory.

6. The method for synchronizing Nexus warehouse products according to claim 1, characterized in that: When the synchronization program requests the control layer to receive the Sync command, the target data in the product data is synchronized from the Nexus source product library to the Nexus target product library to complete the synchronization of the Nexus warehouse products, including: Based on the Sync command, convert the target data into source product data corresponding to the Nexus OpenAPI interface; The source artifact data is synchronized from the Nexus source artifact library to the Nexus target artifact library.

7. The method for synchronizing Nexus warehouse products according to any one of claims 1 to 6, characterized in that: The Nexus source product library and the Nexus target product library are connected via a 4A jump board.

8. A synchronization device for Nexus warehouse products, characterized in that: include: The context data determination module is used to request the control layer to receive the Select command through the synchronization program and determine the context data of the current product path; A product data determination module, configured to determine the product data of the context data in the Nexus source product library through the synchronization program requesting the control layer in response to a List command; The synchronization module is used to synchronize the target data in the product data from the Nexus source product library to the Nexus target product library when the synchronization program requests the control layer to receive the Sync command, so as to complete the synchronization of the Nexus warehouse products.

9. A computer device, characterized in that: The computer device includes a memory and a processor; The memory is used to store computer programs; The processor is used to execute the computer program and implement the Nexus warehouse product synchronization method as described in any one of claims 1 to 7 when executing the computer program.

10. A computer-readable storage medium, characterized in that: The computer-readable storage medium stores a computer program, which, when executed by a processor, enables the processor to implement the method for synchronizing Nexus warehouse products as described in any one of claims 1 to 7.

Citation Information

Patent Citations

  • Data operation method, equipment and system based on Nexus service, and medium

    CN108694102A

  • Method and device for building maven private library high availability based on Nexus

    CN116521356A

  • Nexus warehouse product synchronization method and device, computer equipment and storage medium

    CN117807043A

  • Multi-parallel processing of n-dimensional orthogonal splits in transactions and data for a distributed transaction system

    US11281660B1

Cited By

  • Nexus warehouse product synchronization method and device, computer equipment and storage medium

    CN117807043A

  • Synchronization method and device of nexus repository artifact, computer device and storage medium

    CN117807043B

  • Docker mirror image management method and device of product storage system, equipment and medium

    CN119088509A