In maven, what is the difference between main/resources and main/config?

前端 未结 4 1104
失恋的感觉
失恋的感觉 2020-12-24 10:48

I want to put a configuration file in my Maven project. Looking at the standard directory layout, there are two places that seem sensible, \"src/main/resources\

4条回答
  •  抹茶落季
    2020-12-24 11:28

    Use case is pretty straightforward if you ask me. (It seems src/main/config has since been removed standard directory layout)

    • /src/main/resources go on into jar and thus on classpath
    • /src/main/config is intended for assembly plugin where you might construct a zip file:

      hello-world.zip
       lib/
        
       bin/
        run.bat
        run.sh
       config/
        config.properies
      

提交回复
热议问题