Today, when packing, we found that there was no static resource configured in the packet.
(Right-click Project---"Run as---> 8 Maven install)
It was later discovered because there was no configuration to package static resources in Pom.xml.
<resources> gives the specific path of each resource in the MAVEN project.
<Build> <Finalname>Project</Finalname> <Resources> <Resource> <Directory>Src/main/java</Directory> <includes> <include>**/*.xml</include> <include>**/*.properties</include> </includes> <filtering>True</filtering> </Resource> <Resource> <Directory>Src/main/resources</Directory> <includes> <include>**/*.properties</include> <include>**/*.xml</include> <include>**/*.tld</include> </includes> <filtering>True</filtering> </Resource> </Resources> </Build>
Finalname: The name of the final result of the build,
Directory: The path to the resource file,
Includes: A set of file name matching patterns, the matching resource file will be processed by the build process
Filtering: Whether the resource is filtered during the build process, false by default
When Eclipse uses MAVEN to package, it finds that static resources are not included.