How do I include test classes and configuration in my war for integration testing using maven?

前端 未结 7 1394
梦谈多话
梦谈多话 2021-01-12 05:33

I currently have a maven web project that I am attempting to write integration tests for. For the structure of the project, I\'ve defined test stubs under src/test/j

7条回答
  •  再見小時候
    2021-01-12 05:58

    Instead of using the maven antrun plugin, you could instead use the maven resources plugin and configure it like this:

    
        maven-resources-plugin
        2.5
        
            
                process-test-classes
                test-classes
                
                    copy-resources
                
                
                    false
                    ${project.build.directory}/${project.build.finalName}/WEB-INF/classes
                    
                        
                            ${project.build.directory}/test-classes
                        
                    
                
            
        
    
    

提交回复
热议问题