Separate my maven pom into different files

I do not want to change my project / module structure. Its just that my pom file becomes large and complex (due to the large number of dependencies) and wants to split it into low-speed auxiliary files ... is it easy?

I am looking for something similar to an import resource available for spring context definition files.

+6
source share
1 answer

You have a couple of options for breaking your pom files:

  • Create a parent pom to move things like plugins, pluginManagment and dependencyManagement sections. This separates these sections from the files in which you actually define the dependencies that the module will use. You can find some good examples here .
  • Use the dependency management import for the modular dependencyManagment section, you can see an example here . This allows you to do something like separately managing third-party dependency dependencies on your project dependencies.
+6
source

Source: https://habr.com/ru/post/944806/


All Articles