Big improvements coming to license-check

In looking at my old license-check project on Github, I’m embarrassed to say I haven’t done much in the last nine months. However, I’ve been working on some big improvements over the past few weeks. While the changes aren’t released into Maven Central yet, I think you’ll enjoy them when they are (probably under version 0.5.4).

For me, the biggest change is that the code is a lot more stable and much improved. My initial cut through the code was largely experimental as I thought through how to traverse the Aether dependencies for the license attribute and how to convert them into something readable. Now that I have a better grasp on how the whole process should work, I’m hardening the code and trying to make it a little more elegant (in my opinion, of course).

For you, I think you’re going to like the reporting from the plugin much better. Here’s an example report for a standard Spring MVC application connected to Mongo:

2014-03-18 license-check screen cap

I need to add some relatively complex unit testing related to Maven plugins as well as maybe some Guava enhancements before I release a new version. Still, I hope this piques your curiosity.

In case you ever need to host static content from CXF, try this before jumping off a bridge

For some odd reason, you may find that you really, really want to host some static content on your CXF server. Maybe you want to do something like host Swagger or IO Docs side by side with your REST API and you don’t feel like setting up a whole new service.

And if you’re like me, you’ve already shot yourself in the foot because you bound your RESTful service to the root of your Tomcat webapp. For example, your CXF servlet is bound to http://localhost:8080/petsore/* but you now want http://localhost:8080/petstore/docs/ to host your documentation, and CXF thinks your docs are an API endpoint.

You made your life complicated and set it up like this too, didn’t you?

And maybe you’ve tried to read the impenetrable documentation on the Apache CXF site with its maddening language about servlet initialization params relating to “redirects.” I debugged deep into the CXF sourcecode to figure what’s really going on. You need to start with CXF’s

Now that I’ve said all that, let me get to the bottom line. All you really need to do is make sure you’ve added two initialization params to your web.xml:

In my configuration, I had the Swagger docs under the src/main/webapps folder in my Maven project, so your mileage may vary depending on your configuration.

Good luck out there.