I'm experiencing some difficulties configuring our project with Maven and need some help :)
Say, I have a multi-module project, with modules A and B (there are ~20 others as well) but all of them inherit from some "root" pom.
I also have a custom maven plugin that should be enabled for module A only.
The plugin should run in the same way for all the modules, so I put the configuration in the root pom.
Now, the plugin is defined in the profile so that it will be activated only when I explicitly want so:
mvn test -PrunMyPlugin
this should work if I'm running this command from the root directory and if I'm running in the directory of module A. In module B the plugin shouldn't run regardless of this profile.
On the other hand
mvn test
should never invoke the plugin.
I've tried to use activation on property but it didn't work for me. I'm trying to avoid the situation when I need to configure the plugin for each concrete module and keep all the configurations in the root pom.
Could someone please provide any simple example of how to do that? Any help is highly appreciated.
Thanks in advance