Generate test-jar along with jar file in test package

后端 未结 2 1117
暗喜
暗喜 2020-12-03 05:24

I want to package my test package to jar file . How to execute generate test-jar from maven plugin Surefire.

2条回答
  •  余生分开走
    2020-12-03 05:50

    By using the following configuration you can create a jar from your tests:

      
        org.apache.maven.plugins
        maven-jar-plugin
        2.6
        
          
            
              test-jar
            
          
        
      
    

    To use such kind of artifact:

      
        
          groupId
          artifactId
          test-jar
          version
          tests
          test
        
      
    

提交回复
热议问题