Major Maven Plugin Update

jSparrow 3.23.0 & jSparrow Maven Plugin 3.0.0

Major Maven Plugin Update & formatting features

We are excited to announce the major update of jSparrow Maven Plugin

3.0.0. The new key feature in Maven is the jsparrow:report that makes jSparrow’s static analysis capabilities available to everyone.

More features are added to support standard formatters and to specify the sources to refactor using glob expressions.

The new updates make jSparrow more friendly to users who work with diverse IDEs or DevOps tools.

⭐ The jSparrow report Goal

This Maven plugin goal is introduced to allow users to try the jSparrow Maven plugin on their sources for free. Similar to the refactor goal, the report goal analyzes the project and computes refactorings with the selected rules.

As a result, jSparrow generates an HTML report with the computed findings. Similar reports are available in the statistics page (e.g., for jenkins-core).

📌 Use Comparator Methods

The topic of jSparrow rules during this month has been to refactor the constructs used as Comparator instances. For example, the following code:

is transformed to:

The formatter Parameter

A new parameter is added to the refactor goal, to allow users to specify a customized Eclipse formatter. Any customized formatter can be exported from the Eclipse IDE and provided to the refactor goal through

the formatter parameter.

🔍The selectedSources Parameter

A new parameter is added to the refactor goal to allow users to specify sources that jSparrow shall consider for refactorings. Glob expressions can be used for specifying the selected sources.

This brings jSparrow to a total of 87 automatic refactoring rules!

Find out more information in the Release Notes for jSparrow Eclipse and jSparrow Maven

“Programs must be written for people to read, and only incidentally for machines to execute.” ― Harold Abelson

Happy Coding!