Where should I put application configuration files for a Maven project?

前端 未结 5 930
执念已碎
执念已碎 2020-12-30 10:38

I\'m using the Maven Application Assembler plugin to generate stand-alone executables from my Java project. The application reads in configuration files, including Spring fi

5条回答
  •  既然无缘
    2020-12-30 11:04

    I don't know if I understand you correctly. But what I have done in the past for a project where I needed to copy configuration files, is use the Maven AntRun plugin. What I did is execute the plugin in the process-resources phase and copied my configuration files to the specified directory using the Ant copy task. The Assembler plugin executes in the package phase so it should pick up your configuration files if you put it in the right place. Hope this answers your question a little bit.

提交回复
热议问题