Skip to content

Commit

Permalink
Update dependencies and fix various build errors
Browse files Browse the repository at this point in the history
Signed-off-by: Matt Sicker <boards@gmail.com>
  • Loading branch information
jvz committed Jun 4, 2019
1 parent b00e82f commit d3a43d0
Show file tree
Hide file tree
Showing 3 changed files with 25 additions and 44 deletions.
55 changes: 17 additions & 38 deletions pom.xml
Expand Up @@ -29,7 +29,8 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.26</version>
<version>3.43</version>
<relativePath/>
</parent>

<artifactId>deployer-framework</artifactId>
Expand Down Expand Up @@ -67,8 +68,8 @@

<properties>
<maven.findbugs.failure.strict>false</maven.findbugs.failure.strict>
<jenkins.version>1.580.1</jenkins.version>
<java.level>6</java.level>
<jenkins.version>2.138.4</jenkins.version>
<java.level>8</java.level>
</properties>

<repositories>
Expand All @@ -91,7 +92,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.5</version>
<version>2.6</version>
</dependency>

<dependency>
Expand Down Expand Up @@ -142,21 +143,31 @@
<artifactId>maven-plugin</artifactId>
<version>2.5</version>
<scope>compile</scope>
<exclusions>
<exclusion>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
</exclusion>
<exclusion>
<groupId>commons-net</groupId>
<artifactId>commons-net</artifactId>
</exclusion>
</exclusions>
</dependency>

<!-- test dependencies -->

<dependency>
<groupId>commons-codec</groupId>
<artifactId>commons-codec</artifactId>
<version>1.4</version>
<version>1.9</version>
<scope>test</scope>
</dependency>

<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.8.2</version>
<version>4.12</version>
<scope>test</scope>
</dependency>

Expand All @@ -170,41 +181,9 @@
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<artifactId>maven-enforcer-plugin</artifactId>
<version>1.3.1</version>
<executions>
<execution>
<id>enforce-maven</id>
<goals>
<goal>enforce</goal>
</goals>
<configuration>
<rules>
<requireMavenVersion>
<version>(,2.1.0),(2.1.0,2.2.0),(2.2.0,)</version>
<message>Maven 2.1.0 and 2.2.0 produce incorrect GPG signatures and checksums respectively.
</message>
</requireMavenVersion>
<requireMavenVersion>
<version>(,3.0),[3.0.4,)</version>
<message>Maven 3.0 through 3.0.3 inclusive do not pass correct settings.xml to Maven Release
Plugin.
</message>
</requireMavenVersion>
</rules>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<artifactId>maven-release-plugin</artifactId>
<version>2.5.2</version>
</plugin>
<plugin>
<groupId>org.jacoco</groupId>
Expand Down
Expand Up @@ -31,17 +31,17 @@
import hudson.Extension;
import hudson.model.AbstractProject;
import hudson.model.Action;
import hudson.model.Hudson;
import hudson.model.Descriptor;
import hudson.model.JobProperty;
import hudson.model.JobPropertyDescriptor;
import hudson.model.TransientProjectActionFactory;
import hudson.util.ExceptionCatchingThreadFactory;
import jenkins.model.Jenkins;
import net.sf.json.JSONObject;
import org.kohsuke.stapler.DataBoundConstructor;
import org.kohsuke.stapler.Stapler;
import org.kohsuke.stapler.StaplerRequest;

import java.io.ObjectStreamException;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Collection;
Expand Down Expand Up @@ -70,8 +70,10 @@ public DeployNowJobProperty(boolean oneClickDeploy, List<? extends DeployHost<?,
}

static void submit(Runnable task) {
((DescriptorImpl) Hudson.getInstance().getDescriptor(DeployNowJobProperty.class)).deployNowPool.submit(
task);
Descriptor descriptor = Jenkins.get().getDescriptor(DeployNowJobProperty.class);
if (descriptor instanceof DescriptorImpl) {
((DescriptorImpl) descriptor).deployNowPool.submit(task);
}
}

public boolean isOneClickDeploy() {
Expand Down
Expand Up @@ -111,7 +111,7 @@ public boolean isInstantiable() {

@Override
public String getDisplayName() {
return null;
return "Deploy Now Slave";
}
}

Expand All @@ -129,7 +129,7 @@ public static class DescriptorImpl extends NodePropertyDescriptor {

@Override
public String getDisplayName() {
return null;
return "Deploy Now Slave Property";
}
}
}
Expand Down

0 comments on commit d3a43d0

Please sign in to comment.