I am wondering if there is a Maven plugin that runs a bash script and stores its results in a property.
My actual use case is getting the original version of git. I found one plugin available on the Internet, but it did not look well tested, and it occurred to me that I needed a plugin as simple as the one in the title of this post. The plugin will look something like this:
<plugin>maven-run-script-plugin> <phase>process-resources</phase> <configuration> <script>"git rev-parse HEAD"</script> <targetProperty>"properties.gitVersion"</targetProperty> </configuration> </plugin>
Of course, you need to make sure that this happens before the property is required, and in my case I want to use this property to process the source file.
source share