Skip to content

1.18.0

Latest

Choose a tag to compare

@github-actions github-actions released this 28 Nov 19:55
· 3 commits to master since this release
maven-dependency-analyzer-1.18.0

Maven Dependency Analyzer 1.18.0 makes the analysis more accurate when a class is found in several jars or comes through an aggregator with no classes of its own, and exposes the raw class-level data behind each result. It still runs on Java 8, and all changes to the API are additive.

✨ Highlights

  • Fewer false "unused declared" reports. When a used class exists in several jars, the declared artifact now gets the credit instead of an undeclared duplicate (#315). Aggregators that ship no classes, such as junit-jupiter, count as used when what they bring in is used, and the artifacts they bring in are no longer reported as used undeclared (#316, #340).
  • Class-level data for each analysis. ProjectDependencyAnalysis exposes the dependency classes the bytecode references (getUsedDependencyClasses()), every artifact that provides each class (getCandidateArtifactsByUsedClass()), the one chosen (getSelectedArtifactByUsedClass()), and the classes that are ambiguous or unmapped (#320). The project's own classes and JDK classes are left out of these (#346).
  • Stable output. Class names, usages and maps keyed by class name come back sorted, and artifacts keep the order they were passed in, so results come back in a predictable order (#347).
  • New building blocks for tools on top of the analyzer. ClassEntrySource reads classes from a jar, a directory, a URL or an in-memory archive (#335). ClassNames and ArtifactKeys replace the class-name and groupId:artifactId helpers that consumers wrote themselves (#333).
  • Deprecation. The no-argument and three-set ProjectDependencyAnalysis constructors are deprecated; they still work. Use the constructors their Javadoc points to (#332).
  • Requirements. Java 8 or later, unchanged from 1.17.2.

⚠️ Deprecated

🚀 New features and improvements

🐛 Bug Fixes

  • Leave project and JDK classes out of the used dependency classes (#346) @slachiewicz
  • Keep the usages of used declared dependencies when forcing usage (#345) @slachiewicz
  • Credit classless aggregators such as junit-jupiter as used (#340) @slachiewicz
  • Treat classless aggregator dependencies as used when what they bring in is used (#316) @slachiewicz
  • Credit the declared artifact when several jars contain a used class (#315) @slachiewicz

📝 Documentation updates

👻 Maintenance

🔧 Build

📦 Dependency updates