I am developing a Maven plugin that will provide 5 goals. You can either complete goals 1-4 individually or complete goal5, which will consistently fulfill goals 1-4. I was looking for a way to reuse (i.e., call) one Maven target from inside another, but have not yet found it.
Of course, I could just delegate the goal delegate to ClassX for most of its functionality, and then when goal5 is called, it delegates Class1 ... Class4, but this still involves a certain amount of code duplication in terms of specifying, reading and checking each target configuration.
Is there a way to reuse one target in another?
Thanks Don
Dónal source share