- Spring 5.0 Cookbook
- Sherwin John Calleja Tragura
- 96字
- 2021-07-08 10:16:09
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=1739667981-9QglgDRDJLQ7LwLcPEgpShAXV7aKpS3p-0-c01d60131fe80a621a825aeface54747)
- 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=1739667981-mePGPPC6vG3r4tleRL4ESoLSKfz5hi1o-0-03627ac1ae3ce1342d7a5fae209719bd)