Search code examples
web-applicationsmaven-2project-structure

Where to to keep the img or css directory conforming to maven project structure?


Maven suggests 'resources' to be placed in

src/main/resources

directory.

For webapps sources, it suggests

src/main/webapp

I find it a little confusing. My web-app would need images and css files.

Should I place them in

src/main/resources/img
src/main/resources/css

or in

src/main/webapp/img
src/main/webapp/css

Which would be appropriate (as per maven conventions) ?

Thanks !


Solution

  • If its a webapp you need to place it under webapp directory. The resources maven documentation talks about is application level resources like property files, logging configuration etc...