2011-02-25 116 views

回答

2

Properties Maven Plugin看看:

的屬性Maven插件是在這裏 讓生活與性能處理 時更容易一些。它提供了 文件的讀寫屬性以及 文件的目標以及設置系統 屬性的目標。

它的主要用例是從文件而不是 在pom.xml中宣稱它們加載 性質,一些 與 不同環境打交道時派上用場。

用法:

<plugin> 
    <groupId>org.codehaus.mojo</groupId> 
    <artifactId>properties-maven-plugin</artifactId> 
    <version>1.0-alpha-2</version> 
    <executions> 
    <execution> 
     <phase>initialize</phase> 
     <goals> 
      <goal>read-project-properties</goal> 
     </goals> 
     <configuration> 
      <files> 
      <file>etc/config/dev.properties</file> 
      </files> 
     </configuration> 
     </execution> 
    </executions> 
</plugin>