How to include dependency with 'provided' scope with maven-assembly-plugin

前端 未结 5 581
被撕碎了的回忆
被撕碎了的回忆 2021-02-01 18:27

I am fighting with maven to include a managed dependency with \'provided\' scope into tar file by using the maven-assembly-plugin.

I use super parent pom file as a base

5条回答
  •  眼角桃花
    2021-02-01 18:50

    I encountered a similar issue, trying to assemble a project with a dependency with scope "provided". I found a workaround for this issue:

    • Leave the dependency in "provided" scope
    • Copy the dependency to the target folder using the maven-dependency-plugin (example)
    • Use a fileSet in the assembly descriptor to bundle the dependency as a file.

提交回复
热议问题