pom.xml 配置詳解

  <!--這個元素描述了所有資源路徑列表,例如和項目相關的屬性文件,這些資源被包含在最終的打包文件裏。-->
  <resources>
   <!--這個元素描述了所有資源路徑-->
   <resource>
    <!--描述了資源的目標路徑。該路徑<strong>相對target/classes目錄</strong>(例如${project.build.outputDirectory})。舉個例子,如果你想資源在特定的包裏(org.apache.maven.messages),你就必須該元素設置爲org/apache/maven/messages。然而,如果你只是想把資源放到源碼目錄結構裏,就不需要該配置。-->
    <targetPath/>
    <!--是否使用參數值代替參數名。參數值取自properties元素或者文件裏配置的屬性,文件在filters元素裏列出。-->
    <filtering/>
    <!--描述存放資源的目錄,該路徑<strong>相對POM路徑</strong>-->
    <directory/>
    <!--包含的模式列表,例如**/*.xml.-->
    <includes/>
    <!--排除的模式列表,例如**/*.xml-->
    <excludes/>
   </resource>
  </resources>

例:

		<resources>
			<resource>
				<directory>src/main/config</directory>
				<targetPath>../config</targetPath>
			</resource>
			<resource>
				<directory>src/main/resources</directory>
				<targetPath>../resources</targetPath>
			</resource>
			<resource>
				<directory>src/main/bin</directory>
				<targetPath>../bin</targetPath>
			</resource>
		</resources>










http://blog.csdn.net/longeremmy/article/details/9670619

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章