How to share configuration files across modules in Maven -


i working on java maven project several modules.

i facing issues sharing configuration files 1 module dependency. instance have module named utils holds log.properties file , use in module named gui. best practice ?

currently put log.properties in config directory maven standard layout suggest it, , not included in jar file. correct ? should put in resources instead ?

i use assembly plugin copy common config directory, works well, when try build each module individually config file cannot reached. how can solve ?

thanks help, pierre.

you should put configuration in src/main/resources/config/. way included in jar default. maven convention src/main/java , src/main/resources contained in final jar default.

making property files directly accessible other modules not practice. should provide service in module owning configuration place files accessed. service able give configurations other modules. otherwise violate single responsibility principle.


Comments

Popular posts from this blog

linux - Does gcc have any options to add version info in ELF binary file? -

android - send complex objects as post php java -

charts - What graph/dashboard product is facebook using in Dashboard: PUE & WUE -