004-Maven related operations in IDEA of Java Web Learning (3)

The virtual path mapping relationship is as follows: The
004-Maven related operations in IDEA of Java Web Learning (3)
displayed Hello World! is the content in index.jsp.
12. The right side of the Maven project is composed of
004-Maven related operations in IDEA of Java Web Learning (3)
13. The pom file
pom.xml is the core configuration file of Maven.
004-Maven related operations in IDEA of Java Web Learning (3)
004-Maven related operations in IDEA of Java Web Learning (3)
004-Maven related operations in IDEA of Java Web Learning (3)
004-Maven related operations in IDEA of Java Web Learning (3)
004-Maven related operations in IDEA of Java Web Learning (3)
14. Using the empty project javaweb-01-maven02 just created, manually add content in pom.xml
004-Maven related operations in IDEA of Java Web Learning (3)

004-Maven related operations in IDEA of Java Web Learning (3)
Import the jar package through the Maven repository https://mvnrepository.com/:
004-Maven related operations in IDEA of Java Web Learning (3)
004-Maven related operations in IDEA of Java Web Learning (3)
004-Maven related operations in IDEA of Java Web Learning (3)
15. Since Maven's agreement is greater than the configuration, we may encounter the problem that the configuration file we wrote cannot be exported or become effective in the future. The solution is https: //www.cnblogs.com/pixy/p/4798089.html
<build>
<resources>
<resource>
<directory>src/main/resources</directory>
<excludes>
<exclude> /*.properties</exclude>
<exclude>* / .xml</exclude>
</excludes>
<filtering>false</filtering>
</resource>
<resource>
<directory>src/main/java</directory>
<includes>
<include>
/* .properties</include>
<include>* / .xml</include>
</includes>
<filtering>false</filtering>
</resource>
</resources>
</build>
Add the above code to the pom.xml file.
004-Maven related operations in IDEA of Java Web Learning (3)
16. Possible problems:
1. If there is a jar package in the local warehouse directory before, it is best to delete it in advance and then build the project.
2. In the website project, the web.xml file in the WEB-INF directory should be replaced with the web.xml of the tomcat version you are using.

Guess you like

Origin blog.51cto.com/12859164/2543883