Maven - Add directory to classpath while executing tests

后端 未结 6 1166
北海茫月
北海茫月 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 15:57

    If you have multiple resource environment you can use maven profile and put your various resources according to the profile you are testing.

    test/resources/uat
    test/resources/prod
    test/resources/dev
    

    But usualy if you need that you are making integration test then you don't need the build-helper-maven-plugin.

提交回复
热议问题