I am developing a Mojo(think it as just a usual class) for my custom Maven Plugin. There is an Abstract Mojo at top. I have some other custom Mojos in example which makes server side includes. I have some static variables and some util methods in example get operating system name, fix file separator in order to used operating system etc. I have created an abstract Base Mojo that extends Abstract Mojo and put every common things inside it. When I create a Mojo (i.e. server side includer) I extend it from my Base Mojo. However should I think that I should separate variables and util methods or not and what kind of pattern I should follow.
To make it clear there is:
- AbstractMojo at top by default (I can not change it)
- BaseMojo an abstract class that extends AbstractMojo that has util methods and static system variables
- CustomMojo extends BaseMojo and does its responsibility.
Any ideas how to implement a design for my needs?