Skip to content

Commit 7064219

Browse files
Merge pull request #7 from FarmGeek4Life/waffle-update
[JENKINS-58207] Update Waffle and JNA to work with Jenkins 2.181+
2 parents 0232209 + 1c2e11d commit 7064219

File tree

2 files changed

+30
-9
lines changed

2 files changed

+30
-9
lines changed

pom.xml

+30-3
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,16 @@
33
<parent>
44
<groupId>org.jenkins-ci.plugins</groupId>
55
<artifactId>plugin</artifactId>
6-
<version>3.40</version><!-- which version of Jenkins plugin pom is this plugin built against? -->
6+
<version>3.50</version><!-- which version of Jenkins plugin pom is this plugin built against? -->
77
<relativePath />
88
</parent>
99

1010
<properties>
11-
<jenkins.version>2.150.2</jenkins.version>
11+
<jenkins.version>2.181</jenkins.version>
1212
<java.level>8</java.level>
13-
<waffle.version>1.9.0</waffle.version>
13+
<waffle.version>2.0.0</waffle.version>
14+
<jna.version>5.3.1</jna.version>
15+
<slf4j.version>2.0.0-alpha0</slf4j.version><!-- Upgraded over jenkins requirement because of Waffle -->
1416
</properties>
1517

1618
<artifactId>NegotiateSSO</artifactId>
@@ -54,6 +56,31 @@
5456
<artifactId>waffle-jna</artifactId>
5557
<version>${waffle.version}</version>
5658
</dependency>
59+
<dependency>
60+
<groupId>net.java.dev.jna</groupId>
61+
<artifactId>jna</artifactId>
62+
<version>${jna.version}</version>
63+
</dependency>
64+
<dependency>
65+
<groupId>net.java.dev.jna</groupId>
66+
<artifactId>jna-platform</artifactId>
67+
<version>${jna.version}</version>
68+
</dependency>
69+
<dependency>
70+
<groupId>org.slf4j</groupId>
71+
<artifactId>jcl-over-slf4j</artifactId>
72+
<version>${slf4j.version}</version>
73+
</dependency>
74+
<dependency>
75+
<groupId>org.slf4j</groupId>
76+
<artifactId>slf4j-api</artifactId>
77+
<version>${slf4j.version}</version>
78+
</dependency>
79+
<dependency>
80+
<groupId>org.slf4j</groupId>
81+
<artifactId>slf4j-jdk14</artifactId>
82+
<version>${slf4j.version}</version>
83+
</dependency>
5784
<dependency>
5885
<groupId>org.mockito</groupId>
5986
<artifactId>mockito-core</artifactId>

src/main/java/com/github/farmgeek4life/jenkins/negotiatesso/NegSecUserSeedFilter.java

-6
Original file line numberDiff line numberDiff line change
@@ -105,12 +105,6 @@ private void authenticateJenkins(WindowsPrincipal principal, HttpServletRequest
105105
*/
106106
@SuppressRestrictedWarnings(UserSeedProperty.class)
107107
private void populateUserSeed(HttpServletRequest httpRequest, String username) {
108-
VersionNumber current = Jenkins.getVersion();
109-
if (current == null || current.isNewerThan(new VersionNumber("2.150.99")) && current.isOlderThan(new VersionNumber("2.160"))) {
110-
// We have to depend on API introduced in 2.150.2 and 1.160 hence we need to skip this for ["2.151", "2.159"]
111-
return;
112-
}
113-
114108
// Adapted from hudson.security.AuthenticationProcessingFilter2
115109
if (!UserSeedProperty.DISABLE_USER_SEED) {
116110
User user = User.getById(username, true);

0 commit comments

Comments
 (0)