CN113885891A - Tomcat application deployment method and system based on ant technology - Google Patents
Tomcat application deployment method and system based on ant technology Download PDFInfo
- Publication number
- CN113885891A CN113885891A CN202111171642.4A CN202111171642A CN113885891A CN 113885891 A CN113885891 A CN 113885891A CN 202111171642 A CN202111171642 A CN 202111171642A CN 113885891 A CN113885891 A CN 113885891A
- Authority
- CN
- China
- Prior art keywords
- tomcat
- configuration information
- compiling
- application deployment
- interaction
- 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
Links
Images
Classifications
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/60—Software deployment
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/40—Transformation of program code
- G06F8/41—Compilation
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F8/00—Arrangements for software engineering
- G06F8/70—Software maintenance or management
- G06F8/71—Version control; Configuration management
-
- G—PHYSICS
- G06—COMPUTING; CALCULATING OR COUNTING
- G06F—ELECTRIC DIGITAL DATA PROCESSING
- G06F9/00—Arrangements for program control, e.g. control units
- G06F9/06—Arrangements for program control, e.g. control units using stored programs, i.e. using an internal store of processing equipment to receive or retain programs
- G06F9/44—Arrangements for executing specific programs
- G06F9/445—Program loading or initiating
- G06F9/44505—Configuring for program initiating, e.g. using registry, configuration files
- G06F9/4451—User profiles; Roaming
Landscapes
- Engineering & Computer Science (AREA)
- Software Systems (AREA)
- Theoretical Computer Science (AREA)
- General Engineering & Computer Science (AREA)
- Physics & Mathematics (AREA)
- General Physics & Mathematics (AREA)
- Computer Security & Cryptography (AREA)
- Stored Programmes (AREA)
Abstract
The invention discloses a tomcat application deployment method and a tomcat application deployment system based on ant technology, wherein the tomcat application deployment method comprises the following steps: acquiring and sending current interaction configuration information; receiving the interactive configuration information and calling a compiler; and executing the compiling program, compiling the template file, writing the interactive configuration information into the template file, and automatically installing. The system comprises: the interactive configuration module is used for acquiring and sending current interactive configuration information; the server is used for receiving the interactive configuration information and calling the compiler; and the compiling module is used for compiling the program execution and compiling the template file and writing the interactive configuration information into the template file. The invention provides a tomcat application deployment method and system based on an ant technology, which are closely combined with tomcat service automatic installation, and solve a series of complex and fussy operations of tomcat service installation, thereby improving the simplification and accuracy of installation and realizing the automation of the installation process.
Description
Technical Field
The invention relates to the technical field of server installation, in particular to a tomcat application deployment method and system based on ant technology.
Background
In the field of computer programming, Java is popular with programmers as one of the earliest mainstream programming languages, and program operating environments mainly include tomcat and weblogic, wherein tomcat is open source and weblogic is profitable. Tomcat is therefore more widely used.
On an application server, the port number has uniqueness, and the tomcat service is associated with a plurality of ports, which requires that whether the configured port number is occupied or not is detected when tomcat installation information is configured, otherwise, normal use of other ports is affected. If only one tomcat service is configured on one server, the configuration is simple, but if an application system is huge, programs are more, memory overflow occurs when the tomcat service is deployed under one tomcat, the tomcat service cannot be normally started directly, a plurality of tomcat services are needed, and the plurality of tomcat services need to consume more time for information configuration.
At present, most tomcat installation and deployment are manual, service names and port numbers of tomcat are mainly configured, uniqueness is required to be guaranteed to tomcat configuration information on the same server, port occupation cannot be caused, and multiple tomcat services are configured manually for multiple times. The process is complex and tedious, whether the configured port number is occupied or not cannot be guaranteed, and the occupation condition of the port number needs to be manually confirmed.
Disclosure of Invention
In view of this, an object of the embodiments of the present invention is to provide a tomcat application deployment method and system based on ant technology, which can solve a series of complex and tedious operations for tomcat service installation, thereby improving the simplification and accuracy of installation and realizing automation of the installation process.
In a first aspect, an embodiment of the present invention provides a tomcat application deployment method based on an ant technology, where the tomcat application deployment method includes:
and acquiring and sending the current interaction configuration information.
And receiving the interactive configuration information and calling the compiler.
And executing the compiling program, compiling the template file, writing the interactive configuration information into the template file, and automatically installing.
The interactive configuration information comprises a tomcat name and a port number, input information is checked before installation, the uniqueness of the input information is ensured, otherwise, the name and the port conflict can be caused, and the normal use of other tomcat services is influenced.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where the obtaining and sending current interaction configuration information includes:
and decompressing the tar file containing the current tomcat interaction configuration information.
And sending tomcat interaction configuration information in a json format.
With reference to the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where the executing and compiling of the compiler program and writing the interactive configuration information into the template file for automatic installation include:
and executing the shell command on the build file.
And compiling the build file, and writing tomcat interaction configuration information into the build file.
The method comprises the steps of automatically performing steps to be performed, manually performing the steps one by one without using a cross-platform component tool, configuring a compiled file which is generally a file in a build.xml format, and executing the steps one by the Ant according to a rule defined by the compiled file, wherein the execution command of the build.xml is a shell command.
And the tomcat interaction configuration information is submitted to a background server in a json format at a web client, the background program calls an Ant related program according to the configuration information, the Ant program can find a corresponding build.xml file, meanwhile, the configuration information is written into the build.xml file, and then the compiling and the execution are carried out step by step.
With reference to the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where the third possible implementation manner further includes:
and detecting whether the currently sent tomcat interaction configuration information is correct, if so, continuing to execute, and if not, resending other tomcat interaction configuration information.
With reference to the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the method further includes:
and detecting whether the compiling is correct, if so, completing the deployment, and if not, resending other tomcat interaction configuration information.
The technical effects are as follows: if a certain step fails, the whole execution process is terminated, and the subsequent steps cannot be continuously executed, so that the problem can be timely found in the automatic deployment process.
In a second aspect, an embodiment of the present invention further provides a tomcat application deployment system based on an ant technology, where the tomcat application deployment system includes:
and the interactive configuration module is used for acquiring and sending the current interactive configuration information.
And the server is used for receiving the interactive configuration information and calling the compiler.
And the compiling module is used for compiling the program execution and compiling the template file, writing the interactive configuration information into the template file and automatically installing.
With reference to the second aspect, an embodiment of the present invention provides a first possible implementation manner of the second aspect, where the interaction configuration module includes:
and the decompression unit is used for decompressing the tar file containing the current tomcat interaction configuration information.
And the configuration unit is used for sending the tomcat interaction configuration information in the json format.
The interactive configuration module adopts a human-computer interaction interface, so that the whole installation process is more humanized, and meanwhile, the interface checks the installation accuracy, thereby avoiding a series of complex and repeated configuration work; if multiple tomcat services are installed on one server, the automated approach will play a greater role.
With reference to the second aspect, an embodiment of the present invention provides a second possible implementation manner of the second aspect, where the compiling module includes:
and the execution unit is used for executing the shell command on the build file.
And the compiling unit is used for compiling the build file and writing the tomcat interaction configuration information into the build file.
With reference to the second aspect, an embodiment of the present invention provides a third possible implementation manner of the second aspect, where the third possible implementation manner further includes:
and the configuration detection module is used for detecting whether the currently sent tomcat interaction configuration information is correct or not, if so, continuing execution, and if not, resending other tomcat interaction configuration information.
With reference to the second aspect, an embodiment of the present invention provides a fourth possible implementation manner of the second aspect, where the fourth possible implementation manner further includes:
and the compiling detection module is used for detecting whether the compiling is correct or not, finishing the deployment if the compiling is correct, and resending other tomcat interactive configuration information if the compiling is wrong.
The embodiment of the invention has the beneficial effects that:
the invention provides a tomcat application deployment method and system based on ant technology, which are closely combined with a brand-new solution of tomcat service automatic installation, and solve a series of complex and fussy operations of tomcat service installation, thereby improving the simplification and accuracy of installation and realizing the automation of the installation process.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present invention, the drawings needed to be used in the embodiments will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present invention and therefore should not be considered as limiting the scope, and for those skilled in the art, other related drawings can be obtained according to the drawings without inventive efforts.
FIG. 1 is a flow chart of a tomcat application deployment method based on ant technology of the present invention;
fig. 2 is a complete flow diagram of the tomcat application deployment method based on ant technology of the present invention.
FIG. 3 is a diagram illustrating tomcat configuration information according to the present invention.
Detailed Description
In order to make the objects, technical solutions and advantages of the embodiments of the present invention clearer, the technical solutions in the embodiments of the present invention will be clearly and completely described below with reference to the drawings in the embodiments of the present invention, and it is obvious that the described embodiments are some, but not all, embodiments of the present invention. The components of embodiments of the present invention generally described and illustrated in the figures herein can be arranged and designed in a wide variety of different configurations.
Referring to fig. 1 to fig. 3, a first embodiment of the present invention provides a tomcat application deployment method based on ant technology, which includes:
acquiring and sending current interaction configuration information;
receiving the interactive configuration information and calling a compiler;
and executing the compiling program, compiling the template file, writing the interactive configuration information into the template file, and automatically installing.
As shown in fig. 3, the tomcat interaction configuration information is that the name and port number of tomcat check the input information before installation, so as to ensure the uniqueness of the tomcat, otherwise, the name and port conflict may be caused, thereby affecting the normal use of other tomcat services.
With reference to the first aspect, an embodiment of the present invention provides a first possible implementation manner of the first aspect, where the obtaining and sending current interaction configuration information includes:
decompressing a tar file containing current tomcat interaction configuration information;
and sending tomcat interaction configuration information in a json format.
With reference to the first aspect, an embodiment of the present invention provides a second possible implementation manner of the first aspect, where the executing and compiling of the compiler program and writing the interactive configuration information into the template file for automatic installation include:
executing a shell command on the build file;
and compiling the build file, and writing tomcat interaction configuration information into the build file.
The method comprises the steps of automatically performing steps to be performed, manually performing the steps one by one without using a cross-platform component tool, configuring a compiled file which is generally a file in a build.xml format, and executing the steps one by the Ant according to a rule defined by the compiled file, wherein the execution command of the build.xml is a shell command.
And the Tomcat interaction configuration information is submitted to a background server in a json format at a web client, the background program calls an Ant related program according to the configuration information, the Ant program can find a corresponding build.xml file, meanwhile, the configuration information is written into the build.xml file, and then the compiling and the execution are carried out step by step.
With reference to the first aspect, an embodiment of the present invention provides a third possible implementation manner of the first aspect, where the third possible implementation manner further includes:
and detecting whether the currently sent tomcat interaction configuration information is correct, if so, continuing to execute, and if not, resending other tomcat interaction configuration information.
With reference to the first aspect, an embodiment of the present invention provides a fourth possible implementation manner of the first aspect, where the method further includes:
and detecting whether the compiling is correct, if so, completing the deployment, and if not, resending other tomcat interaction configuration information.
If a certain step fails, the whole execution process is terminated, and the subsequent steps cannot be continuously executed, so that the problem can be timely found in the automatic deployment process.
Referring to fig. 3, a second embodiment of the present invention provides a tomcat application deployment system based on ant technology, which includes:
the interactive configuration module is used for acquiring and sending current interactive configuration information;
the server is used for receiving the interactive configuration information and calling the compiler;
and the compiling module is used for compiling the program execution and compiling the template file, writing the interactive configuration information into the template file and automatically installing.
With reference to the second aspect, an embodiment of the present invention provides a first possible implementation manner of the second aspect, where the interaction configuration module includes:
the decompression unit is used for decompressing tar files containing current tomcat interaction configuration information;
and the configuration unit is used for sending the tomcat interaction configuration information in the json format.
The interactive configuration module adopts a human-computer interaction interface, so that the whole installation process is more humanized, and meanwhile, the interface checks the installation accuracy, thereby avoiding a series of complex and repeated configuration work; if multiple tomcat services are installed on one server, the automated approach will play a greater role.
With reference to the second aspect, an embodiment of the present invention provides a second possible implementation manner of the second aspect, where the compiling module includes:
the execution unit is used for executing the shell command on the build file;
and the compiling unit is used for compiling the build file and writing the tomcat interaction configuration information into the build file.
With reference to the second aspect, an embodiment of the present invention provides a third possible implementation manner of the second aspect, where the third possible implementation manner further includes:
and the configuration detection module is used for detecting whether the currently sent tomcat interaction configuration information is correct or not, if so, continuing execution, and if not, resending other tomcat interaction configuration information.
With reference to the second aspect, an embodiment of the present invention provides a fourth possible implementation manner of the second aspect, where the fourth possible implementation manner further includes:
and the compiling detection module is used for detecting whether the compiling is correct or not, finishing the deployment if the compiling is correct, and resending other tomcat interactive configuration information if the compiling is wrong.
The embodiment of the invention aims to protect a tomcat application deployment method and system based on ant technology, and has the following effects:
the invention provides a tomcat application deployment method and system based on ant technology, which realize integral installation automation by changing a traditional manual configuration mode into an ant mode, enable the automatic installation to be more humanized by a friendly human-computer interface, solve a series of complex and fussy operations of tomcat service installation, improve the simplification and accuracy of installation and realize the automation of the installation process.
The tomcat application deployment method and apparatus based on ant technology provided in the embodiments of the present invention include a computer-readable storage medium storing a program code, where instructions included in the program code may be used to execute the method in the foregoing method embodiments, and specific implementation may refer to the method embodiments, which are not described herein again.
Specifically, the storage medium can be a general storage medium, such as a mobile disk, a hard disk, and the like, and when a computer program on the storage medium is run, the tomcat application deployment method based on the ant technology can be executed, so that the simplicity and accuracy of installation can be improved, and the automation of the installation process can be realized.
The functions, if implemented in the form of software functional units and sold or used as a stand-alone product, may be stored in a non-volatile computer-readable storage medium executable by a processor. Based on such understanding, the technical solution of the present invention may be embodied in the form of a software product, which is stored in a storage medium and includes instructions for causing a computer device (which may be a personal computer, a server, or a network device) to execute all or part of the steps of the method according to the embodiments of the present invention. And the aforementioned storage medium includes: various media capable of storing program codes, such as a usb disk, a removable hard disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a magnetic disk, or an optical disk.
Finally, it should be noted that: the above-mentioned embodiments are only specific embodiments of the present invention, which are used for illustrating the technical solutions of the present invention and not for limiting the same, and the protection scope of the present invention is not limited thereto, although the present invention is described in detail with reference to the foregoing embodiments, those skilled in the art should understand that: any person skilled in the art can modify or easily conceive the technical solutions described in the foregoing embodiments or equivalent substitutes for some technical features within the technical scope of the present disclosure; such modifications, changes or substitutions do not depart from the spirit and scope of the embodiments of the present invention, and they should be construed as being included therein. Therefore, the protection scope of the present invention shall be subject to the protection scope of the appended claims.
Claims (10)
1. A tomcat application deployment method based on ant technology is characterized by comprising the following steps:
acquiring and sending current interaction configuration information;
receiving the interactive configuration information and calling a compiler;
and executing the compiling program, compiling the template file, writing the interactive configuration information into the template file, and automatically installing.
2. The tomcat application deployment method based on ant technology as claimed in claim 1, wherein the obtaining and sending current interaction configuration information comprises:
decompressing a tar file containing current tomcat interaction configuration information;
and sending tomcat interaction configuration information in a json format.
3. The tomcat application deployment method based on ant technology as claimed in claim 1, wherein the compiler executes and compiles a template file, writes interactive configuration information into the template file, and performs automatic installation, including:
executing a shell command on the build file;
and compiling the build file, and writing tomcat interaction configuration information into the build file.
4. The tomcat application deployment method based on ant technology as claimed in claim 1, further comprising:
and detecting whether the currently sent tomcat interaction configuration information is correct, if so, continuing to execute, and if not, resending other tomcat interaction configuration information.
5. The tomcat application deployment method based on ant technology as claimed in claim 1, further comprising:
and detecting whether the compiling is correct, if so, completing the deployment, and if not, resending other tomcat interaction configuration information.
6. A tomcat application deployment system based on ant technology is characterized by comprising:
the interactive configuration module is used for acquiring and sending current interactive configuration information;
the server is used for receiving the interactive configuration information and calling the compiler;
and the compiling module is used for compiling the program execution and compiling the template file, writing the interactive configuration information into the template file and automatically installing.
7. The tomcat application deployment system based on ant technology as claimed in claim 6, wherein the interaction configuration module comprises:
the decompression unit is used for decompressing tar files containing current tomcat interaction configuration information;
and the configuration unit is used for sending the tomcat interaction configuration information in the json format.
8. The ant technology based tomcat application deployment system of claim 6, wherein the compiling module comprises:
the execution unit is used for executing the shell command on the build file;
and the compiling unit is used for compiling the build file and writing the tomcat interaction configuration information into the build file.
9. The tomcat application deployment system based on ant technology as claimed in claim 6, further comprising:
and the configuration detection module is used for detecting whether the currently sent tomcat interaction configuration information is correct or not, if so, continuing execution, and if not, resending other tomcat interaction configuration information.
10. The tomcat application deployment system based on ant technology as claimed in claim 6, further comprising:
and the compiling detection module is used for detecting whether the compiling is correct or not, finishing the deployment if the compiling is correct, and resending other tomcat interactive configuration information if the compiling is wrong.
Priority Applications (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111171642.4A CN113885891A (en) | 2021-10-08 | 2021-10-08 | Tomcat application deployment method and system based on ant technology |
Applications Claiming Priority (1)
Application Number | Priority Date | Filing Date | Title |
---|---|---|---|
CN202111171642.4A CN113885891A (en) | 2021-10-08 | 2021-10-08 | Tomcat application deployment method and system based on ant technology |
Publications (1)
Publication Number | Publication Date |
---|---|
CN113885891A true CN113885891A (en) | 2022-01-04 |
Family
ID=79005388
Family Applications (1)
Application Number | Title | Priority Date | Filing Date |
---|---|---|---|
CN202111171642.4A Pending CN113885891A (en) | 2021-10-08 | 2021-10-08 | Tomcat application deployment method and system based on ant technology |
Country Status (1)
Country | Link |
---|---|
CN (1) | CN113885891A (en) |
-
2021
- 2021-10-08 CN CN202111171642.4A patent/CN113885891A/en active Pending
Similar Documents
Publication | Publication Date | Title |
---|---|---|
US11579856B2 (en) | Multi-chip compatible compiling method and device | |
CN108304307B (en) | Performance detection method of intelligent contract on block chain | |
KR100868762B1 (en) | Method of error detecting method for embedded sofeware | |
US8392884B2 (en) | Test case automatic generation method for testing proactive GSM application on SIM cards | |
CN107832059B (en) | Code static analysis method and device based on Makefile | |
CN110990019A (en) | Java class analysis method and device, storage medium and electronic equipment | |
US10248409B1 (en) | Limiting the effects of source code patches on corresponding native-code patches | |
JP2010097426A (en) | Computer program, and device and method for receiving input of source program | |
CN107179982B (en) | Cross-process debugging method and device | |
JP2010134643A (en) | Test case selection method and selection system | |
CN111679852A (en) | Detection method and device for conflict dependency library | |
US20190087160A1 (en) | System and method for creating domain specific language | |
CN112379940A (en) | Executable file processing method and device, electronic equipment and storage medium | |
CN113885891A (en) | Tomcat application deployment method and system based on ant technology | |
CN111596970A (en) | Dynamic library delay loading method, device, equipment and storage medium | |
CN103176903A (en) | Testing method and testing device of MapReduce distributed system program | |
CN113821195B (en) | Method, device and equipment for generating executable program of target language | |
WO2023098015A1 (en) | Chip platform upgrade method and related device | |
CN113641389B (en) | Software upgrading method, device and equipment based on OpenCPU | |
CN115344268A (en) | Multi-platform embedded development environment compiling method and device | |
US9250878B1 (en) | Function attribute for dynamic stack allocation | |
JP2009258796A (en) | Program development device and program development method | |
CN115168175A (en) | Program error solving method, device, electronic equipment and storage medium | |
CN113656006A (en) | Rich text rendering method and rendering equipment | |
CN107562430B (en) | Compiling method for file processing function of mobile pi-calculus language |
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 |