-1
我需要使用maven來複制一些文件。這裏是我的文件夾結構是什麼樣子: `使用maven複製文件
+code
+trunk
+delivery
-pom.xml
+myFramework
+catalog
-pom.xml
+target
+classes
-catalog.properties
-catalog.xml
+orders
-pom.xml
+target
+classes
-orders.properties
-orders.xml
+common
-pom.xml
+target
+classes
-common.properties
-common.xml
-pom.xml
+myOther
+stuff
+moreStuff
+target
+classes
-moreStuff.properties
-pom.xml
-pom.xml
-pom.xml
+Test
-pom.xml
+distros
+dome`
的加分(+)是目錄和減號( - )的文件。
我必須對傳遞文件夾中的pom.xml進行更改。需要發生的事情是,需要將catalog,orders,common和moreStuff文件夾中的屬性和xml文件複製到dome文件夾。
因此,執行傳遞pom後的最終結果是dome目錄包含catalog.properties,catalog.xml,orders.properties,orders.xml,common.properties,common.xml和moreStuff.properties。
我認爲這與您可以用程序集插件完成的工作完全匹配:http://maven.apache.org/plugins/maven-assembly-plugin/(假設您想創建可分發文件)。否則資源插件應該已經可以做你想做的事了。目錄結構是否重要?是否可以將distros文件夾移動到目標/最頂層的pom.xml中?這將簡化路徑處理。 – wemu