How can I make the test jar include dependencies in Maven?

后端 未结 6 1788
广开言路
广开言路 2020-12-28 20:05

I have a project with src/main/java and src/test/java structure, and I managed to use maven-jar-plugin to build a jar of the test branch. However, I want to package the test

6条回答
  •  独厮守ぢ
    2020-12-28 20:27

    You can do this: Create a jar assembly with the assembly plugin, have the dependencies unpacked, pack a new test jar and attach it to the reactor. You're done.

    The descriptor for the packaging could look like this.

提交回复
热议问题