我々は、リリースまでをパックするのmavenを使用し、インストールフォルダを持っている、
このインストールフォルダには、いくつかの静的ファイルを持っている、とのpom.xml
ビルド目標はコピーすることです静的ファイルをターゲットインストールフォルダにコピーし、リポジトリからいくつかのZIPファイル(
)を展開して展開し、/ unzippedの下のターゲットフォルダに配置します。Mavenの - モジュールおよびというモジュールVS依存性やdependencySets
インストールフォルダ:
/installation_folder
pom.xml
/some_files
/file1
/file2
ターゲットフォルダのような次のようになります。この「インストールPOM」で
/target
/installation_files
/some_files
/file1
/file2
/unzipped
/prj1 - unzipped artifact prj1 from the repository
/prj2 - unzipped artifact prj2 from the repository
- 私は、アセンブリXMLへの参照を持っています。静的ファイルをコピーして、リポジトリからアーティファクトを取得することができます。
質問は、リポジトリからzipをコピーし、ターゲット/解凍されたフォルダに展開します。
モジュールとmoduleSetまたは依存関係とdependencySetsを使用する必要がありますか? project.group installation_project ポンポン
<modules>
<module>prj1</module>
<module>prj2</module>
</modules>
...
とassembly.xml:
<moduleSets>
<moduleSet>
<includes>
<include>*:*</include>
</includes>
<binaries>
<unpack>true</unpack>
</binaries>
</binaries>
</moduleSet>
はのpom.xml + assembly.xmlは次のようになります。
これは次のようになります。
<project>
<groupId>project.group</groupId>
<artifactId>installation_project</artifactId>
<packaging>pom</packaging>
<dependencies>
<dependency>
<artifactId>prj1</artifactId>
<groupId>gruop_id</groupId>
<version>1.0-SNAPSHOT</version>
<type>zip</type>
</dependency>
<dependency>
<artifactId>prj2</artifactId>
<groupId>gruop_id</groupId>
<version>2.0</version>
<type>zip</type>
</dependency>
</dependencies>
...
とassembly.xml:
<dependencySets>
<dependencySet>
<outputDirectory>installation_files/unzipped/</outputDirectory>
<outputFileNameMapping>${artifact.artifactId}</outputFileNameMapping>
<includes>
<include>*:*:zip</include>
</includes>
<unpack>true</unpack>
</dependencySet>
</dependencySets>
ありがとうございました!