Skip to content

Commit

Permalink
Merge pull request #15 from daniel-beck/optional-scriptler
Browse files Browse the repository at this point in the history
Make Scriptler dependency optional
  • Loading branch information
kinow authored Oct 10, 2017
2 parents 978eac9 + 441b298 commit b30d427
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -64,6 +64,7 @@
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>scriptler</artifactId>
<version>2.9</version>
<optional>true</optional>
</dependency>
<!-- JQuery is included only once -->
<dependency>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@
import java.util.Map;

import org.biouno.unochoice.util.Utils;
import org.jenkinsci.plugins.scriptler.ScriptlerManagement;
import org.jenkinsci.plugins.scriptler.config.Script;
import org.jenkinsci.plugins.scriptler.util.ScriptHelper;
import org.jenkinsci.plugins.scriptsecurity.sandbox.groovy.SecureGroovyScript;
Expand Down Expand Up @@ -128,8 +129,12 @@ public GroovyScript toGroovyScript() {

// --- descriptor

@Extension
@Extension(optional = true)
public static class DescriptorImpl extends ScriptDescriptor {
static {
// make sure this class fails to load during extension discovery if scriptler isn't present
ScriptlerManagement.getScriptlerHomeDirectory();
}
/*
* (non-Javadoc)
*
Expand Down

0 comments on commit b30d427

Please sign in to comment.