Yes and no. Of course, the child pom can override the configuration of the plugin indicated by its parent, and I have to assume that you did it right, because there is nothing complicated about it. If you check the output of mvn help:effective-pom , you should clearly see that this module has different settings for the release plugin.
The problem you are facing is related to the behavior of the release plugin. Typically, if you run a target or phase - mvn compile , for example - from the root module of your project, it first runs this target / phase on the root module, and then on all modules in the reactor order, almost as if you run it in each module by yourself. Any settings added to child modules take effect as expected. When launching the release plugin, it runs only in the root module. It does not start in any of the child modules. Instead, running it in the root module creates a new assembly using the same settings as the root module, which works for all other modules in much the same way, except that it uses the root module configuration for all modules. I donβt know the exact semantics, but I believe that this is similar to how you manually launch release targets in each child element and specify configuration parameters as system properties on the command line: no matter how the child module configures the release plugin, Command line args wins.
I have never dealt with this problem myself, and itβs hard to say without knowing exactly what you are trying to achieve. Perhaps if you can express what you want to do in this special module as a profile, then you can add the profile to goals and / preparationGoals . Alternatively, arguments an option for both preparing and completing goals for which you could perform some tricks.
Ryan stewart
source share