-
Notifications
You must be signed in to change notification settings - Fork 127
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Write Excel files with extensive License Information (inc. infos from the JARs) #527
Write Excel files with extensive License Information (inc. infos from the JARs) #527
Conversation
Extended information are fetched from JAR files contents. The option is a boolean called "extendedInfo" and a parameter for the aggregate-download-licenses goal.
- Header font bold - Header light green background - Alternating white / light gray background --> To group all lines belonging to one plugin/dependency together.
Old Mojohaus badge removed
…eOffice ODS export
By removing it from source code.
…bled extended-info
Newline control characters are valid XML, form-feed control characters are invalid XML (destroying .xml and .ods files)
Thanks for PR. |
Thanks :-) Forgot: I kept the "run-one-it" profile to run single integration tests. I kept it because I needed to run the same test over and over, and not having to run all other tests together with mine, helped increase the development speed immensely. Because all integration tests together, take forever. |
|
Thanks, tested it, it works, I removed the single-test profile and pushed it to the Pull-Request, reducing its size 👍. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
for new feature @since
tags should be update to 2.4.0
src/it/aggregate-download-licenses-extended-spreadsheet/invoker.properties
Outdated
Show resolved
Hide resolved
src/it/aggregate-download-licenses-extended-spreadsheet/postbuild.groovy
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/AbstractDownloadLicensesMojo.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/download/LicenseDownloader.java
Outdated
Show resolved
Hide resolved
src/main/java/org/codehaus/mojo/license/download/LicenseSummaryWriter.java
Show resolved
Hide resolved
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we also update LicenseSummaryReader
?
By the way I don't see documentation about license summary content which is generated ... issue for next PR
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure how to answer that.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We have xsd for it ... it is manually updated ...
Please look #528
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Got it, I checked the XSD with some IDEs and found many errors, already in the existing XSD. I fixed those old bugs and added my newly written entries to the XSD.
To make sure the bugs don't reappear, I added XML validations against the XSD, to the unit test.
I also added an option that the XSD file is written into the same directory as the XML file is written into, and then gets referenced in the XML file. It's set with <useXsd>true</useXsd>
. So the XSD file can easily be used.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update current xsd file is enough - please remove useXsd options.
We should replace manual xml writing by Modello - we will have a automatic xsd with documentation generation.
It should be done in separate PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update current xsd file is enough - please remove useXsd options.
We should replace manual xml writing by Modello - we will have a automatic xsd with documentation generation. It should be done in separate PR.
I just want you to understand why I added the option. I never knew the XSD was somewhere inside the plugin, as most people I think. But with that option, it becomes very visible and easily usable by everyone.
On the other hand, will (after #529) the then generated XML reference the generated XSD? And how long do you estimate till #529 is implemented?
If you still want the useXsd option removed, I will remove it, without further questions.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove useXsd.
As it is open source project, so I don't know when generated XML will be implemented.
I will try to do it in next month unless someone else will do it early.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
src/main/java/org/codehaus/mojo/license/download/LicensedArtifactResolver.java
Outdated
Show resolved
Hide resolved
src/test/java/org/codehaus/mojo/license/download/LicenseSummaryTest.java
Outdated
Show resolved
Hide resolved
@Master-Code-Programmer thanks for you contribution. |
@slawekjaranowski As an afterthought, this is not a must for me, but may I humbly ask that you put me in the contributors list in the <contributors>
<contributor>
<name>Jan-Hendrik Diederich</name>
</contributor> ? I'm OK if you consider my contribution to be too insignificant to be mentioned. |
@Master-Code-Programmer Of course your contributions deserves to add you to contributors list. |
Thanks. |
For every Open Source Software (OSS) we use, our customer wants an extensive license report.
This plugin is almost perfect for that, except:
** The MANIFEST.MF with Bundle vendor, implementer, bundle license
** Multiple license text files for each license, directly in the JAR, no need to download that. So I'm looking for a LICENSE.txt file and all text files having a SPDX license name.
** Also NOTICE.txt files which contain often all relevant copyright information.
So I forked an extension which tries to fetch as much information as it can get from the JAR file and writes that with some pom.xml information, which was previously ignored, to the license.xml file.
This is of course optional, obviously the previous solution was good enough for most people so it's "off" by default (parameter is "extendedInfo", goal is "license:aggregate-download-licenses").
Since the next task would be:
"And now write an excessive amount of XSLT declarations to create a CSV report to import that into Excel, were you would have to pay extra attention so Excel doesn't convert all version numbers to dates, fit all columns, freeze header columns and rows, group them, etc.".
I skipped that part and added an option to write the result into a properly formatted Excel / Calc file (parameter is "writeExcelFile" / "writeCalcFile", the Excel file is better formatted).
And I still need the XML, since I need to parse it periodically and persist it into a database.
Since I wrote this I got E-Mails from people thanking me for this work and how useful it is. I now would like to have this integrated into the original plugin.
I would very much appreciate an acceptance of this pull request.