目前我们使用遮光罐子。试图找到一种更直接的方法。
谢谢!
为此,您需要将依赖项下载到您选择的文件夹,例如:
<plugin>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<phase>package</phase>
<goals>
<goal>copy-dependency</goal>
</goals>
<configuration>
<outputDirectory>${project.build.directory}/lib</outputDirectory>
</configuration>
<execution>
</executions>
</plugin>
这样,我将所有依赖项复制到
target/lib
文件夹中。稍后,您只需在 <configuration>
插件的 jdeb
标签内使用此路径,如下所示:
<plugin>
<groupId>org.vafer</groupId>
<artifactId>jdeb</artifactId>
<executions>
<execution>
...
<dataSet>
<data>
<type>directory</type>
<src>${project.build.directory}/lib</src>
<mapper>
<type>perm</type>
<prefix>{newpath}</prefix>
</mapper>
</data>
</dataSet>
</execution>
</executions>
</plugin>