Maven has lots of plugins to assist you in project construction, testing, packaging and deployment. For example if you want to compile C++ code instead of Java, you can use native-maven-plugin . But what if you need something more specific? Then you can create a custom Maven plugin.
I will explain how to create a simple custom maven plugin to generate static blog site from Markdown files. I know we can already do that with maven-site-plugin since version 3.3, I will just use it for learning purposes.
You can find whole source code example at https://github.com/carlosvin/blog-maven-plugin.
- Maven plugin concepts
- Create your custom plugin (Site Lifecycle)
- Unit tests
- Integration tests