我使用 Maven 将 Java EE 项目打包为 war。
我使用 tomcat-maven-plugin,我只是简单地 "mvn clean tomcat deploy" 。
一切正常,除了没有打包到 War 文件中的文件夹。
此文件夹是 src/main/java 下的源文件夹,其中只有 *.vm 文件(不是 .java 文件),它们是我的 Velocity 模板。
有没有办法告诉 maven 打包这个文件夹!(我怀疑只考虑带有 .java 文件的包)
在控制台中我得到:
[INFO] --- maven-war-plugin:2.1.1:war (default-war) @ accueil_individu ---
[INFO] Packaging webapp
[INFO] Assembling webapp [accueil_individu] in [D:\DevSpring\workspace\accueil_individu\target\accueil_individu]
[INFO] Processing war project
[INFO] Copying webapp resources [D:\DevSpring\workspace\accueil_individu\src\main\webapp]
[INFO] Processing overlay [ id org.springframework.security:spring-security-samples-cas-client]
[INFO] Webapp assembled in [1699 msecs]
[INFO] Building war: D:\DevSpring\workspace\accueil_individu\target\accueil_individu.war
[WARNING] Warning: selected war files include a WEB-INF/web.xml which will be ignored
(webxml attribute is missing from war task, or ignoreWebxml attribute is specified as 'true')
[INFO]
[INFO] <<< tomcat-maven-plugin:1.1:deploy (default-cli) @ accueil_individu <<<
[INFO]
[INFO] --- tomcat-maven-plugin:1.1:deploy (default-cli) @ accueil_individu ---
[INFO] Deploying war to http://pcwebapps02.ifma.fr:8080/accueil_individu
[INFO] OK - Application déployée pour le chemin de contexte /accueil_individu
[INFO] ------------------------------------------------------------------------
[INFO] BUILD SUCCESS