https://developer.okta.com/blog/2019/09/23/tutorial-build-a-maven-plugin was used to learn the maven plugin concept.
Every file has a unique hash number. The plugin that is build like following helps to resolve the git version number.
- Firstly, create a maven project(You need to have Java8 and Apache Maven)
- Add maven dependencies to the pom.xml (Necessary dependencies:maven-core, maven-plugin-api, and maven-plugin-annotations.)
- You can control last versions and take dependencies from-->https://mvnrepository.com/
- Then you need to build plugins,plugin
- Each maven project has a goal and this goal is defined thanks to @Mojo
- After handled all these mentioned above, then it is time to build project with:
mvn install
- If all dependendencies and plugin versions are Ok, you need to see "BUILD SUCCESS" as an output
- We need to write the execute command to see the the version number
- Important step is adding reporting codes to the pom.xml
- Then it is time to run project with:
mvn com.okta.example:example-maven-plugin:version