Maven 如何为不同的环境打包 —— 开发、测试和生产环境

  1. <profiles>  
  2.     <profile>  
  3.         <id>kaifa</id>  
  4.         <activation>  
  5.             <activeByDefault>true</activeByDefault>  
  6.         </activation>  
  7.         <build>  
  8.             <filters>  
  9.                 <filter>${basedir}/filters/kaifa/db.properties</filter>  
  10.             </filters>  
  11.         </build>  
  12.     </profile>  
  13.       
  14.     <profile>  
  15.         <id>shengchan</id>  
  16.         <build>  
  17.             <filters>  
  18.                 <filter>${basedir}/filters/shengchan/db.properties</filter>  
  19.             </filters>  
  20.         </build>  
  21.     </profile>  
  22. </profiles>  
posted @ 2017-03-17 16:32  update_  阅读(937)  评论(0编辑  收藏  举报