Is there a way to configure ANT- and MAVEN-Installations using CLI? For the JDK there is:
dis = new hudson.model.JDK.DescriptorImpl();
dis.setInstallations( new hudson.model.JDK("JDK8", "/usr/lib/jvm/java-1.8-openjdk"));
Tobi
It the way to set maven using Groovy:
def inst = Jenkins.getInstance()
def desc = inst.getDescriptor("hudson.tasks.Maven")
def minst = new hudson.tasks.Maven.MavenInstallation("Maven_name", "maven_path");
desc.setInstallations(minst)
desc.save()
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With