Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How can I compile a report showing all used licenses with Ant? [closed]

Tags:

licensing

ant

I'm currently using Ant and Maven in different projects. To be compliant with some regulations, I'm in charge of listing all licenses used in each project.

With Maven, it is easy, as the Maven Project Info Reports Plugin generates such a report automatically.

As I'm not fond of searching licenses for all my JARs I'm using in the projects, I would like to know if there's a plugin for Ant, performing this task.

Thanks in advance!

like image 562
guerda Avatar asked Nov 04 '22 04:11

guerda


1 Answers

Since this question hasn't got any hints, pointers or even answers, I hacked a solution by myself: license-report at github

The license-report is an Ant task which determines a license for most jar files. Currently, it searches in the following files for information:

  • META-INF/MANIFEST.MF
  • META-INF/LICENSE
  • LICENSE.txt
  • LICENSE
  • license/LICENSE.txt
  • license/LICENSE

These files are found in several common Open Source/Free Software libraries. Some libraries don't provide any information on their license (e.g. Spring framework).
For these libraries, the task does not find any information.

I will update the project as soon as possible that it prints out a nice xml and html report about the found licenses. Documentation and How To will follow, too.

I'm currently working on a demo project using this Ant task.

The demo project now creates an XML file with all library information. Just start it (with installed Ant) via ant build.xml in the root folder of license-report-demo. It prints out the location of the generated XML file. I will also include an XSLT to transform the XML into a nice HTML report. This will come in several days I think.

I create an XML file for further processing (e.g. CI systems like Hudson/Jenkins). This will help to generate a list of all licenses across projects in a central system.

like image 116
guerda Avatar answered Nov 09 '22 08:11

guerda