-
Notifications
You must be signed in to change notification settings - Fork 62
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
Concat THIRD-PARTY to LICENSE in bin release #778
Conversation
e58798f
to
1fbd410
Compare
<excludedScopes>test,provided</excludedScopes> | ||
<!-- If true enforces excluding transitive dependencies of the excluded artifacts in the reactor; | ||
otherwise only artifacts that match exclude filters are excluded. | ||
It excludes all transitives dependencies of excludedScopes dependencies. --> | ||
<excludeTransitiveDependencies>true</excludeTransitiveDependencies> |
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.
Doing some testing in more depth regards of this configuration, I figured it is wrong to have it to true.
The case that triggered enabling this is in fact correct. It can happens that a direct dependency with scope test has a dependency that is included in the jar/binary release.
org.apiguardian:apiguardian-api
is a dependency of org.junit.jupiter:junit-jupiter-api
and org.apache.calcite:calcite-core
.
Given that calcite is included with scope compile, it is the expected to see:
+- org.junit.jupiter:junit-jupiter-api:jar:5.7.1:test
+- org.apiguardian:apiguardian-api:jar:1.1.0:compile
+- org.opentest4j:opentest4j:jar:1.2.0:test
\- org.junit.platform:junit-platform-commons:jar:1.7.1:test
And org.apiguardian:apiguardian-api
must be in the LICENSE file.
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 I remove this line?
I will try to merge this tonight and to publish a second release candidate.
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.
Yes it has to be removed to be compliant with the policy that any bundled bit in release binary must be listed.
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.
Removing this incorrect configuration allow then to properly handle the circular dependency to baremaps components in the LICENSE:
<excludedGroups>^org\.apache\.baremaps</excludedGroups>
To remove:
org.apache.baremaps--baremaps-core--0.7.2-SNAPSHOT=Apache License 2.0
org.apache.baremaps--baremaps-ogcapi--0.7.2-SNAPSHOT=Apache License 2.0
org.apache.baremaps--baremaps-server--0.7.2-SNAPSHOT=Apache License 2.0
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.
This makes me wonder if we could exclude all the Apache projects.
<excludedGroups>^org\.apache</excludedGroups>
I pulled the branch and did some more in-depth analysis. I think this approach is better and embrace the fact that we have to deal with a manual step/verification of the content added in LICENSE for: license merging, choose one license per bundled dependency. Having a file within source repository allow for proper review of changes. However in order to make this maintainable and usable, we should have a way to identify drift between dependencies in Here is the trial I did locally to address this point:
Changing a dependency version:
Adding a dependency:
Removing a dependency:
The CI could enforce that there is no difference between the generated |
This is a pretty cool idea! From what I understand, the generation takes the actual override into account. We could actually override the override.properties file, but I prefer if we do this with the diff command before releasing. |
3efa23c
to
67d6626
Compare
Kudos, SonarCloud Quality Gate passed! 0 Bugs No Coverage information |
@Perdjesk What do you think about this alternative. The idea is to introduce a template (override.ftl) that serves as a basis to create a file for overriding the licenses of the dependencies (override.properties). In this file, we can then manually uniformize the license name and pick the least restrictive licenses (e.g. dual licensing). The maintenance of this file will require to perform a diff with a newly generated file before publishing a release and to make a few manual modifications.
I like that in this alternative, we have the same ordering and naming between the LICENSE file, the override.properties file, and the lib/ directory of the binary distribution. We loose the grouping by license, but I'm not sure that it is a requirement.