2つのフォルダを含むzipファイルを作成しようとしていますが、各フォルダにはpom内の特定の依存関係のプラグインが含まれます。私は現在、正しい構造を作成することができますが、例えば最初の依存関係のjarファイルが2番目の依存ファイルのjarファイルに収まらないようにしたいと考えています。次のように 私の現在のポンポン構造は次のとおりです。mavenアセンブリ内のjarのすべての依存関係を削除します
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>PARENT-GROUP</groupId>
<artifactId>PARENT-ARTIFACT</artifactId>
<version>0.2.0-SNAPSHOT</version>
</parent>
<groupId>GROUP-ID</groupId>
<artifactId>ARTIFACT-ID</artifactId>
<properties>
<main.project>MAIN-PROJECT</main.project>
<plugin.version>0.0.1-SNAPSHOT</plugin.version>
<plugin.artifact>PLUGIN-ID</plugin.artifact>
</properties>
<dependencies>
<dependency>
<groupId>PLUGIN-GROUP</groupId>
<artifactId>${plugin.artifact}</artifactId>
<version>${plugin.version}</version>
</dependency>
<dependency>
<groupId>SECOND-DEPENDENCY</groupId>
<artifactId>SECOND-ARTIFACT-ID</artifactId>
<version>${project.parent.version}</version>
</dependency>
</dependencies>
<build>
<finalName>${main.project}-${project.parent.version}</finalName>
<plugins>
<plugin>
<artifactId>maven-assembly-plugin</artifactId>
<version>2.4</version>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>single</goal>
</goals>
</execution>
</executions>
<configuration>
<appendAssemblyId>false</appendAssemblyId>
<descriptors>
<descriptor>${project.basedir}/src/zip.xml</descriptor>
</descriptors>
</configuration>
</plugin>
</plugins>
</build>
</project>
私は取得していますポンポン内の2つの依存関係を持って見ることができるように。私が望む出力は次のフォルダ構造です main \ lib:同じフォルダ内のすべての依存関係を持つ2番目の依存関係jarが含まれています。 main \ plugin \ plugin:すべての最初の依存関係(プラグインとすべての依存関係)が含まれていて、両方のフォルダには最初の依存関係が含まれてはいけません。これまでのところ私は、次のアセンブリのXML
<assembly
xmlns="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/plugins/maven-assembly-plugin/assembly/1.1.0 http://maven.apache.org/xsd/assembly-1.1.0.xsd">
<id>release</id>
<formats>
<format>zip</format>
</formats>
<includeBaseDirectory>false</includeBaseDirectory>
<dependencySets>
<dependencySet>
<outputDirectory>/lib</outputDirectory>
<unpack>false</unpack>
<useProjectArtifact>false</useProjectArtifact>
<excludes>
<exclude>
*:${plugin.artifact}
</exclude>
</excludes>
</dependencySet>
<dependencySet>
<outputDirectory>/plugins/${plugin.artifact}-${plugin.version}/${plugin.artifact}-${plugin.version}</outputDirectory>
<unpack>false</unpack>
<useProjectArtifact>false</useProjectArtifact>
<excludes>
<exclude>
*:SECOND-ARTIFACT-ID
</exclude>
</excludes>
</dependencySet>
</dependencySets>
</assembly>
が出ている。この私が、それぞれの依存関係を排除するためのより良い方法があるかどうかを知りたい私の書き込みフォルダ構造を与えるが、両方で依存関係を含んでいますjarを自動的に1つずつ除外するのではなく、自動的に表示します。