Как я могу комбинировать банки с помощью Maven?

Следующий фрагмент создает 2 баночки:

<plugin>
    <groupId>org.apache.maven.plugins</groupId>
    <artifactId>maven-jar-plugin</artifactId>
    <version>2.4</version>
    <executions>
        <execution>
            <id>build-dependency</id>
            <phase>compile</phase>
            <goals>
                <goal>jar</goal>
            </goals>
            <configuration>
                <classifier>dependency</classifier>
                <classesDirectory>${project.build.directory}\dependency</classesDirectory>
                <includes>
                    <include>${dependancyInclude}</include>
                </includes>
            </configuration>
        </execution>
        <execution>
            <phase>compile</phase>
            <goals>
                <goal>jar</goal>
            </goals>
            <configuration>
                <classifier>module</classifier>
                <classesDirectory>${project.build.directory}\classes</classesDirectory>
            </configuration>
        </execution>
    </executions>
</plugin>

Я хотел бы объединить эти два файла JAR в один, используя плагин сборки, в настоящее время у меня есть следующее:

<plugin>
    <artifactId>maven-assembly-plugin</artifactId>
    <version>2.2</version>
    <executions>
        <!-- Combine all the JARs in the /target folder into one JAR -->
        <execution>
            <id>make-assembly</id>
            <phase>compile</phase>
            <goals>
                <goal>single</goal>
            </goals>
            <configuration>
                <attach>true</attach>
                <descriptorRefs>
                    <descriptorRef>jar-with-dependencies</descriptorRef>
                </descriptorRefs>
                <finalName>${project.artifactId}-${project.version}</finalName>
                <appendAssemblyId>true</appendAssemblyId>
            </configuration>
        </execution>
    </executions>
</plugin>

В настоящее время только один из двух JARS включен в окончательный JAR, который создается плагином сборки.

Ответы на вопрос(1)

Ваш ответ на вопрос