·
4 commits
to master
since this release
Maven Shared Utils 3.5.0 is the first release since 3.4.2 (May 2023). The baseline is unchanged: Java 8 and Maven 3.
Most of the work deprecates utilities that now have JDK or Apache Commons equivalents, and fixes bugs in process handling, StringUtils, PathTool and Xpp3Dom.
Runtime dependency changes:
- commons-io 2.11.0 β 2.22.0
- jansi (optional) 2.4.0 β 2.4.3
- The provided-scope
jsr305dependency is gone. slf4j-api stays at 1.7.36.
π¨ Removed
CommandlineandShellno longer implementCloneable. Theirclone()methods always threw, so only code that references them is affected (#365) @elharo
β οΈ Deprecated
StringUtils.replaceandStringUtils.contains(#427) @slachiewicz- The
loggingpackage, in favour ofMessageBuilderFactory(#423) @slachiewicz StringUtils.concatenate, in favour ofString.join(#361) @elharoStringUtils.clean(), in favour ofStringUtils.trim()(#356) @HarshMehta112PathTool(#355) @elharoStringUtils.split(#350) @elharo- The remaining shared XML classes, including
Xpp3Dom(MSHARED-1274, #162, #171) @elharo - Add missing
@Deprecatedannotations (#163) @elharo FileUtils.forceMkdirandcontentEquals, which Commons IO provides (MSHARED-1271, #155, #156) @elharoOs, unmaintained for over a decade (MSHARED-1215, #157) @elharoFileUtils.copyFileandFilterWrapper, in favour oforg.apache.maven.shared.filtering(MSHARED-1260, #147) @elharoWriterFactory(MSHARED-1254, #146) andReaderFactory(MSHARED-1253, #145) @elharo
π Bug fixes
Process handling:
- Close process streams after exit, to work around the JDK-4311711 hang (#412) @elharo
CommandLineUtils: wait on every pumper in atry/finally(#399) @elharoAbstractStreamHandler.setDone: callnotifyAllto wake waiting threads (#405) @elharoStreamPollFeeder: declaredoneandexceptionasvolatile(#387) @elharo- Pass
streamCharsetto the stdout and stderr pumpers (#432) @slachiewicz CmdShell: quote items that cmd.exe would otherwise interpret (#434) @slachiewicz
XML:
Xpp3DomBuilder.createXmlReader: stop changing system properties, which was not thread-safe (#393) @elharoXpp3Dom.removeChild(int): fixchildMapcorruption with duplicate names (#395) @elharoXpp3Dom.getValue(): honour the@NonNullcontract (#389) @elharoXpp3DomWriter: reject a null DOM with a namedNullPointerException(#426) @slachiewiczPrettyPrintXMLWriter: handle a nulllineIndentin the constructors (#382) @elharo
Strings, paths and files:
StringUtils.chompLast: fixStringIndexOutOfBoundsExceptionwhen the separator is longer than the string (#401) @elharoStringUtils.chopNewline(""): fixStringIndexOutOfBoundsException(#380) @elharoStringUtils.leftPadandrightPad: handle an empty delimiter withoutArithmeticException(#409) @elharoPathTool.getRelativeFilePath: fix the Windows drive-letter regex (#384) and return an empty string instead of null for cross-drive paths (#403) @elharoOs.getOsFamily: return an empty string instead of null (#425) @slachiewicz- Copy a symbolic link even when its target does not exist (#433) @slachiewicz
π Documentation
- Port the site from APT to Markdown (#420) and migrate the site descriptor to the v2 model (#430) @slachiewicz
- Rewrite the documentation in ASD-STE100 Simplified Technical English (#418) @elharo
- Correct the class names that deprecation notes point at (#428) @slachiewicz
- Stop naming individual Windows versions in the
CmdShelldocs (#435) @elharo - Fix site page issues (#417), follow Oracle Javadoc conventions (#360), and clean up Javadoc (#150, #353) @elharo
- Correct the
StringUtils.abbreviate()Javadoc (#343) @phymod0
π» Maintenance
- Drop the nullness annotations:
jsr305was replaced by JSpecify (#364), which was then removed (#429) @slachiewicz - Remove the last dependency on Plexus, which was test-scoped (#151) @elharo
- Remove unreachable escaping logic (#369) and unused code (#159, #161) @elharo
- Clean up API docs and exceptions (MSHARED-1273, #158, #160) @elharo
- Code modernisation:
StringBuilderfor locals (#368), empty arrays intoArray(#188), cached system properties (#187), diamond operator (MNG-6847, #166 @timtebeek), stale warning suppressions (#152) @elharo
β Tests
- Migrate the tests to JUnit 5 (#345 @sparsick, #359 @slachiewicz)
- Fix varargs warnings in
StringUtilsTest(#437) @Luffy777-max - Use precise assertions (#192), show Unicode unescaped on failure (#185), and test exceptions properly (#149) @elharo
π§ Build and infrastructure
- Remove plugin downgrades for bugs that have since been fixed (MSHARED-1112, #144) @elharo
- Enable GitHub Issues (#195) @Bukama
- Enable branch protection rules (#344) @sebtiem
- Add a tag template to the release-drafter configuration (#436) @slawekjaranowski
π¦ Dependency updates
Runtime:
- commons-io 2.11.0 β 2.22.0 (#148, #153 @elharo; #175 MSHARED-1363, #176, #191, #342, #346, #375 @dependabot)
- jansi 2.4.0 β 2.4.3 (#167, #193, #372) @dependabot
Build and test:
- Parent
maven-shared-components39 β 49 (#168, #178, #189, #196, #357, #358, #376, #378) @dependabot - maven-assembly-plugin 3.6.0 β 3.8.0 (#174, #351) and maven-resources-plugin 3.3.1 β 3.5.0 (#352, #370) @dependabot
apache/maven-gh-actions-sharedworkflows v3 β v5 (#172, #413, #414, #415, #416) @dependabot- hamcrest 2.2 β 3.0 (#180, #181), commons-text 1.10.0 β 1.11.0 (#169), jspecify 1.0.0 β 1.0.1 (#419) @dependabot
- Fix the hamcrest dependencies (MSHARED-1255, #142, #143) @elharo
Full changelog: maven-shared-utils-3.4.2...maven-shared-utils-3.5.0