jgitver-maven-plugin icon indicating copy to clipboard operation
jgitver-maven-plugin copied to clipboard

SCRIPTABLE : load script from local file

Open lbruun opened this issue 4 years ago • 0 comments

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. :-)

lbruun avatar Sep 13 '21 14:09 lbruun