How to copy unversioned test resources during release:perform?

后端 未结 2 628
温柔的废话
温柔的废话 2021-01-29 00:33

My Question is very similar to \"Maven doesn't copy untracked resources while releasing\". I have test resources which are not under version control. As tes

2条回答
  •  清歌不尽
    2021-01-29 01:13

    There seems to be many ways to achieve this. One way is with the maven-resources-plugin and a profile. The release-plugin sets during release:perform the profile release-plugin. You simply have add the maven-resources-plugin into that profile (or a custom profile which is activated by ).

    
        maven-resources-plugin
        2.6
        
            
                copy-resources
                validate
                
                    copy-resources
                
                
                    ${project.build.directory}/test-classes
                    
                        
                            ${basedir}/../../src/test/resources/
                        
                    
                
            
        
    
    

    With org.sonatype.oss:oss-parent it's a bit different, as that parent disables but uses sonatype-oss-release.

提交回复
热议问题