Include new test directory maven surefire plugin

前端 未结 2 1870
情歌与酒
情歌与酒 2021-01-14 07:38

Existing Structure : src/test/java --> All java unit tests. This gets picked up easily by Maven surefire plugin. Now, in addition to these java unit test cases, I want to i

2条回答
  •  孤街浪徒
    2021-01-14 08:16

    The following pom is working:

    
    
      4.0.0
    
      com.soebes.groovy
      first-groovy
      0.0.1-SNAPSHOT
    
      Test Groovy Scripting
    
      
        UTF-8
        UTF-8
      
    
      
        
          org.codehaus.gmaven.runtime
          gmaven-runtime-2.0
          1.5
        
        
          org.codehaus.groovy
          groovy-all
          2.0.0
        
        
          org.testng
          testng
          6.8.7
        
          
            org.easytesting
            fest-assert
            1.4
          
      
    
      
        
          
            org.apache.maven.plugins
            maven-compiler-plugin
            3.1
            
              groovy-eclipse-compiler
              true
            
            
              
                org.codehaus.groovy
                groovy-eclipse-compiler
                2.8.0-01
              
              
                org.codehaus.groovy
                groovy-eclipse-batch
                2.0.7-03
              
            
          
          
            org.apache.maven.plugins
            maven-surefire-plugin
            2.16
          
          
            org.codehaus.gmaven
            gmaven-plugin
            1.5
            
              
                org.codehaus.gmaven.runtime
                gmaven-runtime-2.0
                1.5
              
              
                org.codehaus.groovy
                groovy
                1.8.6
              
            
            
              false
              true
              true
              .groovy
              2.0
            
            
              
                
                  testCompile
                  compile
                
              
            
          
        
      
    
    
    

    You can see a full working example here. This means having groovy tests under src/test/groovy java unit tests under src/test/java.

提交回复
热议问题