jgitver-maven-plugin
jgitver-maven-plugin copied to clipboard
SCRIPTABLE : load script from local file
FEATURE REQUEST
For SCRIPTABLE strategy:
Currently the script code needs to be specified inline in the XML like this:
<configuration
xmlns="http://jgitver.github.io/maven/configuration/1.1.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://jgitver.github.io/maven/configuration/1.1.0 https://jgitver.github.io/maven/configuration/jgitver-configuration-v1_1_0.xsd">
<strategy>SCRIPT</strategy>
<scriptType>GROOVY</scriptType>
<script><![CDATA[
... groovy script here ...
]]></script>
</configuration>
It would be beneficial if the script could be loaded from a file rather than being specified inline. This would allow unit testing on the script code. I'm thinking a file located in the same location as jgitver.config.xml itself. Because a script can be malicious we may not want to be too relaxed as to where the script might come from. Haven't thought it through.
In the absolute ideal situation it could be even better if the script file could be specified by a Maven GAV. But let's take some baby steps first. :-)