Maven - Add directory to classpath while executing tests

后端 未结 6 1162
北海茫月
北海茫月 2020-12-02 15:29

The Junits I have in my project need to load property files from the classpath. How can I specify the directory of those property files so that Maven will set that in the cl

6条回答
  •  佛祖请我去吃肉
    2020-12-02 16:13

    If you just want to put your property files someplace on disk and don't want to copy those property files to target/test-classes during the build, you can do it this way

    
      org.apache.maven.plugins
      maven-surefire-plugin
      
        
          /add/this/to/path
        
      
    
    

提交回复
热议问题