--- 博客已遷移至: http://www.sealyu.com/blog
# filter.properties my.filter.value=hello!
將對它的引用添加到pom.xml中:
<build> <filters> <filter>${baseDir}/pom.properties</filter> </filters> </build> 不過這種方式要啟動資源過濾,并設置好對應的文件夾才行,相對較麻煩。 2.使用插件: maven-properties-plugin 使用方法可以看插件的官方地址:http://haroon.sis.utoronto.ca/zarar/properties-maven-plugin/index.html
Powered by: BlogJava Copyright © seal