将解压缩的文件添加到生成的jar(MAVEN)

时间:2018-01-04 09:35:06

标签: maven jar maven-dependency-plugin

我是一个使用maven的新手,所以我很难实现看似简单的事情。

我正在拆包这样的依赖:

<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<version>3.0.2</version>
<executions>
    <execution>
        <id>unpack-dependencies</id>
        <phase>prepare-package</phase>
        <goals>
          <goal>unpack-dependencies</goal>
        </goals>
        <configuration>
            <includes>**/*.jar</includes>
            <outputDirectory>${project.build.directory}/alternateLocation</outputDirectory>
            <overWriteReleases>false</overWriteReleases>
            <overWriteSnapshots>true</overWriteSnapshots>
        </configuration>
    </execution>
</executions>

Source

我在targetDirectory / alternateLocation中看到了jar文件,但是如何将它们添加到最终的jar?

0 个答案:

没有答案