I have a maven Mojo plugin that I'd like to execute only in child pom, but not in the current pom or grandchildren poms. My plugin runs at compile time and essentially reads files, and for my use case if it runs in the child pom, it is redundant to run in grandchildren poms.
For example, I have a maven Mojo plugin that gets called by a parent pom file ParentFile. This pom file is inherited in other repositories, which I don't have write access to. In these repositories, there is a root module with a pom file ChildFile, whose parent is ParentFile. There are also other submodules in the repository that contain pom files (GrandchildrenFiles) whose parent is ChildFile.
I would like to execute my Mojo plugin from ChildFile, but not from GrandchildrenFiles or ParentFile. Is there a way for me to do this without write access to the repositories containing ChildFile and GrandchildrenFiles?
question from:
https://stackoverflow.com/questions/65867890/execute-maven-plugin-in-children-not-grandchildren-or-parent 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…