Skip to content

Commit

Permalink
Update dependencies, require Jenkins 2.321+ (#247)
Browse files Browse the repository at this point in the history
* Update plugin parent POM and dependencies
* Remove old version of classworlds
* Cleanup from #45: jenkinsci/jenkins#1740 long since available, and want to be able to test jenkinsci/jenkins-test-harness#370

Co-authored-by: Basil Crow <[email protected]>
  • Loading branch information
jglick and basil authored Feb 11, 2022
1 parent d4536dc commit 9887b67
Show file tree
Hide file tree
Showing 6 changed files with 30 additions and 163 deletions.
106 changes: 18 additions & 88 deletions pom.xml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
The MIT License
Expand Down Expand Up @@ -40,23 +41,23 @@ THE SOFTWARE.

<name>Maven Integration plugin</name>
<description>This plug-in provides, for better and for worse, a deep integration of Jenkins and Maven: Automatic triggers between projects depending on SNAPSHOTs, automated configuration of various Jenkins publishers (Junit, ...).</description>
<url>https://github.com/jenkinsci/maven-plugin</url>
<url>https://github.com/jenkinsci/${project.artifactId}</url>

<properties>
<revision>3.17</revision>
<changelist>-SNAPSHOT</changelist>
<gitHubRepo>jenkinsci/maven-plugin</gitHubRepo>
<jenkins.version>2.289.1</jenkins.version>
<gitHubRepo>jenkinsci/${project.artifactId}</gitHubRepo>
<jenkins.version>2.321</jenkins.version>
<java.level>8</java.level>
<mavenInterceptorsVersion>1.13</mavenInterceptorsVersion>
<!--
Minimal supported version of Maven.
It declares version of the core, which should be included into the the server-side.
Note that the plugin still bundles agent support for Maven 3.0.5, probably it's not really operational
-->
<mavenMinimalVersion>3.8.1</mavenMinimalVersion>
<resolverVersion>1.6.2</resolverVersion>
<sisuInjectVersion>0.3.4</sisuInjectVersion>
<mavenMinimalVersion>3.8.3</mavenMinimalVersion>
<resolverVersion>1.7.2</resolverVersion>
<sisuInjectVersion>0.3.5</sisuInjectVersion>
<wagonVersion>3.4.3</wagonVersion>
<!--TODO: change to true after the code cleanup-->
<spotbugs.failOnError>false</spotbugs.failOnError>
Expand All @@ -79,15 +80,15 @@ THE SOFTWARE.
<dependencies>
<dependency>
<groupId>io.jenkins.tools.bom</groupId>
<artifactId>bom-2.289.x</artifactId>
<version>1008.vb9e22885c9cf</version>
<artifactId>bom-2.319.x</artifactId>
<version>1013.vf8058992a042</version>
<scope>import</scope>
<type>pom</type>
</dependency>
<dependency>
<groupId>org.jenkins-ci.main</groupId>
<artifactId>jenkins-test-harness</artifactId>
<version>1666.vd1360abbfe9e</version>
<groupId>javax.annotation</groupId>
<artifactId>javax.annotation-api</artifactId>
<version>1.3.2</version>
</dependency>
</dependencies>
</dependencyManagement>
Expand Down Expand Up @@ -403,17 +404,14 @@ THE SOFTWARE.
<artifactId>maven-core</artifactId>
<version>${mavenMinimalVersion}</version>
<exclusions>
<exclusion>
<!--Jenkins bundles Guava 11.0.1, this library requires 20.0 and makes the plugin to bundle it.
The interceptor should not be actually used inside Jenkins, what could possibly go wrong?
-->
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
</exclusion>
<exclusion>
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.inject</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
Expand All @@ -431,11 +429,6 @@ THE SOFTWARE.
<artifactId>maven-resolver-provider</artifactId>
<version>${mavenMinimalVersion}</version>
</dependency>
<dependency>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
<scope>provided</scope>
</dependency>
<dependency>
<!--
Maven embedder version has to comply with the minimally supported version of Maven,
Expand All @@ -445,13 +438,6 @@ THE SOFTWARE.
<artifactId>maven-embedder</artifactId>
<version>${mavenMinimalVersion}</version>
<exclusions>
<exclusion>
<!--Jenkins bundles Guava 11.0.1, this library requires 20.0 and makes the plugin to bundle it.
The interceptor should not be actually used inside Jenkins, what could possibly go wrong?
-->
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
<exclusion>
<groupId>com.google.inject</groupId>
<artifactId>guice</artifactId>
Expand Down Expand Up @@ -493,12 +479,6 @@ THE SOFTWARE.
<groupId>org.apache.maven.resolver</groupId>
<artifactId>maven-resolver-transport-wagon</artifactId>
<version>${resolverVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-container-default</artifactId>
</exclusion>
</exclusions>
</dependency>
<dependency>
<groupId>org.apache.maven.resolver</groupId>
Expand All @@ -510,17 +490,6 @@ THE SOFTWARE.
<groupId>org.eclipse.sisu</groupId>
<artifactId>org.eclipse.sisu.plexus</artifactId>
<version>${sisuInjectVersion}</version>
<exclusions>
<exclusion>
<groupId>org.sonatype.sisu</groupId>
<artifactId>sisu-guice</artifactId>
</exclusion>
<!-- Clashes with core, breaks tests: -->
<exclusion>
<groupId>com.google.guava</groupId>
<artifactId>guava</artifactId>
</exclusion>
</exclusions>
</dependency>

<!--
Expand Down Expand Up @@ -590,10 +559,6 @@ THE SOFTWARE.
<artifactId>wagon-ssh</artifactId>
<version>${wagonVersion}</version>
<exclusions>
<exclusion>
<groupId>org.codehaus.plexus</groupId>
<artifactId>plexus-component-api</artifactId>
</exclusion>
<exclusion>
<!-- Comes from the jsch plugin -->
<groupId>com.jcraft</groupId>
Expand Down Expand Up @@ -643,10 +608,6 @@ THE SOFTWARE.
<artifactId>lib-jenkins-maven-embedder</artifactId>
<version>3.15</version>
<exclusions>
<exclusion><!-- we'll add our own patched version. see https://issues.jenkins.io/browse/JENKINS-1680 -->
<groupId>jtidy</groupId>
<artifactId>jtidy</artifactId>
</exclusion>
<exclusion>
<groupId>commons-cli</groupId>
<artifactId>commons-cli</artifactId>
Expand Down Expand Up @@ -742,7 +703,6 @@ THE SOFTWARE.
<dependency>
<groupId>org.mockito</groupId>
<artifactId>mockito-inline</artifactId>
<version>4.0.0</version>
<scope>test</scope>
</dependency>
<dependency>
Expand Down Expand Up @@ -829,41 +789,11 @@ THE SOFTWARE.
</dependencies>

<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.3.1</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-dependency-plugin</artifactId>
<executions>
<execution>
<id>resgen</id>
<phase>generate-resources</phase>
<goals>
<!-- we use copy as this is a dependency from outside the reactor -->
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<!-- classworld 1.1 for maven 2 builds -->
<artifactItem>
<groupId>classworlds</groupId>
<artifactId>classworlds</artifactId>
<version>1.1</version>
<type>jar</type>
<outputDirectory>${project.build.outputDirectory}</outputDirectory>
<destFileName>classworlds.jar</destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
<execution>
<id>copy-binary-files</id>
<phase>process-resources</phase>
Expand Down Expand Up @@ -961,8 +891,8 @@ THE SOFTWARE.
</pluginRepositories>

<scm>
<connection>scm:git:git://github.com/${gitHubRepo}.git</connection>
<developerConnection>scm:git:git@github.com:${gitHubRepo}.git</developerConnection>
<connection>scm:git:https://github.com/${gitHubRepo}</connection>
<developerConnection>scm:git:https://github.com/${gitHubRepo}</developerConnection>
<url>https://github.com/${gitHubRepo}</url>
<tag>${scmTag}</tag>
</scm>
Expand Down
50 changes: 0 additions & 50 deletions src/test/java/hudson/maven/ExtractResourceWithChangesSCM2.java

This file was deleted.

5 changes: 2 additions & 3 deletions src/test/java/hudson/maven/MavenMultiLevelModuleTest.java
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
import hudson.Launcher;
import hudson.model.BuildListener;
import hudson.model.Result;
import hudson.tasks.Maven.MavenInstallation;
import org.junit.Rule;
import org.junit.Test;
import org.jvnet.hudson.test.ExtractChangeLogSet;
Expand All @@ -16,7 +15,7 @@
import static org.junit.Assert.assertFalse;
import static org.junit.Assert.assertNotNull;
import static org.junit.Assert.assertTrue;
import org.jvnet.hudson.test.ToolInstallations;
import org.jvnet.hudson.test.ExtractResourceWithChangesSCM;

/**
* Test incremental build for a project with modules and submodules.
Expand Down Expand Up @@ -46,7 +45,7 @@ public void testIncrementalBuildWithMultiModuleChangeSet() throws Exception {
Maven36xBuildTest.configureMaven36();
MavenModuleSet m = j.jenkins.createProject(MavenModuleSet.class, "p");
m.getReporters().add(new TestReporter());
m.setScm(new ExtractResourceWithChangesSCM2(getClass().getResource("maven-multilevelmod.zip"),
m.setScm(new ExtractResourceWithChangesSCM(getClass().getResource("maven-multilevelmod.zip"),
getClass().getResource("maven-multilevelmod-changes.zip")));

j.buildAndAssertSuccess(m);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,6 @@
import hudson.maven.reporters.MavenFingerprinter;
import hudson.model.BuildListener;
import hudson.tasks.LogRotator;
import hudson.tasks.Maven.MavenInstallation;
import org.apache.commons.io.FileUtils;
import org.junit.Assert;
import org.junit.Before;
Expand All @@ -17,11 +16,11 @@
import org.jvnet.hudson.test.Bug;
import org.jvnet.hudson.test.For;
import org.jvnet.hudson.test.JenkinsRule;
import org.jvnet.hudson.test.ToolInstallations;

import java.io.File;
import java.io.IOException;
import java.util.Collection;
import org.jvnet.hudson.test.ExtractResourceWithChangesSCM;

/**
*
Expand Down Expand Up @@ -70,7 +69,7 @@ public void setUp()
m.setBuildDiscarder( new LogRotator( "-1", "2", "-1", "1" ) );
m.getReporters().add( new TestReporter() );
m.getReporters().add( new MavenFingerprinter() );
m.setScm( new ExtractResourceWithChangesSCM2( getClass().getResource( "maven-multimod.zip" ),
m.setScm( new ExtractResourceWithChangesSCM( getClass().getResource( "maven-multimod.zip" ),
getClass().getResource( "maven-multimod-changes.zip" ) ) );
j.buildAndAssertSuccess( m );
// Now run a second build with the changes.
Expand Down
Loading

0 comments on commit 9887b67

Please sign in to comment.