Skip to content

Commit

Permalink
Cleanup logging, pom and jelly files (#513)
Browse files Browse the repository at this point in the history
Co-authored-by: res0nance <res0nance@users.noreply.github.com>
  • Loading branch information
res0nance and res0nance authored Oct 12, 2020
1 parent bc65e5f commit 9bf6168
Show file tree
Hide file tree
Showing 8 changed files with 46 additions and 181 deletions.
27 changes: 9 additions & 18 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@ THE SOFTWARE.
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>4.4</version>
<version>4.10</version>
<relativePath />
</parent>

Expand Down Expand Up @@ -80,7 +80,6 @@ THE SOFTWARE.
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.204.6</jenkins.version>
<java.level>8</java.level>
<jcasc.version>1.36</jcasc.version>
<aws-java-sdk.version>1.11.821</aws-java-sdk.version>
</properties>

Expand All @@ -103,7 +102,6 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>credentials</artifactId>
<version>2.3.5</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand All @@ -113,7 +111,6 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>ssh-credentials</artifactId>
<version>1.18.1</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
Expand All @@ -133,22 +130,14 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>apache-httpcomponents-client-4-api</artifactId>
<version>4.5.10-2.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>command-launcher</artifactId>
<version>1.2</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>trilead-api</artifactId>
<version>1.0.5</version>
</dependency>
<dependency>
<groupId>io.jenkins.temp.jelly</groupId>
<artifactId>multiline-secrets-ui</artifactId>
<version>1.0</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
Expand All @@ -173,13 +162,11 @@ THE SOFTWARE.
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-core</artifactId>
<version>3.5.13</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.1</version>
<scope>test</scope>
<exclusions>
<exclusion>
Expand Down Expand Up @@ -232,19 +219,16 @@ THE SOFTWARE.
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.20</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.jenkins</groupId>
<artifactId>configuration-as-code</artifactId>
<version>${jcasc.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>io.jenkins.configuration-as-code</groupId>
<artifactId>test-harness</artifactId>
<version>${jcasc.version}</version>
<scope>test</scope>
</dependency>
<dependency>
Expand All @@ -260,6 +244,12 @@ THE SOFTWARE.
</exclusion>
</exclusions>
</dependency>
<!-- Upper bound deps -->
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>jackson2-api</artifactId>
<version>2.11.1</version>
</dependency>
</dependencies>

<dependencyManagement>
Expand Down Expand Up @@ -287,10 +277,11 @@ THE SOFTWARE.
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.204.x</artifactId>
<version>11</version>
<version>13</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<!-- Upper bound deps -->
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
Expand Down
122 changes: 0 additions & 122 deletions src/main/java/hudson/os/WindowsUtil.java

This file was deleted.

Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@
import java.util.ArrayList;
import java.util.List;
import java.util.ListIterator;
import java.util.stream.Collectors;

@Extension
public class SelfSignedCertificateAllowedMonitor extends AdministrativeMonitor {
Expand Down
10 changes: 4 additions & 6 deletions src/main/java/hudson/plugins/ec2/win/WinConnection.java
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
import java.util.logging.Logger;

public class WinConnection {
private static final Logger log = Logger.getLogger(WinConnection.class.getName());
private static final Logger LOGGER = Logger.getLogger(WinConnection.class.getName());

private final String host;
private final String username;
Expand Down Expand Up @@ -119,18 +119,16 @@ public boolean ping() {
}

public boolean pingFailingIfSSHHandShakeError() throws IOException {
log.log(Level.FINE, "checking SMB connection to " + host);
try {
Socket socket=new Socket();
LOGGER.log(Level.FINE, () -> "checking SMB connection to " + host);
try (Socket socket = new Socket()) {
socket.connect(new InetSocketAddress(host, 445), TIMEOUT);
socket.close();
winrm().ping();
Connection connection = smbclient.connect(host);
Session session = connection.authenticate(authentication);
session.connectShare("IPC$");
return true;
} catch (Exception e) {
log.log(Level.WARNING, "Failed to verify connectivity to Windows slave", e);
LOGGER.log(Level.WARNING, "Failed to verify connectivity to Windows slave", e);
if (e instanceof SSLException) {
throw e;
} else if (e.getCause() instanceof SSLException) {
Expand Down
Loading

0 comments on commit 9bf6168

Please sign in to comment.