CN112650505A - Web project generation, deployment and configuration method - Google Patents

Web project generation, deployment and configuration method Download PDF

Info

Publication number
CN112650505A
CN112650505A CN202011522470.6A CN202011522470A CN112650505A CN 112650505 A CN112650505 A CN 112650505A CN 202011522470 A CN202011522470 A CN 202011522470A CN 112650505 A CN112650505 A CN 112650505A
Authority
CN
China
Prior art keywords
project
strategy
pom
tag
xml
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.)
Pending
Application number
CN202011522470.6A
Other languages
Chinese (zh)
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.)
Sichuan Changhong Electric Co Ltd
Original Assignee
Sichuan Changhong Electric 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 Sichuan Changhong Electric Co Ltd filed Critical Sichuan Changhong Electric Co Ltd
Priority to CN202011522470.6A priority Critical patent/CN112650505A/en
Publication of CN112650505A publication Critical patent/CN112650505A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F8/00Arrangements for software engineering
    • G06F8/60Software deployment
    • GPHYSICS
    • G06COMPUTING; CALCULATING OR COUNTING
    • G06FELECTRIC DIGITAL DATA PROCESSING
    • G06F16/00Information retrieval; Database structures therefor; File system structures therefor
    • G06F16/80Information retrieval; Database structures therefor; File system structures therefor of semi-structured data, e.g. markup language structured data such as SGML, XML or HTML
    • G06F16/81Indexing, e.g. XML tags; Data structures therefor; Storage structures

Landscapes

  • Engineering & Computer Science (AREA)
  • Theoretical Computer Science (AREA)
  • Software Systems (AREA)
  • General Engineering & Computer Science (AREA)
  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Data Mining & Analysis (AREA)
  • Databases & Information Systems (AREA)
  • Information Retrieval, Db Structures And Fs Structures Therefor (AREA)

Abstract

The invention discloses a web project generation deployment configuration method, which draws a tree data structure by scanning the dependency relationship of projects, calculates the time complexity of all policies from a root to a leaf according to the time complexity of each node, and automatically realizes the generation of an optimal deployment configuration file only by inputting a project directory, thereby finding the optimal deployment configuration method and generating the deployment configuration file with the highest efficiency.

Description

