eclipse使用maven install 命令,生成war包中没有jsp/js/css的解决方法

Posted 杨柳春色

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了eclipse使用maven install 命令,生成war包中没有jsp/js/css的解决方法相关的知识,希望对你有一定的参考价值。

在pom.xml文件中添加如下11行代码就可以了。

  1. <build>  
  2.         <plugins>  
  3.             <plugin>  
  4.                 <groupId>org.apache.maven.plugins</groupId>  
  5.                 <artifactId>maven-war-plugin</artifactId>  
  6.                 <version>2.1.1</version>  
  7.                 <configuration>  
  8.                         <!--指定web.xml的路径  -->  
  9.                     <webXml>WebRoot\WEB-INF\web.xml</webXml>  
  10.                     <!--指定jsp、js、css的路劲  -->  
  11.                     <warSourceDirectory>WebRoot</warSourceDirectory>  
  12.                 </configuration>  
  13.             </plugin>  
  14.         </plugins>  
  15. </build>  

以上是关于eclipse使用maven install 命令,生成war包中没有jsp/js/css的解决方法的主要内容,如果未能解决你的问题,请参考以下文章

maven 的install插件放在哪

Eclipse中Maven Install时发生错误

eclipse debug as-->maven install 报 is not a maven project

eclipse maven install 跳过 test 阶段

eclipse整合maven打包的时候跳过测试

在eclipse中,maven项目在Run As中找不到maven package是怎么回事?