-
Notifications
You must be signed in to change notification settings - Fork 179
update min Java version, Maven dependencies and plugins #92
Changes from 4 commits
369619b
edce266
f76a91b
3b6344e
5ff0eb5
75a613d
099f6db
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 |
---|---|---|
|
@@ -3,4 +3,4 @@ language: java | |
sudo: false | ||
|
||
jdk: | ||
- oraclejdk7 | ||
- oraclejdk8 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -28,7 +28,7 @@ THE SOFTWARE. | |
<parent> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>1.625.3</version> | ||
<version>3.0</version> | ||
<relativePath /> | ||
</parent> | ||
|
||
|
@@ -97,7 +97,10 @@ THE SOFTWARE. | |
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> | ||
<project.build.outputEncoding>UTF-8</project.build.outputEncoding> | ||
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> | ||
<jacoco.version>0.7.8</jacoco.version> | ||
<ant.version>1.9.2</ant.version> | ||
<jacoco.version>0.7.9</jacoco.version> | ||
<jenkins.version>2.54</jenkins.version> | ||
<maven.version>3.5.2</maven.version> | ||
<powermock.version>1.6.6</powermock.version> | ||
</properties> | ||
|
||
|
@@ -119,7 +122,7 @@ THE SOFTWARE. | |
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>dashboard-view</artifactId> | ||
<version>2.1</version> | ||
<version>2.9.11</version> | ||
<optional>true</optional> | ||
<exclusions> | ||
<exclusion> | ||
|
@@ -128,33 +131,50 @@ THE SOFTWARE. | |
</exclusion> | ||
</exclusions> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.ant</groupId> | ||
<artifactId>ant</artifactId> | ||
<version>${ant.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>commons-io</groupId> | ||
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. I don't see any usages of commons-io in the changed code, why is the dependency necessary now? 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. Same reason than ant, but not needed anymore after a new update |
||
<artifactId>commons-io</artifactId> | ||
<version>2.5</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>xerces</groupId> | ||
<artifactId>xercesImpl</artifactId> | ||
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. Xerces dependency should not be needed since Java 7, why is it necessary here? 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. To fix this error but I should find another way:
|
||
<version>2.11.0</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>org.jacoco.report</artifactId> <!-- we're done with ReportMojo now, so we don't need to depend on the maven plugin anymore --> | ||
<version>${jacoco.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.kohsuke</groupId> | ||
<artifactId>asm5</artifactId> | ||
<version>5.0.1</version> | ||
<artifactId>asm6</artifactId> | ||
<version>6.0_BETA</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.ow2.asm</groupId> | ||
<artifactId>asm</artifactId> | ||
<version>5.0.1</version> | ||
<version>6.0</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.ow2.asm</groupId> | ||
<artifactId>asm-commons</artifactId> | ||
<version>5.0.1</version> | ||
<version>6.0</version> | ||
<scope>runtime</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.easymock</groupId> | ||
<artifactId>easymock</artifactId> | ||
<version>3.4</version> | ||
<version>3.5</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
|
@@ -195,34 +215,80 @@ THE SOFTWARE. | |
<version>3.5</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven.reporting</groupId> | ||
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. Why do we need all these Maven dependencies now? Where do we actually use functionality from them? 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. Because of the switch to org.jenkins-ci.plugins 3.0, which defines a very strict maven enforcer configuration. If not met, the build fails. The enforcer rule causing all of this is "Require Upper Bound Dependencies". |
||
<artifactId>maven-reporting-api</artifactId> | ||
<version>3.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven.reporting</groupId> | ||
<artifactId>maven-reporting-impl</artifactId> | ||
<version>2.3</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven.shared</groupId> | ||
<artifactId>maven-shared-utils</artifactId> | ||
<version>3.1.0</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-plugin-api</artifactId> | ||
<version>3.3.9</version> | ||
<version>${maven.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-artifact</artifactId> | ||
<version>3.3.9</version> | ||
<version>${maven.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-embedder</artifactId> | ||
<version>${maven.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-model</artifactId> | ||
<version>3.3.9</version> | ||
<version>${maven.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-repository-metadata</artifactId> | ||
<version>${maven.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-settings</artifactId> | ||
<version>3.3.9</version> | ||
<version>${maven.version}</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.maven</groupId> | ||
<artifactId>maven-aether-provider</artifactId> | ||
<version>3.3.9</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.codehaus.plexus</groupId> | ||
<artifactId>plexus-container-default</artifactId> | ||
<version>1.0.0</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.codehaus.plexus</groupId> | ||
<artifactId>plexus-interpolation</artifactId> | ||
<version>1.24</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.codehaus.plexus</groupId> | ||
<artifactId>plexus-utils</artifactId> | ||
<version>3.0.24</version> | ||
<version>3.1.0</version> | ||
</dependency> | ||
<!-- Somehow we need org.w3c.dom.ElementTraversal, but do not get it from any of the dependencies | ||
do not update to 2.x as it will not contain the class any more! --> | ||
|
@@ -234,7 +300,7 @@ THE SOFTWARE. | |
<dependency> | ||
<groupId>org.apache.httpcomponents</groupId> | ||
<artifactId>httpcore</artifactId> | ||
<version>4.4.1</version> | ||
<version>4.4.8</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
|
@@ -255,7 +321,7 @@ THE SOFTWARE. | |
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-shade-plugin</artifactId> | ||
<version>1.3.1</version> | ||
<version>3.1.0</version> | ||
<executions> | ||
<execution> | ||
<phase>insert-test</phase> | ||
|
@@ -276,20 +342,20 @@ THE SOFTWARE. | |
<plugin> | ||
<groupId>org.apache.maven.plugins</groupId> | ||
<artifactId>maven-compiler-plugin</artifactId> | ||
<version>3.6.0</version> | ||
<version>3.7.0</version> | ||
<configuration> | ||
<source>1.7</source> | ||
<target>1.7</target> | ||
<source>1.8</source> | ||
<target>1.8</target> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<groupId>org.codehaus.mojo</groupId> | ||
<artifactId>animal-sniffer-maven-plugin</artifactId> | ||
<version>1.9</version> | ||
<version>1.16</version> | ||
<configuration> | ||
<signature> | ||
<groupId>org.codehaus.mojo.signature</groupId> | ||
<artifactId>java17</artifactId> | ||
<artifactId>java18</artifactId> | ||
<version>1.0</version> | ||
</signature> | ||
</configuration> | ||
|
@@ -326,7 +392,6 @@ THE SOFTWARE. | |
<plugin> | ||
<groupId>org.jacoco</groupId> | ||
<artifactId>jacoco-maven-plugin</artifactId> | ||
<version>${jacoco.version}</version> | ||
<configuration> | ||
<excludes> | ||
<exclude>**/Messages.*</exclude> | ||
|
@@ -352,7 +417,6 @@ THE SOFTWARE. | |
<plugin> | ||
<groupId>org.jenkins-ci.tools</groupId> | ||
<artifactId>maven-hpi-plugin</artifactId> | ||
<version>1.121</version> | ||
<executions> | ||
<execution> | ||
<phase>compile</phase> | ||
|
@@ -361,12 +425,35 @@ THE SOFTWARE. | |
</goals> | ||
</execution> | ||
</executions> | ||
|
||
<configuration> | ||
<pluginFirstClassLoader>true</pluginFirstClassLoader> | ||
<maskClasses>org.objectweb.asm.</maskClasses> | ||
</configuration> | ||
</plugin> | ||
<plugin> | ||
<artifactId>maven-enforcer-plugin</artifactId> | ||
<executions> | ||
<execution> | ||
<id>display-info</id> | ||
<phase>validate</phase> | ||
<goals> | ||
<goal>display-info</goal> | ||
<goal>enforce</goal> | ||
</goals> | ||
<configuration> | ||
<rules> | ||
<enforceBytecodeVersion> | ||
<excludes> | ||
<exclude>org.ow2.asm:asm-commons</exclude> | ||
<exclude>org.ow2.asm:asm-tree</exclude> | ||
<exclude>org.ow2.asm:asm</exclude> | ||
</excludes> | ||
</enforceBytecodeVersion> | ||
</rules> | ||
</configuration> | ||
</execution> | ||
</executions> | ||
</plugin> | ||
</plugins> | ||
<pluginManagement> | ||
<plugins> | ||
|
@@ -385,7 +472,7 @@ THE SOFTWARE. | |
<artifactId> | ||
maven-hpi-plugin | ||
</artifactId> | ||
<versionRange>[1.64,)</versionRange> | ||
<versionRange>[2.0,)</versionRange> | ||
<goals> | ||
<goal>hpi</goal> | ||
<goal>apt-compile</goal> | ||
|
@@ -424,7 +511,7 @@ THE SOFTWARE. | |
org.codehaus.groovy.maven | ||
</groupId> | ||
<artifactId>gmaven-plugin</artifactId> | ||
<versionRange>[1.0-rc-5,)</versionRange> | ||
<versionRange>[1.0,)</versionRange> | ||
<goals> | ||
<goal>generateTestStubs</goal> | ||
<goal>testCompile</goal> | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,6 +23,7 @@ | |
|
||
|
||
public class ExecutionFileLoader implements Serializable { | ||
private static final long serialVersionUID = 1L; | ||
private final static String[] STARSTAR = {"**"}; | ||
private final static String[] ITEM_ZERO = {"{0}"}; | ||
|
||
|
@@ -33,10 +34,10 @@ public class ExecutionFileLoader implements Serializable { | |
private String[] includes; | ||
private String[] excludes; | ||
|
||
private ExecutionDataStore executionDataStore; | ||
private SessionInfoStore sessionInfoStore; | ||
private transient ExecutionDataStore executionDataStore; | ||
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. Can you add a comment why "transient" is necessary/useful here? 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. Sure. It's because of the switch to org.jenkins-ci.plugins 3.0, which defines a FindBugs analysis. |
||
private transient SessionInfoStore sessionInfoStore; | ||
|
||
private IBundleCoverage bundleCoverage; | ||
private transient IBundleCoverage bundleCoverage; | ||
|
||
private ArrayList<FilePath> execFiles; | ||
|
||
|
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.
Why do we need a dependency on Ant now?
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.
It was to fix this error, but it's probably not the best way: