Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Cyclic dependency analysis for Java 8 - for use in an automated build

I'll working on a project that is using JDepend to automatically generate a report of cyclic package dependencies as part of our CI build. (I am mainly interested in package level dependencies, so I've been using a cut down version of the XSLT to get a more focused report - otherwise, though, it is vanilla JDepend.)

However we are about to move the project to Java 8 and I have found that JDepend does not work against code compiled with the JDK 1.8 compiler. JDepend no longer seems to be being actively updated.

I'm trying to find a replacement that:

  • Works with JDK 1.8 compiled class and/or jars.
  • Reports cyclic dependencies at the package and/or jar level.
  • Can be automated from Ant (command line executable would do).
  • Produces a report that can be linked from a project home page and opened in a browser (e.g. HTML or plain text output - not a desktop app).
  • Also (preferably) produces - or can be configured/tweaked to produce - a focused report of just the cyclic dependencies (as JDepend can, if you modify the XSLT).
like image 405
Paul Avatar asked Oct 19 '22 11:10

Paul


1 Answers

Java 8 includes jdeps.exe in the /bin. Although this doesn't explicitly call out cyclic dependencies it does show all dependencies for a project's packages. It's good enough.

like image 190
Paul Avatar answered Oct 22 '22 22:10

Paul