-
Notifications
You must be signed in to change notification settings - Fork 112
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
Ignore fatal errors in POMs of transitive dependencies #106
Conversation
Thanks Sebastian, Would it be an idea to make this configurable behaviour? I could imagine you want to be informed and "actively choose" to ignore those broken dependencies. It might be an even better idea to explicitly be able to list those dependencies in the build.gradle file and link them either to the right license, or to the 'noLicense'. |
Hmm, I see several issues here. If the POM cannot be parsed as it's malformed, you actually don't know the license. Which is different from 'noLicense' because you cannot even tell that no license has been specified. Prior to my commits, the behavior was that the task would throw an exception not write a results file. I don't think that's a feasible behavior, even if some one deliberately has not enabled to ignore malformed POMs. Of course I could introduce a property like |
I think that an error from the build is exactly what you want. Suppose it is an internal artifact (not a public one) that has a malformed POM. Then instead of ignoring this you want to fix it. Also even if the POM is malformed, you might actually know yourself which license it is, so then an explicit mapping of the artifact would be preferred instead of just assigning the empty license to it. |
Note that my fix only applies to malformed transitive dependencies. And these are not so likely to be internals ones, probably. For first-order dependencies already Gradle itself would choke on malformed POMs during dependency resolution. But anyway, I see your point, also I tend to disagree :-) I'll see what I can do. |
@hierynomus I'll split the unrelated commits to other PRs so you can merge them right away. |
To not break original, this is disabled by default.
@hierynomus I've updated the PR, please have a look (and merge PR #107 first to get the tests working again). |
Thanks! |
@hierynomus Thanks for merging! Can I expect a new release with this included? |
And it is there: 0.13.0 (https://plugins.gradle.org/plugin/com.github.hierynomus.license) |
Great, thanks! Unfortunately, I've discovered an issue due to the upgrade to the Android Gradle plugin. It breaks using your plugin in a project which depends on an older version of the Android Gradle plugin. I already have a fix and a PR is underway. |
@hierynomus See #109. |
No description provided.