Repository navigation
·
3 commits
to master
since this release
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.
ProjectDependencyAnalysisexposes 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.
ClassEntrySourcereads classes from a jar, a directory, a URL or an in-memory archive (#335).ClassNamesandArtifactKeysreplace the class-name andgroupId:artifactIdhelpers that consumers wrote themselves (#333). - Deprecation. The no-argument and three-set
ProjectDependencyAnalysisconstructors are deprecated; they still work. Use the constructors their Javadoc points to (#332). - Requirements. Java 8 or later, unchanged from 1.17.2.
⚠️ Deprecated
- Deprecate legacy ProjectDependencyAnalysis constructors (#332) @slachiewicz
🚀 New features and improvements
- Return analysis classes and usages in sorted order (#347) @slachiewicz
- Add a class entry source abstraction for dependency analysis (#335) @slachiewicz
- Add shared class name and artifact key helpers (#333) @slachiewicz
- Expose used dependency classes and candidate artifacts for duplicate-class cases (#280) (#320) @slachiewicz
🐛 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
- Name junit-jupiter as the classless aggregator example (#341) @slachiewicz
- Refresh the site page and README for the next release (#338) @slachiewicz
- Fix README wording, links, and list structure (#337) @slachiewicz
- Fix stale README links (#328) @slachiewicz
- Document that inlined constants are detected (#303) @slachiewicz
👻 Maintenance
- Ignore missing output directories in dependency classes provider (#336) @slachiewicz
- Replace AssertJ assertions with JUnit 5 in tests (#334) @slachiewicz
- Simplify dependency removal matching with anyMatch (#330) @slachiewicz
- Modernize tests (#325) @slachiewicz
- Apply OpenRewrite cleanups (#324) @slachiewicz
- Simplify jarWithCompileDependency IT to avoid volatile Guava dependency (#319) @slachiewicz
- Extend ATR configuration in .asf.yaml (#318) @slawekjaranowski
- Remove redundant javaVersion property (#317) @slachiewicz
- Point ciManagement at GitHub Actions (#311) @slachiewicz
- Collect the filtered dependencies with RepositorySystem directly (#306) @slachiewicz
- Use push for PR Automation and add PR Check (#309) @slawekjaranowski
🔧 Build
- Use GitHub Issues in issueManagement (#327) @slachiewicz
📦 Dependency updates
- Bump org.ow2.asm:asm from 9.10.1 to 9.11.1 (#308, #310) @dependabot[bot]
- Bump org.apache.maven.shared:maven-shared-components from 49 to 50 (#304) @dependabot[bot]