Skip to content
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

Add dependency report generation #55

Merged
merged 3 commits into from
Feb 16, 2024

Conversation

sbesson
Copy link
Member

@sbesson sbesson commented Nov 29, 2023

This adds the build logic to generate a report of all dependencies of the NGFF-Converter application including their licenses similar to the effort done for https://www.glencoesoftware.com/products/omeroplus/dependencies/

A new build artifact should be generated including the dependency report in various formats (XML, JSON, HTML) for inspection. The current version of the dependencies include a few No license found statements but this should be addressed when we consume the upcoming releases of bioformats2raw and raw2ometiff

Copy link
Member

@melissalinkert melissalinkert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe I'm doing something wrong, but if I just run ./gradlew clean build locally with this PR's branch:

> Configure project :
Project : => no module-info.java found

> Task :licenseMain FAILED

FAILURE: Build failed with an exception.

* What went wrong:
A problem was found with the configuration of task ':licenseMain' (type 'LicenseCheck').
  - In plugin 'com.hierynomus.gradle.license.LicenseBasePlugin' type 'com.hierynomus.gradle.license.tasks.LicenseCheck' property 'header' specifies file '/home/melissa/NGFF-Converter/LICENSE' which doesn't exist.
    
    Reason: An input file was expected to be present but it doesn't exist.
    
    Possible solutions:
      1. Make sure the file exists before the task is called.
      2. Make sure that the task which produces the file is declared as an input.
    
    Please refer to https://docs.gradle.org/7.3.1/userguide/validation_problems.html#input_file_does_not_exist for more details about this problem.

* Try:
> Run with --stacktrace option to get the stack trace.
> Run with --info or --debug option to get more log output.
> Run with --scan to get full insights.

* Get more help at https://help.gradle.org

BUILD FAILED in 35s
8 actionable tasks: 8 executed

@sbesson
Copy link
Member Author

sbesson commented Nov 30, 2023

Thanks @melissalinkert, 796f476 should fix the issue by limiting the plugin to be executed to the dependency report.

./gradlew clean
./gradlew build
./gradlew downloadLicenses

should all be functional targets

Copy link
Member

@melissalinkert melissalinkert left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

./gradlew clean build works without error. ./gradlew downloadLicenses also runs without error, and places report files in build/reports/license/.

It does look like only the dependency-license*, and not license-dependency* files are included in the zip artifact, but I assume that's intentional? As far as I can see both sets of files have the same information, just organized differently.

@sbesson
Copy link
Member Author

sbesson commented Dec 1, 2023

Thanks, the choice was definitely intentional. dependency-license.* is grouping the information by dependency while license-dependency* is grouping the information by license. I found the latter representation to be of limited value while the former has the most useful information for this dependency reporting.

@DavidStirling DavidStirling merged commit 3329786 into glencoesoftware:main Feb 16, 2024
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants