Skip to content

Commit

Permalink
Require Jenkins 2.361.4 or newer and Java 11
Browse files Browse the repository at this point in the history
Also removes Jenkins test harness from the plugin packaging

DOES NOT FIX THE INCORRECT MODIFICATION OF ARTIFACT ID
jenkinsci#1 needs partial
revert to restore original artifact ID and package ID.

Remove Jenkins test harness HTMLUnit from the plugin hpi file

jenkinsci/jenkins#8714 included in Jenkins
2.434 and later will refuse to load a plugin that includes the Jenkins
test harness.

The Jenkins test harness causes unexpected failures when it is included
in a Jenkins plugin.  Refer to the following issue reports for examples:

* https://issues.jenkins.io/browse/JENKINS-65650
* https://issues.jenkins.io/browse/JENKINS-66060
* https://issues.jenkins.io/browse/JENKINS-72353

The additional benefit of the change is that it makes the plugin hpi
file over 80% smaller.
  • Loading branch information
MarkEWaite committed Dec 18, 2023
1 parent 4148efb commit 570f0df
Show file tree
Hide file tree
Showing 4 changed files with 32 additions and 30 deletions.
40 changes: 21 additions & 19 deletions pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>3.43</version>
<version>4.76</version>
<relativePath />
</parent>

Expand All @@ -18,11 +18,8 @@
<properties>
<revision>1.29</revision>
<changelist>-SNAPSHOT</changelist>
<jenkins.version>2.138.4</jenkins.version>
<java.level>8</java.level>
<jenkins.version>2.361.4</jenkins.version>
<no-test-jar>false</no-test-jar>
<workflow-cps.version>2.66</workflow-cps.version>
<workflow-support.version>3.2</workflow-support.version>
</properties>
<licenses>
<license>
Expand All @@ -31,7 +28,7 @@
</license>
</licenses>
<scm>
<connection>scm:git:git://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
<connection>scm:git:https://github.com/jenkinsci/${project.artifactId}-plugin.git</connection>
<developerConnection>scm:git:git@github.com:jenkinsci/${project.artifactId}-plugin.git</developerConnection>
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url>
<tag>${scmTag}</tag>
Expand Down Expand Up @@ -60,37 +57,42 @@
</developer>
</developers>
<dependencies>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness-htmlunit</artifactId>
<version>2.31-2</version>
<scope>compile</scope>
<dependency>
<groupId>io.jenkins.plugins</groupId>
<artifactId>commons-lang3-api</artifactId>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>apache-httpcomponents-client-4-api</artifactId>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>structs</artifactId>
<version>1.17</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-step-api</artifactId>
<version>2.19</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-api</artifactId>
<version>2.34</version>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>script-security</artifactId>
<version>1.56</version>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
</dependency>
</dependencies>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.361.x</artifactId>
<version>2102.v854b_fec19c92</version>
<scope>import</scope>
<type>pom</type>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
Expand Down
@@ -1,6 +1,6 @@
package org.jenkins_cli.plugins.ifdtms;

import hidden.jth.org.apache.http.HttpStatus;
import org.apache.http.HttpStatus;
import hudson.Extension;
import hudson.model.AbstractProject;
import hudson.tasks.BuildStepDescriptor;
Expand Down Expand Up @@ -205,4 +205,4 @@ public String getToken() {
public AuthenticationInfo getAuthenticationInfo() {
return authenticationInfo;
}
}
}
@@ -1,6 +1,6 @@
package org.jenkins_cli.plugins.ifdtms;

import hidden.jth.org.apache.http.HttpStatus;
import org.apache.http.HttpStatus;
import hudson.FilePath;
import hudson.Launcher;
import hudson.model.AbstractBuild;
Expand Down Expand Up @@ -169,4 +169,4 @@ public String getItmsCycleName() {
public String getJiraProjectKey() {
return jiraProjectKey;
}
}
}
@@ -1,11 +1,11 @@
package org.jenkins_cli.plugins.ifdtms.rest;

import hidden.jth.org.apache.http.HttpEntity;
import hidden.jth.org.apache.http.HttpResponse;
import hidden.jth.org.apache.http.client.methods.HttpPost;
import hidden.jth.org.apache.http.entity.StringEntity;
import hidden.jth.org.apache.http.impl.client.CloseableHttpClient;
import hidden.jth.org.apache.http.impl.client.HttpClientBuilder;
import org.apache.http.HttpEntity;
import org.apache.http.HttpResponse;
import org.apache.http.client.methods.HttpPost;
import org.apache.http.entity.StringEntity;
import org.apache.http.impl.client.CloseableHttpClient;
import org.apache.http.impl.client.HttpClientBuilder;
import net.sf.json.JSONObject;

import java.io.*;
Expand Down Expand Up @@ -165,4 +165,4 @@ public StandardResponse sendReportToITMS(String baseUrl, String token, Map<Strin
return new StandardResponse(responseCode, type, message.toString());
}

}
}

0 comments on commit 570f0df

Please sign in to comment.