Skip to content

Commit

Permalink
Modernize plugin
Browse files Browse the repository at this point in the history
With the upgrade to the latest parent pom, e.g. more meta-info and less
jar files are packaged in the .hpi, more checks are performed in the build.

Because Java 7 is end-of-life since a while, upgrading to Java 8 and
one of the first Jenkins LTS versions that requires it.

Upgrading git dependency to be more up-to-date and that less other
dependency versions have to be declared to comply with the
maven-enforcer plugin.
  • Loading branch information
darxriggs committed Jan 28, 2020
1 parent 42dd247 commit 8387b88
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 24 deletions.
38 changes: 16 additions & 22 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -4,21 +4,19 @@
<parent>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>plugin</artifactId>
<version>2.17</version>
<relativePath />
<version>3.56</version>
</parent>
<artifactId>git-tag-message</artifactId>
<version>1.6.2-SNAPSHOT</version>
<packaging>hpi</packaging>

<properties>
<jenkins.version>1.651.1</jenkins.version>
<java.level>7</java.level>
<jenkins-test-harness.version>2.13</jenkins-test-harness.version>
<jenkins.version>2.60.3</jenkins.version>
<java.level>8</java.level>
</properties>

<name>Git Tag Message Plugin</name>
<url>https://wiki.jenkins-ci.org/display/JENKINS/Git+Tag+Message+Plugin</url>
<url>https://wiki.jenkins.io/display/JENKINS/Git+Tag+Message+Plugin</url>
<description>Exports the message for a git tag as an environment variable during a build.</description>

<developers>
Expand All @@ -40,7 +38,7 @@
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>git</artifactId>
<version>2.5.0</version>
<version>3.9.0</version>
</dependency>

<!-- Pipeline basics required for testing -->
Expand All @@ -56,22 +54,19 @@
<version>2.9</version>
<scope>test</scope>
</dependency>

<!-- Pipeline steps used in testing -->
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-basic-steps</artifactId>
<version>2.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.jenkins-ci.plugins.workflow</groupId>
<artifactId>workflow-durable-task-step</artifactId>
<version>2.4</version>
<scope>test</scope>
</dependency>
</dependencies>

<dependencyManagement>
<dependencies>
<dependency>
<groupId>org.jenkins-ci.plugins</groupId>
<artifactId>junit</artifactId>
<version>1.3</version>
<scope>test</scope>
</dependency>
</dependencies>
</dependencyManagement>

<build>
<plugins>
<plugin>
Expand All @@ -84,7 +79,6 @@
</plugins>
</build>

<!-- get every artifact through repo.jenkins-ci.org, which proxies all the artifacts that we need -->
<repositories>
<repository>
<id>repo.jenkins-ci.org</id>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,10 @@
package org.jenkinsci.plugins.gittagmessage;

import hudson.model.Job;
import hudson.model.Queue;
import hudson.model.Run;
import hudson.plugins.git.util.BuildData;
import jenkins.model.ParameterizedJobMixIn;
import org.jenkinsci.plugins.gitclient.Git;
import org.jenkinsci.plugins.gitclient.GitClient;
import org.junit.Before;
Expand All @@ -15,7 +17,7 @@

import static org.junit.Assert.assertNotNull;

public abstract class AbstractGitTagMessageExtensionTest<J extends Job<J, R>, R extends Run<J, R>> {
public abstract class AbstractGitTagMessageExtensionTest<J extends Job<J, R> & ParameterizedJobMixIn.ParameterizedJob, R extends Run<J, R> & Queue.Executable> {

@Rule public final JenkinsRule jenkins = new JenkinsRule();

Expand Down Expand Up @@ -163,4 +165,4 @@ private R buildJobAndAssertSuccess(J job) throws Exception {
return build;
}

}
}

0 comments on commit 8387b88

Please sign in to comment.