Web project generation, deployment and configuration method
Technical Field
The invention relates to the technical field of software, in particular to a method for generating, deploying and configuring a web project.
Background
At present, automatic deployment is used for web projects, but when large-scale integrated projects are encountered, due to the fact that the dependency relationship among the projects is complex, the complexity of each sub-project is different, compiling of deployment configuration files is very troublesome, and the execution of deployment configuration is very slow, so that the on-line actual use efficiency is low, and a large amount of time is wasted for multiple persons using the projects.
Disclosure of Invention
The invention aims to provide a method for generating, deploying and configuring a web project, which aims to solve the problems.
The invention realizes the purpose through the following technical scheme:
a web project generation deployment configuration method comprises the following steps:
step 1, finding out files with names of pom.xml under the whole project path in a file name searching mode, reading information of each pom.xml file, locating a < artifactId > tag under a < parent > tag in the pom.xml, locating the project name recorded in the tag as b, locating the < artifactId > tag in the pom.xml, and then locating the project name recorded in the tag as a, so that the project a is a sub-project of the project b, and then drawing a leaf of which the data structure is a and b is a root of the a;
step 2, traversing the tree data structure, wherein a plurality of ways of going from root to leaf exist, each way is a strategy, and the recording strategies are X1, X2, … … and Xn;
step 3, executing each sub-module, recording the consumed time of each node, bringing the consumed time into the recorded strategy, and calculating the consumed time of all the strategies X;
step 4, counting the time of all the strategies X, wherein the strategy deployment efficiency with the shortest time consumption is the highest;
and 5, generating the configuration of the build items a, b and c according to the optimal deployment strategy Xi and the strategy sequence, and generating a configuration instruction for transferring and starting the items war to realize the optimal deployment configuration.
In the step 1, when all the pom. xml files are completely read, the root nodes of all the sub-items can be obtained, and the tree data structure diagram of the whole integrated item is drawn successfully.
Further, in step 2, the form of any policy Xi is recorded as Xi + a + b + c + d or Xi + a + b + c.
The invention has the beneficial effects that:
according to the method for generating, deploying and configuring the web project, a tree data structure is drawn through the dependency relationship of scanning projects, the time complexity of all policies from a root to a leaf is calculated according to the time complexity of each node, and the optimal deployment and configuration file generation is automatically realized only by inputting a project directory, so that the optimal deployment and configuration method is found, and the deployment and configuration file with the highest efficiency is generated.
Drawings
In order to more clearly illustrate the technical solutions in the embodiments of the present invention, the following briefly introduces the embodiments or the drawings needed to be practical in the prior art description, and obviously, the drawings in the following description are only some embodiments of the present invention, and other drawings can be obtained by those skilled in the art without creative efforts.
FIG. 1 is a flow chart of the present invention.
FIG. 2 is a flow chart of an embodiment of the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the present invention more apparent, the technical solutions of the present invention will be described in detail below. It is to be understood that the described embodiments are merely exemplary of the invention, and not restrictive of the full scope of the invention. All other embodiments, which can be derived by a person skilled in the art from the examples given herein without any inventive step, are within the scope of the present invention.
In any embodiment, as shown in fig. 1, a method for generating, deploying and configuring a web project of the present invention includes the following steps:
step 1, finding out files with names of pom.xml under the whole project path in a file name searching mode, reading information of each pom.xml file, locating a < artifactId > tag under a < parent > tag in the pom.xml, locating the project name recorded in the tag as b, locating the < artifactId > tag in the pom.xml, and then locating the project name recorded in the tag as a, so that the project a is a sub-project of the project b, and then drawing a leaf of which the data structure is a and b is a root of the a; and when all the pom.xml files are read, the root nodes of all the sub-items can be obtained, and the tree data structure diagram of the whole integrated item is drawn successfully.
Step 2, traversing the tree data structure, wherein a plurality of ways of going from root to leaf exist, each way is a strategy, and the recording strategies are X1, X2, … … and Xn; the form of any strategy Xi is reported as Xi + a + b + c + d or Xi + a + b + c.
Step 3, executing each sub-module, recording the consumed time of each node, bringing the consumed time into the recorded strategy, and calculating the consumed time of all the strategies X;
step 4, counting the time of all the strategies X, wherein the strategy deployment efficiency with the shortest time consumption is the highest;
and 5, generating the configuration of the build items a, b and c according to the optimal deployment strategy Xi and the strategy sequence, and generating a configuration instruction for transferring and starting the items war to realize the optimal deployment configuration.
In a specific embodiment, as shown in fig. 2, a method for generating, deploying and configuring a web project of the present invention includes the following steps:
step 1, after a directory address of an integrated project h is input, a file with a name of pom.xml under a project path of the h is found, wherein the file with the name of pom.xml comprises a project, a project and a project, a parent project recorded in a < artifactId > tag under a < parent > tag of the project b is a, and a and c are independent projects under the project h. A tree structure such as the one shown in fig. 2 can then be rendered;
and 2, drawing a tree data structure according to the obtained dependency relationships of all the sub-items, traversing all the nodes, and taking all the nodes as a strategy to obtain a traditional strategy x1 ═ a + b + c, and a traditional strategy x2 ═ a + b) and c.
Step 3, the time of each node in the data structure is executed separately, if a is 2s, b is 2s, and c is 3 s. The strategy X1-7 s and X2-4 s
Step 4, because the strategy X2 is more time-saving and has higher efficiency, the strategy is determined as the optimal strategy;
and 5, when the automatic deployment configuration file is generated according to the optimal deployment strategy X2, the items a, b and c are separated into build packets and war packets, and a program is started, so that the deployment efficiency is improved.
The above description is only for the specific embodiments of the present invention, but the scope of the present invention is not limited thereto, and any person skilled in the art can easily conceive of the changes or substitutions within the technical scope of the present invention, and all the changes or substitutions should be covered within the scope of the present invention. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims. It should be noted that the various technical features described in the above embodiments can be combined in any suitable manner without contradiction, and the invention is not described in any way for the possible combinations in order to avoid unnecessary repetition. In addition, any combination of the various embodiments of the present invention is also possible, and the same should be considered as the disclosure of the present invention as long as it does not depart from the spirit of the present invention.

Claims (3)

1. A method for generating, deploying and configuring a web project is characterized by comprising the following steps:
step 1, finding out files with names of pom.xml under the whole project path in a file name searching mode, reading information of each pom.xml file, locating a < artifactId > tag under a < parent > tag in the pom.xml, locating the project name recorded in the tag as b, locating the < artifactId > tag in the pom.xml, and then locating the project name recorded in the tag as a, so that the project a is a sub-project of the project b, and then drawing a leaf of which the data structure is a and b is a root of the a;
step 2, traversing the tree data structure, wherein a plurality of ways of going from root to leaf exist, each way is a strategy, and the recording strategies are X1, X2, … … and Xn;
step 3, executing each sub-module, recording the consumed time of each node, bringing the consumed time into the recorded strategy, and calculating the consumed time of all the strategies X;
step 4, counting the time of all the strategies X, wherein the strategy deployment efficiency with the shortest time consumption is the highest;
and 5, generating the configuration of the build items a, b and c according to the optimal deployment strategy Xi and the strategy sequence, and generating a configuration instruction for transferring and starting the items war to realize the optimal deployment configuration.
2. The method as claimed in claim 1, wherein in step 1, when all the pom. xml files are read, the root nodes of all the sub-items are obtained, and the tree data structure diagram of the whole integrated item is drawn successfully.
3. A method as claimed in claim 1, wherein in step 2, the form of any policy Xi is recorded as Xi + a + b + c + d or Xi + a + b + c.
CN202011522470.6A 2020-12-21 2020-12-21 Web project generation, deployment and configuration method Pending CN112650505A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202011522470.6A CN112650505A (en) 2020-12-21 2020-12-21 Web project generation, deployment and configuration method

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202011522470.6A CN112650505A (en) 2020-12-21 2020-12-21 Web project generation, deployment and configuration method

