Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SCRIPTABLE : load script from local file #161

Open
lbruun opened this issue Sep 13, 2021 · 0 comments
Open

SCRIPTABLE : load script from local file #161

lbruun opened this issue Sep 13, 2021 · 0 comments

Comments

@lbruun
Copy link
Contributor

lbruun commented Sep 13, 2021

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant