-
Notifications
You must be signed in to change notification settings - Fork 158
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Modernize plugin build #204
base: master
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,7 @@ | ||
<extensions xmlns="http://maven.apache.org/EXTENSIONS/1.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/EXTENSIONS/1.0.0 http://maven.apache.org/xsd/core-extensions-1.0.0.xsd"> | ||
<extension> | ||
<groupId>io.jenkins.tools.incrementals</groupId> | ||
<artifactId>git-changelist-maven-extension</artifactId> | ||
<version>1.7</version> | ||
</extension> | ||
</extensions> | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
-Pconsume-incrementals | ||
-Pmight-produce-incrementals | ||
Comment on lines
+1
to
+2
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,5 @@ | ||
// Builds a module using https://github.com/jenkins-infra/pipeline-library | ||
buildPlugin(useContainerAgent: true, configurations: [ | ||
[platform: 'linux', jdk: 11], | ||
[platform: 'windows', jdk: 11], | ||
[platform: 'linux', jdk: 17] | ||
[platform: 'linux', jdk: 21], | ||
[platform: 'windows', jdk: 17], | ||
Comment on lines
+3
to
+4
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latest recommendation from the archetype. |
||
]) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,36 @@ | ||
<?xml version="1.0" encoding="UTF-8"?> | ||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> | ||
|
||
<modelVersion>4.0.0</modelVersion> | ||
|
||
<parent> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>4.52</version> | ||
<version>4.79</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latest version at the time of this writing. |
||
<relativePath /> | ||
</parent> | ||
|
||
<artifactId>p4</artifactId> | ||
<version>1.15.2-SNAPSHOT</version> | ||
<version>${revision}${changelist}</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<packaging>hpi</packaging> | ||
<name>P4 Plugin</name> | ||
<description>Perforce Client plugin for the Jenkins SCM provider.</description> | ||
<url>https://github.com/jenkinsci/p4-plugin</url> | ||
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latest recommendation from the archetype. |
||
|
||
<properties> | ||
<jenkins.version>2.361.4</jenkins.version> | ||
<revision>1.15.2</revision> | ||
<changelist>-SNAPSHOT</changelist> | ||
Comment on lines
+21
to
+22
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<jenkins.version>2.414.3</jenkins.version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<gitHubRepo>jenkinsci/${project.artifactId}-plugin</gitHubRepo> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latest recommendation from the archetype. |
||
<!-- TODO fix SpotBugs violations --> | ||
<spotbugs.threshold>High</spotbugs.threshold> | ||
</properties> | ||
|
||
<scm> | ||
<connection>scm:git:https://github.com/jenkinsci/${project.artifactId}-plugin.git</connection> | ||
<developerConnection>scm:git:[email protected]:jenkinsci/${project.artifactId}-plugin.git</developerConnection> | ||
<url>https://github.com/jenkinsci/${project.artifactId}-plugin</url> | ||
<tag>p4-1.15.0</tag> | ||
<connection>scm:git:https://github.com/${gitHubRepo}.git</connection> | ||
<developerConnection>scm:git:[email protected]:${gitHubRepo}.git</developerConnection> | ||
<url>https://github.com/${gitHubRepo}</url> | ||
<tag>${scmTag}</tag> | ||
Comment on lines
+30
to
+33
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</scm> | ||
|
||
<developers> | ||
|
@@ -57,8 +64,8 @@ | |
<dependencies> | ||
<dependency> | ||
<groupId>io.jenkins.tools.bom</groupId> | ||
<artifactId>bom-2.361.x</artifactId> | ||
<version>2102.v854b_fec19c92</version> | ||
<artifactId>bom-2.414.x</artifactId> | ||
<version>2884.vc36b_64ce114a_</version> | ||
Comment on lines
+67
to
+68
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
<scope>import</scope> | ||
<type>pom</type> | ||
</dependency> | ||
|
@@ -71,42 +78,70 @@ | |
<groupId>com.perforce</groupId> | ||
<artifactId>p4java</artifactId> | ||
<version>2023.2.2553500</version> | ||
<exclusions> | ||
<!-- Provided by Jenkins core --> | ||
<exclusion> | ||
<groupId>commons-codec</groupId> | ||
<artifactId>commons-codec</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>commons-io</groupId> | ||
<artifactId>commons-io</artifactId> | ||
</exclusion> | ||
<!-- Provided by commons-lang3-api plugin --> | ||
<exclusion> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
Comment on lines
+81
to
+96
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
<version>3.12.0</version> | ||
<groupId>io.jenkins.plugins</groupId> | ||
<artifactId>commons-lang3-api</artifactId> | ||
Comment on lines
+100
to
+101
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-exec</artifactId> | ||
<version>1.3</version> | ||
<scope>test</scope> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not used in production code, so no need to bundle the JAR in the JPI. |
||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.google.code.gson</groupId> | ||
<artifactId>gson</artifactId> | ||
<version>2.9.0</version> | ||
<groupId>io.jenkins.plugins</groupId> | ||
<artifactId>gson-api</artifactId> | ||
Comment on lines
+112
to
+113
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</dependency> | ||
|
||
<dependency> | ||
<groupId>com.mashape.unirest</groupId> | ||
<artifactId>unirest-java</artifactId> | ||
<version>1.4.9</version> | ||
<exclusions> | ||
<!-- Provided by apache-httpcomponents-client-4-api plugin --> | ||
<exclusion> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpasyncclient</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpclient</artifactId> | ||
</exclusion> | ||
<exclusion> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpmime</artifactId> | ||
</exclusion> | ||
<!-- Provided by json-api plugin --> | ||
<exclusion> | ||
<groupId>org.json</groupId> | ||
<artifactId>json</artifactId> | ||
</exclusion> | ||
</exclusions> | ||
Comment on lines
+120
to
+139
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpclient</artifactId> | ||
<version>4.5.13</version> | ||
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpmime</artifactId> | ||
<version>4.5.13</version> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>apache-httpcomponents-client-4-api</artifactId> | ||
Comment on lines
+143
to
+144
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</dependency> | ||
|
||
<!-- Jenkins dependencies --> | ||
|
@@ -129,7 +164,6 @@ | |
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>structs</artifactId> | ||
<version>324.va_f5d6774f3a_d</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Version managed in BOM. |
||
</dependency> | ||
|
||
<dependency> | ||
|
@@ -169,7 +203,7 @@ | |
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>multiple-scms</artifactId> | ||
<version>0.6</version> | ||
<version>0.8</version> | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Latest version. |
||
<optional>true</optional> | ||
</dependency> | ||
|
||
|
@@ -219,9 +253,8 @@ | |
</dependency> | ||
|
||
<dependency> | ||
<groupId>org.json</groupId> | ||
<artifactId>json</artifactId> | ||
<version>20231013</version> | ||
<groupId>io.jenkins.plugins</groupId> | ||
<artifactId>json-api</artifactId> | ||
Comment on lines
+256
to
+257
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. |
||
</dependency> | ||
|
||
</dependencies> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -35,7 +35,7 @@ static public ListBoxModel doFillCredentialItems() { | |
acl, domain); | ||
|
||
if (credentials.isEmpty()) { | ||
list.add("Select credential...", null); | ||
list.add("Select credential...", ""); | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixing a serious SpotBugs warning:
|
||
} | ||
for (P4BaseCredentials c : credentials) { | ||
StringBuffer sb = new StringBuffer(); | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,8 @@ | ||
package org.jenkinsci.plugins.p4.client; | ||
|
||
import com.gargoylesoftware.htmlunit.html.HtmlForm; | ||
import com.gargoylesoftware.htmlunit.html.HtmlInput; | ||
import com.gargoylesoftware.htmlunit.html.HtmlPage; | ||
import org.htmlunit.html.HtmlForm; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Adapting to upstream package rename. |
||
import org.htmlunit.html.HtmlInput; | ||
import org.htmlunit.html.HtmlPage; | ||
import com.perforce.p4java.option.server.CounterOptions; | ||
import com.perforce.p4java.server.IOptionsServer; | ||
import hudson.model.Action; | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
https://www.jenkins.io/doc/developer/plugin-development/incrementals/