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

后端 未结 6 1792
广开言路
广开言路 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:25

    to include a test-jar dependency in your assembly specify the include filter of the assembly debendencySet as bellow:

    ...
    
        /
        
            *:jar:*
            *:test-jar:*
        
    
    ...
    

提交回复
热议问题