views:

233

answers:

3

I would like to make my plugin require a license to run similar to the maven clover plugin. Is there some utility out there that I can generate licenses with that will also allow me to integrate that into the plugin?

I need to do the following steps.

  1. Modify the existing plugin to validate the license file
  2. Generate the license file online and store the information for retrieval later.

Thanks, Walter

+1  A: 

If you use something too weak, it will always be possible to decompile the invoking class, remove the verification, compile the new class and add it back to the jar. So, unless you have some method of inline code in a lot of methods to do a complex validation of a string from the license data, use a tool that does something more.

You could try for example:

  • Easy Licenser from Agilis Software (uses Java so integration is straightforward)

    [...] Java is our native language so integration is straightforward, and we are familiar with the issues you need to consider when protecting Java applications. Our license management solutions include protections such as digital library signatures (to make sure the libraries haven't been 'spoofed' or tampered with), guidelines on how to use exception-based flow of control to conceal the license check call itself, as well as protection against clock roll-back on time-limited licenses.

  • LM-X License Manager from X-Formation (uses JNI so make your application platform dependent)

But mostly the entry point to the license manager is vulnerable. With decompilers you can remove those calls from the software. Obfuscators make it a lot harder, but not impossible.

The mentioned solutions don't seem too be very expensive. However, if you decide to build your own solution, this open-source library might help: TrueLicense Library Collection.

In all cases, I don't think these tools offer the "web integration" you're looking for (something a la Atlassian if I understood well your requirement). It looks like you'll have to implement a custom solution for that.

Pascal Thivent
+1: for pointing out that any license checking can be disabled by finding and removing calls to the license checker.
Stephen C
Good point, but how much effort is involved? For instance the maven clover plugin requires a license right and won't run without it. Would it be more beneficial/productive to open source it and ask for donations to support development and then charge for support?
I suggested to use an existing solution, Easy Licenser, and not to build your own. So I'm not sure to understand your question. Now, regarding clover, I don't use it, I prefer Cobertura which is open source and free.
Pascal Thivent
A: 

I don't know of any plugins that generate licenses within a Maven build.
However if you have a license generation tool such as Padlock (commercial product), it is relatively straightforward to create a plugin that wraps the generation process.

Padlock has a such an API (pdf), and there is a basic guide to creating Maven plugins, or you can look at some of the other questions on this site to get started

Rich Seller
@Rich: I don't think this is what the question is asking. I think he wants a license management system to restrict use of his plugin.
Stephen C
Rich, this is a great recommendation, it looks like that is exactly what I will need. So, I need to simply integrate this into my maven plugin and look for the license file. Then on the server side, I will generate the license for them to download after receiving a payment confirmation.I'll have to give it a try.Great find.
A: 

Hi Walter, I'm the author of the Padlock License Manager mentioned above. I don't know of any license solution that specifically designed for Maven, but from what you say I think Padlock could meet your needs. I encourage you to download the latest release and try it out. Feel free to email me with any questions.

Thanks!

Jason

Jason Nichols
Jason,I checked out your site yesterday - it looks awesome. The implementation details for the licensing look straightforward and not too involved. I'm not ready yet to secure the plugin/code (I still need to generalize it), but I know what direction I'll take.