Note: Some IDEs don’t work well with this plugin, and might throw a ‘circular placeholder reference’ error on bootstrap when we define the properties as we did above. Maven will replace the placeholders with the appropriate values. I had to quickly develop a Git version of such a plugin. Unable to find commits until some tag: Walk failure. git-commit-id-maven-plugin is a plugin quite similar to Build Number Maven Plugin for example but as the Build Number plugin at the time when I started this plugin only supported CVS and SVN, something had to be done. We can include only the entries that we’ll use in our project: # git.properties ERROR Failed to execute goal pl.project13.maven:git-commit-id-plugin:2.1.15:revision (default) on project geoserver: Could not complete Mojo execution. ![]() Git Branches and Maven SNAPSHOT Version Scheme. The second option is to include a git.properties file in the resources folder ourselves. Usually you work with a master branch and different feature branches. We can specify this by setting the generateGitPropertiesFile configuration property a true value: The first one is to leave it up to the plugin to generate the file. Generally, version references should be only as specific. In order for our code to work properly, we need to end up with a git.properties file in our classpath. When Maven encounters multiple matches for a version reference, it uses the highest matching version. We’ll first set up the execution steps to be carried out by the plugin, plus any other configuration property that we consider useful:
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |