Over a million developers have joined DZone.
{{announcement.body}}
{{announcement.title}}

The Latest Version of Degraph is Available for Download at Maven Central

DZone's Guide to

The Latest Version of Degraph is Available for Download at Maven Central

· Java Zone
Free Resource

Microservices! They are everywhere, or at least, the term is. When should you use a microservice architecture? What factors should be considered when making that decision? Do the benefits outweigh the costs? Why is everyone so excited about them, anyway?  Brought to you in partnership with IBM.

Degraph is my personal open source project for visualizing and testing package dependencies in JVM byte code. I released the latest version 0.1.1, so go grab it while it is hot.

What’s new

This release in mainly a bug fixing release. So the important changes are two bug fixes. Degraph 0.1.0 missed a few dependencies to static methods, and through class valued annotations. So you absolutely should upgrade. I hope you don’t use many static methods, so the first bug won’t bite you as bad. The second one is actually quite annoying with certain frameworks. Spring for example uses lot’s of annotations, including those that contain references to classes.

Fortunately upgrading your tests will be easy, because degraph-check is now available through Maven Central, which makes using it really a no-brainer.

Although this release is just a minor one, a tiny new feature slipped in almost by accident. And when I tried it at work it turned out to be extremely helpful: You can now instruct Degraph to create a graphml file for failed tests. Just provide a path using the printTo method. An example looks like this:

test("Check identifies cycles in junit") {
    classpath.printTo("junitDependencyFailure.graphml").including("**.junit.**") should  not be (violationFree)
  }

This allows for a relative quick workflow:

  • Write your test
  • Run the test
  • Open the resulting graphml file in yed
  • Modify code or test
  • Run the test
  • Reopen in yed
  • Repeat the previous three steps until done

I found this tremendously helpful when fixing the problems that the bugfixes mentioned before surfaced.

Give it a try and let me know about your experiences in the comments below, or in the issue tracker over at github.

Discover how the Watson team is further developing SDKs in Java, Node.js, Python, iOS, and Android to access these services and make programming easy. Brought to you in partnership with IBM.

Topics:

Published at DZone with permission of Jens Schauder, DZone MVB. See the original article here.

Opinions expressed by DZone contributors are their own.

THE DZONE NEWSLETTER

Dev Resources & Solutions Straight to Your Inbox

Thanks for subscribing!

Awesome! Check your inbox to verify your email so you can start receiving the latest in tech news and resources.

X

{{ parent.title || parent.header.title}}

{{ parent.tldr }}

{{ parent.urlSource.name }}