maven-remote-resources-plugin vs maven-resources-plugin

881 views Asked by At

I am creating a multi module maven project and want to keep resources (property files, json) in a separate module. Now to import this resource module in other modules, I have two option - either to use maven-resources-plugin or to use maven-remote-resources-plugin. I already have working code wrt maven-resources-plugin but while searching in internet I found post only on maven-remote-resources-plugin which made me question if I am following maven standards on resources use. And is it worth to move from maven-resources-plugin to maven-remote-resources-plugin? Any pointers with respect to this is appreciated.

1

There are 1 answers

0
Naman On BEST ANSWER

"...want to keep resources (property files, json) in a separate module"

  1. You can use Maven Remote Resources Plugin Of course to bundle your resources in a single JAR that can be used across.

    This plugin is used to retrieve JARs of resources from remote repositories, process those resources, and incorporate them into JARs you build with Maven. A very common use-case is the need to package certain resources in a consistent way across your organization: at Apache it is required that every JAR produced contains a copy of the Apache license and a notice file that references all used software in a given project.

  2. Maven Resource Plugin has its own usage of copying resources within modules when you don't have them located in the default maven path and want to use them explicitly.