Why are project layout resources kept separate from Java sources?

后端 未结 8 2131
小鲜肉
小鲜肉 2020-12-10 02:05

Why does maven keep resources in a separate \"source folder\" from the Java sources?

From my experience, in Java the resource files are mostly treated like Java sou

8条回答
  •  慢半拍i
    慢半拍i (楼主)
    2020-12-10 02:22

    The way I distinguish between the two is that the java folders default to allowing nothing to be built in the resulting jar, except the file types I list (e.g. *.class, *.html, *.properties if you're using Wicket), whereas all the stuff in resources will be copied in the build except the few exceptions I list.

    Of course that's just my private convention, adhered to by myself.

提交回复
热议问题