CN110989985B - Maven-based dependency package management method, device, computer equipment and storage medium - Google Patents

Maven-based dependency package management method, device, computer equipment and storage medium Download PDF

Info

Publication number
CN110989985B
CN110989985B CN201911200434.5A CN201911200434A CN110989985B CN 110989985 B CN110989985 B CN 110989985B CN 201911200434 A CN201911200434 A CN 201911200434A CN 110989985 B CN110989985 B CN 110989985B
Authority
CN
China
Prior art keywords
module
package
dependency
core
dependency package
Prior art date
Legal status (The legal status is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the status listed.)
Active
Application number
CN201911200434.5A
Other languages
Chinese (zh)
Other versions
CN110989985A (en
Inventor
黄波
刘倍材
李柏
潘孝
李如先
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Original Assignee
Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd filed Critical Shenzhen Qianhai Huanrong Lianyi Information Technology Service Co Ltd
Priority to CN201911200434.5A priority Critical patent/CN110989985B/en
Publication of CN110989985A publication Critical patent/CN110989985A/en
Application granted granted Critical
Publication of CN110989985B publication Critical patent/CN110989985B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/20Software design
    • YGENERAL TAGGING OF NEW TECHNOLOGICAL DEVELOPMENTS; GENERAL TAGGING OF CROSS-SECTIONAL TECHNOLOGIES SPANNING OVER SEVERAL SECTIONS OF THE IPC; TECHNICAL SUBJECTS COVERED BY FORMER USPC CROSS-REFERENCE ART COLLECTIONS [XRACs] AND DIGESTS
    • Y02TECHNOLOGIES OR APPLICATIONS FOR MITIGATION OR ADAPTATION AGAINST CLIMATE CHANGE
    • Y02DCLIMATE CHANGE MITIGATION TECHNOLOGIES IN INFORMATION AND COMMUNICATION TECHNOLOGIES [ICT], I.E. INFORMATION AND COMMUNICATION TECHNOLOGIES AIMING AT THE REDUCTION OF THEIR OWN ENERGY USE
    • Y02D10/00Energy efficient computing, e.g. low power processors, power management or thermal management

Landscapes

  • Engineering & Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Stored Programmes (AREA)

Abstract

The embodiment of the invention discloses a Maven-based dependency package management method, a Maven-based dependency package management device, computer equipment and a storage medium. The method belongs to the technical field of computers, and comprises the following steps: if an instruction for creating a dependency package is received, creating the dependency package in Maven, wherein Maven comprises a core module, a supporting module and a middleware module; judging whether a dependency package exists in a core sub-module of the core module; if the core sub-module of the core module does not have the dependency package, adding the dependency package in the support module or the middleware module to the core sub-module of the core module; the dependency information of the dependency package is stored to the core module. According to the embodiment of the invention, the created dependence package is stored in the core sub-module of the core module, and the dependence information of the dependence package is stored in the core module, so that the core module can effectively manage the created dependence package, the development efficiency is improved, and the cost for maintaining the dependence package is reduced.

Description

Maven-based dependency package management method, device, computer equipment and storage medium
Technical Field
The present invention relates to the field of personal computer technologies, and in particular, to a Maven-based management method and apparatus for a dependency package, a computer device, and a storage medium.
Background
Maven is a software project management tool introduced by the Apache open source community that is based on a project object model and can manage the construction, reporting and documentation of projects through descriptive information.
At present, when a service developer processes a project of a plurality of modules, different bottom layer packages are introduced according to service needs, but dependency relationship service developers between the bottom layer packages and the packages are not known, so that when the service developer introduces the Maven dependency packages, the problem of selecting a proper version dependency package is faced, and particularly, how to quickly and accurately select a proper Maven dependency package version is very difficult.
Disclosure of Invention
The embodiment of the invention provides a Maven-based dependency package management method, a Maven-based dependency package management device, computer equipment and a storage medium, and aims to solve the problem of management of the version of the existing Maven-based dependency package.
In a first aspect, an embodiment of the present invention provides a Maven-based dependency package management method, including:
if an instruction for creating a dependency package is received, creating the dependency package in Maven, wherein Maven comprises a core module, a supporting module and a middleware module;
judging whether the dependency package exists in a core sub-module of the core module;
if the dependency package does not exist in the core sub-module of the core module, adding the dependency package in the support module or the middleware module to the core sub-module of the core module;
and storing the dependency information of the dependency package to the core module.
In a second aspect, an embodiment of the present invention further provides a Maven-based management apparatus for a dependency package, including:
the creation unit is used for creating a dependency package in Maven if an instruction for creating the dependency package is received, wherein the Maven comprises a core module, a support module and a middleware module;
the first judging unit is used for judging whether the dependency package exists in a core sub-module of the core module;
a first adding unit, configured to add the dependency package in the support module or the middleware module to the core submodule of the core module if the core submodule of the core module does not have the dependency package;
and the storage unit is used for storing the dependency information of the dependency package to the core module.
In a third aspect, an embodiment of the present invention further provides a computer device, which includes a memory and a processor, where the memory stores a computer program, and the processor implements the method when executing the computer program.
In a fourth aspect, embodiments of the present invention also provide a computer readable storage medium storing a computer program which, when executed by a processor, implements the above method.
The embodiment of the invention provides a Maven-based dependency package management method, a Maven-based dependency package management device, computer equipment and a storage medium. Wherein the method comprises the following steps: if an instruction for creating a dependency package is received, creating the dependency package in Maven, wherein Maven comprises a core module, a supporting module and a middleware module; judging whether the dependency package exists in a core sub-module of the core module; if the dependency package does not exist in the core sub-module of the core module, adding the dependency package in the support module or the middleware module to the core sub-module of the core module; and storing the dependency information of the dependency package to the core module. According to the embodiment of the invention, the created dependence package is stored in the core sub-module of the core module, and the dependence information of the dependence package is stored in the core module, so that the core module can effectively manage the created dependence package, the development efficiency is improved, and the cost for maintaining the dependence package is reduced.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings required for the description of the embodiments will be briefly described below, and it is obvious that the drawings in the following description are some embodiments of the present invention, and other drawings may be obtained according to these drawings without inventive effort for a person skilled in the art.
FIG. 1 is a flow chart of a Maven-based dependency package management method according to an embodiment of the present invention;
FIG. 2 is a schematic sub-flowchart of a Maven-based management method for a dependency package according to an embodiment of the present invention;
FIG. 3 is a flowchart of a method for managing a Maven-based dependency package according to another embodiment of the present invention;
FIG. 4 is a schematic block diagram of a Maven-based dependency package management apparatus according to an embodiment of the present invention;
FIG. 5 is a schematic block diagram of a first adding unit of a Maven-based management device for a dependent package according to an embodiment of the present invention;
FIG. 6 is a schematic block diagram of a storage unit of a Maven-based management device for a dependent package according to an embodiment of the invention;
FIG. 7 is a schematic block diagram of a Maven-based dependency package management apparatus according to another embodiment of the present invention; and
fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present invention.
Detailed Description
The following description of the embodiments of the present invention will be made clearly and fully with reference to the accompanying drawings, in which it is evident that the embodiments described are some, but not all embodiments of the invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
It should be understood that the terms "comprises" and "comprising," when used in this specification and the appended claims, specify the presence of stated features, integers, steps, operations, elements, and/or components, but do not preclude the presence or addition of one or more other features, integers, steps, operations, elements, components, and/or groups thereof.
It is also to be understood that the terminology used in the description of the invention herein is for the purpose of describing particular embodiments only and is not intended to be limiting of the invention. As used in this specification and the appended claims, the singular forms "a," "an," and "the" are intended to include the plural forms as well, unless the context clearly indicates otherwise.
It should be further understood that the term "and/or" as used in the present specification and the appended claims refers to any and all possible combinations of one or more of the associated listed items, and includes such combinations.
As used in this specification and the appended claims, the term "if" may be interpreted as "when..once" or "in response to a determination" or "in response to detection" depending on the context. Similarly, the phrase "if a determination" or "if a [ described condition or event ] is detected" may be interpreted in the context of meaning "upon determination" or "in response to determination" or "upon detection of a [ described condition or event ]" or "in response to detection of a [ described condition or event ]".
Referring to fig. 1, fig. 1 is a flow chart of a Maven-based dependency package management method according to an embodiment of the present invention. As shown, the method includes the following steps S1-S4.
S1, if an instruction for creating a dependency package is received, creating the dependency package in Maven, wherein the Maven comprises a core module, a support module and a middleware module.
In the embodiment of the invention, when the Maven tool receives an instruction for creating the dependency package, the dependency package is created in Maven, wherein the Maven comprises a core module, a support module and a middleware module. It is understood that creating a dependency package in Maven refers to creating a dependency package in any one of the core module, the support module, and the intermediary module.
It should be noted that, in the specific implementation, the core module is the basis of the Maven dependency package, and includes sub-modules such as a core sub-module and a dependency sub-module; the supporting module and the middleware module both need to rely on the core module, and the supporting module provides functions which can be realized without a third party middleware, such as single sign-on, and is developed based on the core module; while the middleware module provides encapsulation of third party open source components, such as caching middleware, message queues, etc.
S2, judging whether the dependency package exists in a core sub-module of the core module.
In the embodiment of the invention, a plurality of dependency packages can form a project, a pon.xml file exists under each project, when the dependency package is created, maven can read the pon.xml file under the root directory of the project, obtain configuration information required for creating the dependency package, and judge whether the dependency package exists in the core submodule of the core module based on the obtained configuration information. The configuration information comprises information such as version, name, dependency, plugin, member and the like. For example, by traversing the names in the configuration information, it may be determined whether the created dependent package exists in the core sub-module.
S3, if the core sub-module of the core module does not have the dependency package, adding the dependency package in the support module or the middleware module to the core sub-module of the core module.
In the embodiment of the invention, after the dependency package is created in Maven, it is required to determine which specific module of the core module, the support module and the intermediate module the created dependency package is created in, and the subsequent operations performed in different modules will be different. The dependency package in the core module is created in the core sub-module, so that it is necessary to first judge whether the dependency package exists in the core sub-module of the core module; if the dependency package does not exist in the core sub-module, the dependency package in the support module or the middleware module is added to the core sub-module of the core module.
It should be noted that, in the implementation, the core module is used to store the dependency package in the middleware module and the supporting module, and further includes an exception handling sub-module and an entity encapsulation sub-module, where the exception handling sub-module is used to handle the exception condition occurring in Maven; the entity encapsulation submodule is used for encapsulating the general attributes of the entity class.
In one embodiment, referring to FIG. 2, the step S3 includes the following steps S31-S33.
S31, judging whether the dependent package exists in the supporting module, if so, executing the step S32, otherwise, executing the step S33.
S32, adding the dependent package in a support module to the core sub-module of the core module.
S33, if the dependency package does not exist in the supporting module, the dependency package in the middleware module is added to the core sub-module of the core module.
In the embodiment of the invention, if the dependency package does not exist in the core sub-module, whether the dependency package is created in the support module or the middleware module is judged, and after the creation position of the dependency package is determined, the dependency package is required to be added into the core sub-module of the core module so as to facilitate management.
S4, storing the dependency information of the dependency package to the core module.
In the embodiment of the invention, after determining which of the core module, the support module and the middleware module is to create the dependency package, the dependency information of the dependency package needs to be stored in the Maven core module so that the core module can manage the created dependency package.
In the specific implementation, the version, the name, the dependence and the function of the dependence package are stored in a dependence sub-module in a Maven core module.
Fig. 3 is a flow chart of a method for managing a Maven-based dependency package according to another embodiment of the present invention. As shown in fig. 3, the Maven-based dependency package management method of the present embodiment includes steps S41 to S48. Steps S41 to S44 are similar to steps S1 to S4 in the above embodiment, and will not be described here again. Steps S45 to S48 added in this embodiment are described in detail below.
S45, if the dependency package exists in the core sub-module of the core module, judging whether the dependency package needs to be added in the support module, if the dependency package needs to be added in the support module, executing the step S46, otherwise executing the step S47.
S46, controlling the supporting module to call the dependent package, updating the dependent package to obtain the first dependent package, updating the dependent package of the core submodule according to the first dependent package, and executing step S44.
And S47, if the dependent package is not required to be added in the supporting module, judging whether the dependent package is required to be added in the middleware module, if the dependent package is required to be added in the middleware module, executing the step S48, otherwise executing the step S44.
S48, controlling the middleware module to call the dependent package, updating the dependent package to obtain the second dependent package, updating the dependent package of the core submodule according to the second dependent package, and executing step S44.
In the embodiment of the invention, after the dependency package is established in the core sub-module of the core module, whether the dependency package needs to be called in the support module and the middleware module or not is judged to be redeveloped, if the dependency package needs to be redeveloped in the support module, the redeveloped dependency package in the support module is called as a first dependency package, a second dependency is added to the core sub-module, and the version, the name, the dependency and the function in the first dependency package are stored in the dependency sub-module of the core module; if the dependency package is required to be redeveloped in the middleware module, the redeveloped dependency package in the middleware module is called a second dependency package, the second dependency package is added to the core sub-module, and the version, the name, the dependency and the function of the second dependency package are stored in the dependency sub-module of the core module, so that iterative development of the dependency package is realized.
Fig. 4 is a schematic block diagram of a Maven-based dependency package management apparatus 40 according to an embodiment of the present invention. As shown in fig. 4, the present invention also provides a Maven-based dependency package management apparatus 40 corresponding to the above Maven-based dependency package management method. The Maven-based dependency package management apparatus 40 includes a unit for performing the foregoing Maven-based dependency package management method, and the apparatus may be configured in a server, which may be a separate server or a server cluster formed by a plurality of servers. Specifically, referring to fig. 4, the Maven-based management device 40 includes a creation unit 41, a first determination unit 42, a first addition unit 43, and a storage unit 44.
The creating unit 41 is configured to create a dependency package in Maven if an instruction for creating the dependency package is received, where Maven includes a core module, a support module, and a middleware module; the judging unit 42 is configured to judge whether the dependency packet exists in a core sub-module of the core module; the adding unit 43 is configured to add the dependency package in the support module or the middleware module to the core sub-module of the core module if the core sub-module of the core module does not have the dependency package; the storage unit 44 is configured to store dependency information of the dependency package to the core module.
In an embodiment, as shown in fig. 5, the first adding unit 43 includes a first judging subunit 431, a first adding subunit 432, and a second adding subunit 433.
Wherein, the first judging subunit 431 is configured to judge whether the dependency packet exists in the supporting module; the first adding subunit 432 is configured to add the dependency package in the support module to the core submodule of the core module if the dependency package exists in the support module; the second adding subunit 433 is configured to add the dependency package in the middleware module to the core submodule of the core module if the dependency package does not exist in the support module.
In one embodiment, as shown in FIG. 6, the memory unit 44 includes a memory subunit 441.
The storage subunit 441 is configured to store the version, name, dependency and function of the dependency package to a dependency sub-module in the core module of Maven.
In an embodiment, as shown in fig. 7, the Maven-based management apparatus 40 further includes a second determination unit 45, a second addition unit 46, a third determination unit 47, and a third addition unit 48.
The second judging unit 45 is configured to judge whether the dependency package needs to be added to the supporting module if the dependency package exists in the core sub-module of the core module; the second adding unit 46 is configured to control the support module to call the dependency package, update the dependency package to obtain the first dependency package, and update the dependency package of the core submodule according to the first dependency package if the dependency package needs to be added in the support module; the third judging unit 47 is configured to judge whether the dependency package needs to be added in the middleware module if the dependency package does not need to be added in the supporting module; and the third adding unit 48 is configured to control the middleware module to call the dependency package, update the dependency package to obtain the second dependency package, and update the dependency package of the core submodule according to the second dependency package if the dependency package needs to be added in the middleware module.
It should be noted that, as will be clearly understood by those skilled in the art, the specific implementation process of the foregoing Maven-based packet-dependent management device 40 and each unit may refer to the corresponding descriptions in the foregoing method embodiments, and for convenience and brevity of description, the description is omitted here.
The Maven-based dependency package management apparatus described above may be implemented in the form of a computer program which is executable on a computer device as shown in fig. 8.
Referring to fig. 8, fig. 8 is a schematic block diagram of a computer device according to an embodiment of the present application. The computer device 500 is a server, and the server may be a stand-alone server or a server cluster formed by a plurality of servers.
With reference to FIG. 8, the computer device 500 includes a processor 502, memory, and a network interface 505 connected by a system bus 501, where the memory may include a non-volatile storage medium 503 and an internal memory 504.
The non-volatile storage medium 503 may store an operating system 5031 and a computer program 5032. The computer program 5032, when executed, may cause the processor 502 to perform a Maven-based dependency package management method.
The processor 502 is used to provide computing and control capabilities to support the operation of the overall computer device 500.
The internal memory 504 provides an environment for the execution of a computer program 5032 in the non-volatile storage medium 503, which computer program 5032, when executed by the processor 502, causes the processor 502 to perform a Maven-based method of managing dependency packages.
The network interface 505 is used for network communication with other devices. Those skilled in the art will appreciate that the architecture shown in fig. 8 is merely a block diagram of a portion of the architecture in connection with the present application and is not intended to limit the computer device 500 to which the present application is applied, and that a particular computer device 500 may include more or fewer components than shown, or may combine certain components, or have a different arrangement of components.
Wherein the processor 502 is configured to execute a computer program 5032 stored in a memory to implement the steps of:
if an instruction for creating a dependency package is received, creating the dependency package in Maven, wherein Maven comprises a core module, a supporting module and a middleware module;
judging whether the dependency package exists in a core sub-module of the core module;
if the dependency package does not exist in the core sub-module of the core module, adding the dependency package in the support module or the middleware module to the core sub-module of the core module;
and storing the dependency information of the dependency package to the core module.
In an embodiment, when the processor 502 implements the step of adding the dependency package in the support module or the middleware module to the core submodule of the core module if the core submodule of the core module does not exist, the following steps are specifically implemented:
judging whether the dependency package exists in the supporting module or not;
if the dependency package exists in the support module, adding the dependency package in the support module to the core sub-module of the core module;
if the dependency package does not exist in the support module, the dependency package in a middleware module is added to the core sub-module of the core module.
In one embodiment, after implementing the step of determining whether the dependency package exists in the core sub-module of the core module, the processor 502 specifically further includes the following steps:
if the dependency package exists in the core sub-module of the core module, judging whether the dependency package needs to be added in the supporting module;
if the dependency package needs to be added in the supporting module, controlling the supporting module to call the dependency package, updating the dependency package to obtain the first dependency package, and updating the dependency package of the core submodule according to the first dependency package;
the step of storing dependency information of the dependency package to the core module is performed.
In one embodiment, after implementing the step of determining whether the dependency package needs to be added to the support module, the processor 502 specifically further includes the following steps:
if the dependency package does not need to be added in the supporting module, judging whether the dependency package needs to be added in the middleware module or not;
if the dependency package needs to be added in the middleware module, controlling the middleware module to call the dependency package, updating the dependency package to obtain a second dependency package, and updating the dependency package of the core submodule according to the second dependency package;
the step of storing dependency information of the dependency package to the core module is performed.
In one embodiment, when implementing the step of storing the dependency information of the dependency package in the core module, the processor 502 specifically implements the following steps:
and storing the version, the name, the dependence and the function of the dependence package to a dependence sub-module in the core module of Maven.
It should be appreciated that in embodiments of the present application, the processor 502 may be a central processing unit (Central Processing Unit, CPU), the processor 502 may also be other general purpose processors, digital signal processors (Digital Signal Processor, DSP), application specific integrated circuits (Application Specific Integrated Circuit, ASIC), off-the-shelf Programmable gate arrays (FPGAs) or other Programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, or the like. Wherein the general purpose processor may be a microprocessor or the processor may be any conventional processor or the like.
Those skilled in the art will appreciate that all or part of the flow in a method embodying the above described embodiments may be accomplished by computer programs instructing the relevant hardware. The computer program may be stored in a storage medium that is a computer readable storage medium. The computer program is executed by at least one processor in the computer system to implement the flow steps of the embodiments of the method described above.
Accordingly, the present invention also provides a storage medium. The storage medium may be a computer readable storage medium. The storage medium stores a computer program. The computer program, when executed by a processor, causes the processor to perform the steps of:
if an instruction for creating a dependency package is received, creating the dependency package in Maven, wherein Maven comprises a core module, a supporting module and a middleware module;
judging whether the dependency package exists in a core sub-module of the core module;
if the dependency package does not exist in the core sub-module of the core module, adding the dependency package in the support module or the middleware module to the core sub-module of the core module;
and storing the dependency information of the dependency package to the core module.
In an embodiment, when the processor executes the computer program to implement the step of adding the dependency package in the support module or the middleware module to the core submodule of the core module if the core submodule of the core module does not have the dependency package, the steps are specifically implemented as follows:
judging whether the dependency package exists in the supporting module or not;
if the dependency package exists in the support module, adding the dependency package in the support module to the core sub-module of the core module;
if the dependency package does not exist in the support module, the dependency package in a middleware module is added to the core sub-module of the core module.
In one embodiment, after executing the computer program to implement the step of determining whether the dependency package exists in the core sub-module of the core module, the processor further specifically implements the following steps:
if the dependency package exists in the core sub-module of the core module, judging whether the dependency package needs to be added in the supporting module;
if the dependency package needs to be added in the supporting module, controlling the supporting module to call the dependency package, updating the dependency package to obtain the first dependency package, and updating the dependency package of the core submodule according to the first dependency package;
the step of storing dependency information of the dependency package to the core module is performed.
In one embodiment, after executing the computer program to implement the step of determining whether the dependency package needs to be added to the support module, the processor further specifically implements the following steps:
if the dependency package does not need to be added in the supporting module, judging whether the dependency package needs to be added in the middleware module or not;
if the dependency package needs to be added in the middleware module, controlling the middleware module to call the dependency package, updating the dependency package to obtain a second dependency package, and updating the dependency package of the core submodule according to the second dependency package;
the step of storing dependency information of the dependency package to the core module is performed.
In one embodiment, when the processor executes the computer program to implement the step of storing the dependency information of the dependency package to the core module, the processor specifically implements the following steps:
and storing the version, the name, the dependence and the function of the dependence package to a dependence sub-module in the core module of Maven.
The storage medium may be a U-disk, a removable hard disk, a Read-Only Memory (ROM), a magnetic disk, or an optical disk, or other various computer-readable storage media that can store program codes.
Those of ordinary skill in the art will appreciate that the elements and algorithm steps described in connection with the embodiments disclosed herein may be embodied in electronic hardware, in computer software, or in a combination of the two, and that the elements and steps of the examples have been generally described in terms of function in the foregoing description to clearly illustrate the interchangeability of hardware and software. Whether such functionality is implemented as hardware or software depends upon the particular application and design constraints imposed on the solution. Skilled artisans may implement the described functionality in varying ways for each particular application, but such implementation decisions should not be interpreted as causing a departure from the scope of the present invention.
In the several embodiments provided by the present invention, it should be understood that the disclosed apparatus and method may be implemented in other manners. For example, the device embodiments described above are merely illustrative. For example, the division of each unit is only one logic function division, and there may be another division manner in actual implementation. For example, multiple units or components may be combined or may be integrated into another system, or some features may be omitted, or not performed.
The steps in the method of the embodiment of the invention can be sequentially adjusted, combined and deleted according to actual needs. The units in the device of the embodiment of the invention can be combined, divided and deleted according to actual needs. In addition, each functional unit in the embodiments of the present invention may be integrated in one processing unit, or each unit may exist alone physically, or two or more units may be integrated in one unit.
The integrated unit may be stored in a storage medium if implemented in the form of a software functional unit and sold or used as a stand-alone product. Based on such understanding, the technical solution of the present invention is essentially or a part contributing to the prior art, or all or part of the technical solution may be embodied in the form of a software product stored in a storage medium, comprising several instructions for causing a computer device (which may be a personal computer, a terminal, a network device, etc.) to perform all or part of the steps of the method according to the embodiments of the present invention.
In the foregoing embodiments, the descriptions of the embodiments are focused on, and for those portions of one embodiment that are not described in detail, reference may be made to the related descriptions of other embodiments.
It will be apparent to those skilled in the art that various modifications and variations can be made to the present invention without departing from the spirit or scope of the invention. Thus, it is intended that the present invention also include such modifications and alterations insofar as they come within the scope of the appended claims or the equivalents thereof.
While the invention has been described with reference to certain preferred embodiments, it will be understood by those skilled in the art that various changes and substitutions of equivalents may be made and equivalents will be apparent to those skilled in the art without departing from the scope of the invention. Therefore, the protection scope of the invention is subject to the protection scope of the claims.

Claims (6)

1. A Maven-based dependency package management method, comprising:
if an instruction for creating a dependency package is received, creating the dependency package in Maven, wherein Maven comprises a core module, a supporting module and a middleware module;
acquiring configuration information required for creating the dependency package, wherein the configuration information comprises information of version, name, dependency, plugin and member;
judging whether the dependency package exists in a core sub-module of the core module or not by traversing the name in the configuration information;
if the dependency package exists in the core sub-module of the core module, judging whether the dependency package needs to be added in the supporting module;
if the dependency package does not need to be added in the supporting module, judging whether the dependency package needs to be added in the middleware module or not;
if the dependency package needs to be added in the middleware module, controlling the middleware module to call the dependency package, updating the dependency package to obtain a second dependency package, and updating the dependency package of the core submodule according to the second dependency package;
performing a step of storing dependency information of the dependency package to the core module;
if the dependency package needs to be added in the supporting module, controlling the supporting module to call the dependency package, updating the dependency package to obtain a first dependency package, and updating the dependency package of the core submodule according to the first dependency package;
performing a step of storing dependency information of the dependency package to the core module;
judging whether the dependency package exists in the supporting module or not;
if the dependency package exists in the support module, adding the dependency package in the support module to the core sub-module of the core module;
if the dependency package does not exist in the support module, adding the dependency package in a middleware module to the core sub-module of the core module;
and storing the dependency information of the dependency package to the core module.
2. The method of claim 1, wherein storing the dependency information of the dependency package to the core module comprises:
and storing the version, the name, the dependence and the function of the dependence package to a dependence sub-module in the core module of Maven.
3. The method of claim 1, wherein the core module further comprises an exception handling sub-module and an entity encapsulation sub-module, wherein the exception handling sub-module is configured to handle an exception condition occurring in Maven; the entity encapsulation submodule is used for encapsulating the general attribute of the entity class.
4. A Maven-based dependency package management apparatus, comprising:
the creation unit is used for creating a dependency package in Maven if an instruction for creating the dependency package is received, wherein the Maven comprises a core module, a support module and a middleware module;
the first judging unit is used for judging whether the dependency package exists in a core sub-module of the core module or not based on configuration information, wherein the configuration information comprises information of version, name, dependency, plug-in and member;
the first judging subunit is used for judging whether the dependency package exists in the core sub-module of the core module or not by traversing the name in the configuration information;
the second judging unit is used for judging whether the dependency package needs to be added in the supporting module if the dependency package exists in the core sub-module of the core module;
the third judging unit is used for judging whether the dependency package is required to be added in the middleware module if the dependency package is not required to be added in the supporting module;
the third adding unit is used for controlling the middleware module to call the dependent package and update the dependent package to obtain a second dependent package if the dependent package needs to be added in the middleware module, and updating the dependent package of the core submodule according to the second dependent package; performing a step of storing dependency information of the dependency package to the core module;
the second adding unit is used for controlling the supporting module to call the dependent package and update the dependent package to obtain a first dependent package if the dependent package needs to be added in the supporting module, and updating the dependent package of the core submodule according to the first dependent package; performing a step of storing dependency information of the dependency package to the core module;
a first adding subunit, configured to add, if the dependency package exists in the support module, the dependency package in the support module to the core submodule of the core module;
a second adding subunit configured to add the dependency package in a middleware module to the core submodule of the core module if the dependency package does not exist in the support module;
and the storage unit is used for storing the dependency information of the dependency package to the core module.
5. A computer device, characterized in that it comprises a memory on which a computer program is stored and a processor which, when executing the computer program, implements the method according to any of claims 1-3.
6. A computer readable storage medium, characterized in that the storage medium stores a computer program which, when executed by a processor, implements the method according to any of claims 1-3.
CN201911200434.5A 2019-11-29 2019-11-29 Maven-based dependency package management method, device, computer equipment and storage medium Active CN110989985B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201911200434.5A CN110989985B (en) 2019-11-29 2019-11-29 Maven-based dependency package management method, device, computer equipment and storage medium

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201911200434.5A CN110989985B (en) 2019-11-29 2019-11-29 Maven-based dependency package management method, device, computer equipment and storage medium

Publications (2)

Publication Number Publication Date
CN110989985A CN110989985A (en) 2020-04-10
CN110989985B true CN110989985B (en) 2024-01-23

Family

ID=70088243

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201911200434.5A Active CN110989985B (en) 2019-11-29 2019-11-29 Maven-based dependency package management method, device, computer equipment and storage medium

Country Status (1)

Country Link
CN (1) CN110989985B (en)

Families Citing this family (1)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN111813413B (en) * 2020-06-28 2022-12-16 四川长虹电器股份有限公司 Method for automatically generating YAML file

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354037A (en) * 2015-11-30 2016-02-24 用友优普信息技术有限公司 Modularized software developing method and software developing device
CN107329785A (en) * 2017-06-27 2017-11-07 郑州云海信息技术有限公司 A kind of method and system of dynamic load JavaScript modules
CN108228229A (en) * 2016-12-19 2018-06-29 深圳业拓讯通信科技有限公司 The management method and system that a kind of Maven is relied on
CN110096280A (en) * 2019-03-18 2019-08-06 中国平安人寿保险股份有限公司 Creation method, device, computer installation and the storage medium of code engineering

Family Cites Families (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US8707293B2 (en) * 2010-03-03 2014-04-22 Red Hat, Inc. Package management system
WO2015195418A1 (en) * 2014-06-16 2015-12-23 npm, Inc. Software package management

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN105354037A (en) * 2015-11-30 2016-02-24 用友优普信息技术有限公司 Modularized software developing method and software developing device
CN108228229A (en) * 2016-12-19 2018-06-29 深圳业拓讯通信科技有限公司 The management method and system that a kind of Maven is relied on
CN107329785A (en) * 2017-06-27 2017-11-07 郑州云海信息技术有限公司 A kind of method and system of dynamic load JavaScript modules
CN110096280A (en) * 2019-03-18 2019-08-06 中国平安人寿保险股份有限公司 Creation method, device, computer installation and the storage medium of code engineering

Also Published As

Publication number Publication date
CN110989985A (en) 2020-04-10

Similar Documents

Publication Publication Date Title
US20190324772A1 (en) Method and device for processing smart contracts
US11343103B2 (en) Sending cross-chain authenticatable messages
JP6616774B2 (en) Anti-malware type mobile content data management apparatus and method
CN107908488B (en) Message request interface interaction method and device, computer equipment and storage medium
WO2020177429A1 (en) Method and apparatus for embedding codes in application, and electronic device
US10715628B2 (en) Attribute operating method and device
CN110851207B (en) State transition management method and device, electronic equipment and storage medium
US9692745B2 (en) Single sign-on without a broker application
CN111831365A (en) Interface route forwarding method, system, computer equipment and readable storage medium
CN110989985B (en) Maven-based dependency package management method, device, computer equipment and storage medium
CN108664343B (en) State calling method and device for micro-service
CN111338716A (en) Data processing method and device based on rule engine and terminal equipment
CN111507676A (en) Method, device, storage medium and system for establishing and implementing business order flow
CN110647463B (en) Method and device for restoring test breakpoint and electronic equipment
CN114879942B (en) Distributed time wheel group registration verification method, device, medium and equipment
CN110930253A (en) Intelligent contract internal main key generation method and device, computer equipment and storage medium
CN111045746A (en) Code expansion method and framework
CN110727537B (en) Method, device, computer equipment and storage medium for uniformly processing response message
CN110610423B (en) Processing method for supporting stateful contract and stateless contract for block chain intelligent contract platform
KR101351867B1 (en) Method of handling step execution result in software and application control management object
JP5716469B2 (en) Wrapper program and integrated circuit device
CN111273897A (en) Block chain resource consumption method and device, storage medium and electronic equipment
CN114968407B (en) Plug-in calling method, device, electronic equipment and storage medium
TWI828181B (en) Version management system and version management method
CN110704295A (en) Data calling method, device, equipment and system

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
GR01 Patent grant
GR01 Patent grant