In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-19 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Internet Technology >
Share
Shulou(Shulou.com)06/02 Report--
This article mainly explains "how to release warp package to tomcat by maven". Interested friends may wish to have a look at it. The method introduced in this paper is simple, fast and practical. Let's let the editor take you to learn "how to release warp packages to tomcat by maven".
The principle of packaging and concurrency to tomcat through maven is as follows:
First type the code into a war package locally, then call the API * ${host} / manager/text of tomcat to upload the war package to the webapp* directory of tomcat, and restart tomcat.
Therefore, the following steps are required
Configure tomcat permissions so that war packets can be sent through the interface
Configure ip addresses that tomcat allows access
Configure tomcat user name, password and other information in the setting of maven
Configure the address of the maven and the name of the release project in the pom.xml of maven
Step 1: configure tomcat permissions so that war packets can be sent through the interface
Edit the tomcat configuration file ${Catalina_home} / con/tomcat_users.xml with the following configuration permissions:
Manager-gui: allow access to html interface (i.e. URL path is / manager/html/) manager-script means allow access to plain text interface (i.e. URL path is / manager/text/)
Step 2: configure the ip address that tomcat allows access to
Edit the tomcat configuration file ${Catalina_home} / webapp/manager/META-INF/context.xml and comment out the * * under the context node. The result is as follows:
Step 3: configure tomcat user name, password and other information in the setting of maven
Edit the setting file in maven and add a server child node to the servers node as follows:
Step 4 of tomcat-maven deploy deploy: configure the address of maven and the name of the release project in the pom.xml of maven
Edit the pom.xml file in maven, and add the plugin node to plugins earlier:
Org.apache.tomcat.maven tomcat7-maven-plugin 2.1 tomcat-maven http://30.23.76.63:8080/manager/text / ${finalName}
Server must be consistent with the value of id in step 3
So far, the configuration has been completed, just package and release
Publishing method: you only need to add the tomcat7:redeploy command after the maven packaging command, as follows:
Mvn package-Dmaven.test.skip=true tomcat7:redeploy
At this point, I believe you have a deeper understanding of "how maven releases warp packages to tomcat". You might as well do it in practice. Here is the website, more related content can enter the relevant channels to inquire, follow us, continue to learn!
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.