Publications (1)

Publication Number Publication Date
CN112650505A true CN112650505A (en) 2021-04-13

Family

ID=75359143

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202011522470.6A Pending CN112650505A (en) 2020-12-21 2020-12-21 Web project generation, deployment and configuration method

Country Status (1)

Country Link
CN (1) CN112650505A (en)

Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722361A (en) * 2011-03-31 2012-10-10 新奥特(北京)视频技术有限公司 UML activity diagram-based complex platform software deployment instruction method
CN104156269A (en) * 2014-07-22 2014-11-19 华东师范大学 Timed automata based software and hardware optimal-partition visualizing method
WO2018173481A1 (en) * 2017-03-24 2018-09-27 日本電気株式会社 Service configuration design device and service configuration design method
CN108762769A (en) * 2018-06-04 2018-11-06 万惠投资管理有限公司 Micro services application layout and dispositions method, device and terminal
CN108776589A (en) * 2018-06-04 2018-11-09 中国电子科技集团公司第十四研究所 The dispositions method of Radar Signal Processing component software
CN110109702A (en) * 2019-05-16 2019-08-09 福州大学 Android computation migration on-line decision method based on code analysis
CN110737460A (en) * 2019-09-04 2020-01-31 厦门网宿有限公司 platform project management method and device

Patent Citations (7)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN102722361A (en) * 2011-03-31 2012-10-10 新奥特(北京)视频技术有限公司 UML activity diagram-based complex platform software deployment instruction method
CN104156269A (en) * 2014-07-22 2014-11-19 华东师范大学 Timed automata based software and hardware optimal-partition visualizing method
WO2018173481A1 (en) * 2017-03-24 2018-09-27 日本電気株式会社 Service configuration design device and service configuration design method
CN108762769A (en) * 2018-06-04 2018-11-06 万惠投资管理有限公司 Micro services application layout and dispositions method, device and terminal
CN108776589A (en) * 2018-06-04 2018-11-09 中国电子科技集团公司第十四研究所 The dispositions method of Radar Signal Processing component software
CN110109702A (en) * 2019-05-16 2019-08-09 福州大学 Android computation migration on-line decision method based on code analysis
CN110737460A (en) * 2019-09-04 2020-01-31 厦门网宿有限公司 platform project management method and device

Similar Documents

Publication Publication Date Title
CN102201009B (en) Form generating method and device
CN107743072B (en) Efficient and extensible network simulation scene generation method
RU2370808C2 (en) System and method for data display with enclosed tables without circuit diagram
CN109634598A (en) A kind of page display method, device, equipment and storage medium
CN102346747B (en) Method for searching parameters in data model
Guha et al. Efficient recovery from power outage
CN110471666A (en) Code automatic switching method and device, code converter and medium
US20070021995A1 (en) Discovering patterns of executions in business processes
JP2011060277A (en) Integration environment generator
US20120110444A1 (en) Help Document Animated Visualization
CN112287007A (en) Industrial production data real-time processing method and system based on Flink SQL engine
CN111124379B (en) Page generation method and device, electronic equipment and storage medium
CN112130856A (en) Method, system, medium and terminal for generating front-end visual interface with strong expansibility
CN106202006A (en) Document generating method and device
CN111597484A (en) UI dynamic generation method
CN111142849B (en) Flow processing method, device, storage medium and processor
CN102681855A (en) Model-to-code converting method facing wireless sensor network
CN112650505A (en) Web project generation, deployment and configuration method
CN102420812A (en) Automatic quality of service (QoS) combination method supporting distributed parallel processing in web service
CN106484488A (en) Integrated cloud compilation method and system
Sun et al. Interactive Web service composition based on Petri net
CN111625596A (en) Multi-source data synchronous sharing method and system for real-time consumption scheduling of new energy
CN101324846B (en) Method for creating data model according to ASN.1 information dynamic state
KR101342560B1 (en) Mobile Database System for Navigation and Method Therefor
Ning et al. BPELGEN: an algorithm of automatically converting from web services composition plan to BPEL4WS

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
RJ01 Rejection of invention patent application after publication
RJ01 Rejection of invention patent application after publication

Application publication date: 20210413