![Spring 5.0 Cookbook](https://wfqqreader-1252317822.image.myqcloud.com/cover/699/36700699/b_36700699.jpg)
上QQ阅读APP看书,第一时间看更新
How to do it...
Open the POM file of your Maven project and add the following details:
- There is no available working Maven plugin for Tomcat 9 so we need to use the latest stable version, which is tomcat7-maven-plugin. Add the following Maven plugin details for Tomcat 7 deployment under the <plugins> section of the <build>:
<plugin> <groupId>org.apache.tomcat.maven</groupId> <artifactId>tomcat7-maven-plugin</artifactId> <version>2.2</version> <configuration> <url>https://spring5server:8443/manager/text</url> <path>/ch01</path> <keystoreFile>C:MyFilesDevelopmentServersTomcat9.0 confspring5server.keystore</keystoreFile> <keystorePass>packt@@</keystorePass> <update>true</update> <username>packt</username> <password>packt</password> </configuration> </plugin>
- Right-click on the project and click on Run As | Maven Build... and execute the following goal: clean install tomcat7:deploy
![](https://epubservercos.yuewen.com/0AC9E4/19470403601617006/epubprivate/OEBPS/Images/a1ebb3ba-7911-4820-aece-1403dcf56539.png?sign=1738856949-kYijyWkLBUBwHWQ17xVDnCPdXVL6yCoo-0-e32a7f484e7d82f1e0913d9eaab82257)
- Everything is successful if the console outputs this Maven log:
![](https://epubservercos.yuewen.com/0AC9E4/19470403601617006/epubprivate/OEBPS/Images/b71a8a38-536d-4097-bfb2-c4688d476bf9.png?sign=1738856949-thzZzqNMeTDRgKGT9hoqDWOG9BanTCaj-0-5eac37f60e0b9652c5d19fcdc45ef8ec)