首页 > 其他 > 详细

maven 配置多环境properties

时间:2015-05-21 02:08:27      阅读:451      评论:0      收藏:0      [点我收藏+]
   <build>
   
  <filters>   
    <filter>src/main/resources/filters/filter-${env}.properties</filter>
  </filters>
   <resources>
    <resource>
      <directory>src/main/resources</directory>
      <filtering>true</filtering>
    </resource>
  </resources>
  
 </build>

?

?

 <profiles>
  <profile>
    <id>local</id>
    <activation>
      <activeByDefault>true</activeByDefault>
    </activation>
    <properties>
      <env>local</env>
    </properties>
  </profile>
  <profile>
    <id>dev</id>
    <properties>
      <env>dev</env>
    </properties>
  </profile>
  <profile>
    <id>qa</id>
    <properties>
      <env>qa</env>
    </properties>
  </profile>
</profiles>
  

?

修改POM.XML 加入上述代码

使用clean install -Plocal 来运行

-P后可以使用QA DEV LOCAL

maven 配置多环境properties

原文:http://laravel.iteye.com/blog/2212923

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!