-
Notifications
You must be signed in to change notification settings - Fork 81
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Replace JSR-305 annotations with spotbugs annotations (#71)
* update parent and minimum jenkins version * use jenkins 2.414.3 * Replace JSR-305 annotations with spotbugs annotations Annotations for Nonnull, CheckForNull, and several others were proposed for Java as part of dormant Java specification request JSR-305. The proposal never became a part of standard Java. Jenkins plugins should switch from using JSR-305 annotations to use Spotbugs annotations that provide the same semantics. The [mailing list discussion](https://groups.google.com/g/jenkinsci-dev/c/uE1wwtVi1W0/m/gLxdEJmlBQAJ) from James Nord describes the affected annotations and why they should be replaced with annotations that are actively maintained. The ["Improve a plugin" tutorial](https://www.jenkins.io/doc/developer/tutorial-improve/replace-jsr-305-annotations/) provides instructions to perform this change. An [OpenRewrite recipe](https://docs.openrewrite.org/recipes/jenkins/javaxannotationstospotbugs) is also available and is even better than the tutorial. Confirmed that automated tests pass on Linux with Java 21. * Suppress spotbugs warning to not catch NPE * Rely on spotbugs configuration from parent pom * Use asm-api version provided by plugin BOM * Use latest plugin bom version * Remove uused code formatting version * Resolve hpi plugin warning for developer URL * Remove unused dependencies, reduce HPI file size * Use parent pom 4.82 https://github.com/jenkinsci/plugin-pom/releases/tag/plugin-4.82 * Use plugin parent pom 4.82 * Revert incorrect change to README URL * Remove extra blank line in test * Use consistent source format in test * Simplify the issue URL to modern URL and shorter string * Remove blue ocean from CI URL Blue Ocean enhancements have stopped. In the future, Blue Ocean will be removed from ci.jenkins.io. Better to prepare for that removal now. https://www.jenkins.io/doc/book/blueocean/ says: Blue Ocean status Blue Ocean will not receive further functionality updates. Blue Ocean will continue to provide easy-to-use Pipeline visualization, but it will not be enhanced further. It will only receive selective updates for significant security issues or functional defects. Alternative options for Pipeline visualization, such as the Pipeline: Stage View and Pipeline Graph View plugins, are available and offer some of the same functionality. While not complete replacements for Blue Ocean, contributions are encouraged from the community for continued development of these plugins. The Pipeline syntax snippet generator assists users as they define Pipeline steps with their arguments. It is the preferred tool for Jenkins Pipeline creation, as it provides online help for the Pipeline steps available in your Jenkins controller. It uses the plugins installed on your Jenkins controller to generate the Pipeline syntax. Refer to the Pipeline steps reference page for information on all available Pipeline steps. --------- Co-authored-by: Stefan Spieker <[email protected]>
- Loading branch information
1 parent
7b1f926
commit eae62fe
Showing
15 changed files
with
35 additions
and
128 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,7 +3,7 @@ | |
<parent> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>plugin</artifactId> | ||
<version>4.32</version> | ||
<version>4.82</version> | ||
</parent> | ||
|
||
<artifactId>robot</artifactId> | ||
|
@@ -37,27 +37,21 @@ | |
</developers> | ||
|
||
<properties> | ||
<jenkins.version>2.346.3</jenkins.version> | ||
<junit.version>1166.va_436e268e972</junit.version> | ||
<token-macro.version>2.6</token-macro.version> | ||
<maven-git-code-format.version>1.25</maven-git-code-format.version> | ||
<script-security.version>1229.v4880b_b_e905a_6</script-security.version> | ||
<blueocean-rest-impl.version>1.25.0</blueocean-rest-impl.version> | ||
<java.level>8</java.level> | ||
<jenkins.version>2.414.3</jenkins.version> | ||
</properties> | ||
|
||
<scm> | ||
<connection>scm:git:ssh://github.com/jenkinsci/robot-plugin.git</connection> | ||
<developerConnection>scm:git:ssh://[email protected]/jenkinsci/robot-plugin.git</developerConnection> | ||
<developerConnection>scm:git:[email protected]:jenkinsci/robot-plugin.git</developerConnection> | ||
<url>https://www.github.com/jenkinsci/robot-plugin</url> | ||
<tag>HEAD</tag> | ||
</scm> | ||
<dependencyManagement> | ||
<dependencies> | ||
<dependency> | ||
<groupId>io.jenkins.tools.bom</groupId> | ||
<artifactId>bom-2.346.x</artifactId> | ||
<version>1742.vb_70478c1b_25f</version> | ||
<artifactId>bom-2.414.x</artifactId> | ||
<version>2982.vdce2153031a_0</version> | ||
<scope>import</scope> | ||
<type>pom</type> | ||
</dependency> | ||
|
@@ -76,7 +70,6 @@ | |
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>junit</artifactId> | ||
<version>${junit.version}</version> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins.workflow</groupId> | ||
|
@@ -119,19 +112,16 @@ | |
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>token-macro</artifactId> | ||
<version>${token-macro.version}</version> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.jenkins.blueocean</groupId> | ||
<artifactId>blueocean-rest-impl</artifactId> | ||
<version>${blueocean-rest-impl.version}</version> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>script-security</artifactId> | ||
<version>${script-security.version}</version> | ||
<optional>true</optional> | ||
</dependency> | ||
<dependency> | ||
|
@@ -145,90 +135,9 @@ | |
<version>3.2.9</version> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.apache.commons</groupId> | ||
<artifactId>commons-lang3</artifactId> | ||
<version>3.12.0</version> | ||
</dependency> | ||
|
||
<!-- RequireUpperBounds --> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>jackson2-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>display-url-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>scm-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>variant</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>credentials</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci</groupId> | ||
<artifactId>symbol-annotation</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci.plugins</groupId> | ||
<artifactId>cloudbees-folder</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>io.jenkins.plugins</groupId> | ||
<artifactId>snakeyaml-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-api</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>log4j-over-slf4j</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>slf4j-jdk14</artifactId> | ||
<scope>test</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.slf4j</groupId> | ||
<artifactId>jcl-over-slf4j</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.ow2.asm</groupId> | ||
<artifactId>asm</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.ow2.asm</groupId> | ||
<artifactId>asm-tree</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.ow2.asm</groupId> | ||
<artifactId>asm-analysis</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.ow2.asm</groupId> | ||
<artifactId>asm-util</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.kohsuke</groupId> | ||
<artifactId>access-modifier-annotation</artifactId> | ||
<scope>provided</scope> | ||
</dependency> | ||
<dependency> | ||
<groupId>org.jenkins-ci</groupId> | ||
<artifactId>annotation-indexer</artifactId> | ||
</dependency> | ||
<dependency> | ||
<groupId>com.github.spotbugs</groupId> | ||
<artifactId>spotbugs-annotations</artifactId> | ||
<artifactId>commons-lang3-api</artifactId> | ||
</dependency> | ||
|
||
</dependencies> | ||
|
@@ -253,15 +162,6 @@ | |
</dependency> | ||
</dependencies> | ||
</plugin> | ||
<plugin> | ||
<groupId>com.github.spotbugs</groupId> | ||
<artifactId>spotbugs-maven-plugin</artifactId> | ||
<version>3.1.12</version> | ||
<configuration> | ||
<threshold>Low</threshold> | ||
<effort>Max</effort> | ||
</configuration> | ||
</plugin> | ||
</plugins> | ||
|
||
<extensions> | ||
|
@@ -292,10 +192,10 @@ | |
</pluginRepositories> | ||
<issueManagement> | ||
<system>Jira</system> | ||
<url>https://issues.jenkins-ci.org/issues/?jql=component%20%3D%20robot-plugin</url> | ||
<url>https://issues.jenkins.io/issues/?jql=component%3Drobot-plugin</url> | ||
</issueManagement> | ||
<ciManagement> | ||
<system>Jenkins</system> | ||
<url>https://ci.jenkins.io/blue/organizations/jenkins/Plugins%2Frobot-plugin</url> | ||
<url>https://ci.jenkins.io/job/Plugins/job/robot-plugin/</url> | ||
</ciManagement> | ||
</project> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
src/test/java/hudson/plugins/robot/SilentIncorrectnessListener.java
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters