1
使用Maven 3.0.4如何讓maven多模塊程序集將war文件放入jar文件的獨立子目錄中?
我有一個多模塊Maven項目,一些模塊製造戰爭的文件,以及一些生產jar文件,作爲各自勁歌宣佈
我想創建一個分發歸檔jar工件和依賴關係進入一個子目錄,webapp工件(sans依賴關係)進入另一個子目錄。
像
project.tar/lib <-- module jars and deps here
project.tar/webapp <-- wars here
這是很簡單的得到裝配在一個目錄中傾倒的一切。
這是我曾嘗試:
<assembly>
<id>bin</id>
<formats>
<format>tar.gz</format>
</formats>
<moduleSets>
<moduleSet>
<includes>
<include>${module.groupId}:${module.artifactId}:war:${module.version}</include>
</includes>
<binaries>
<includeDependencies>false</includeDependencies>
<outputDirectory>webapp</outputDirectory>
</binaries>
</moduleSet>
<moduleSet>
<includes>
<include>${module.groupId}:${module.artifactId}:jar:${module.version}</include>
</includes>
<binaries>
<includeDependencies>true</includeDependencies>
<outputDirectory>lib</outputDirectory>
</binaries>
</moduleSet>
</moduleSets>
</assembly>
現在,當我運行它,我得到這些警告:
[INFO] Reading assembly descriptor: assembly.xml
[WARNING] The following patterns were never triggered in this artifact inclusion filter:
o '${module.groupId}:${module.artifactId}:war:${module.version}'
[WARNING] The following patterns were never triggered in this artifact inclusion filter:
o '${module.groupId}:${module.artifactId}:jar:${module.version}'
[WARNING] The following patterns were never triggered in this artifact inclusion filter:
o '${module.groupId}:${module.artifactId}:war:${module.version}'
[WARNING] NOTE: Currently, inclusion of module dependencies may produce unpredictable results if a version conflict occurs.
[WARNING] The following patterns were never triggered in this artifact inclusion filter:
o '${module.groupId}:${module.artifactId}:jar:${module.version}'
不知道我做錯了。我的包含內容遵循maven的網頁上指定的「group:artifact:version」模式。
謝謝