Hannah-Jiang commented on a change in pull request #11243: [BEAM-9136]Add
licenses for dependencies for Java
URL: https://github.com/apache/beam/pull/11243#discussion_r400602453
##########
File path: sdks/java/container/build.gradle
##########
@@ -68,6 +73,25 @@ golang {
}
}
+// this is a workaround to call generateLicenseReport task directly.
+// generateLicenseReport does not return correct dependency list when called
with dependsOn feature.
+task generateThirdPartyLicenses(type: Exec) {
+ workingDir project.rootProject.projectDir
+ commandLine './sdks/java/container/license_script.sh'
+}
+
+//command: ./gradlew generateLicenseReport
+licenseReport {
+ outputDir = 'third_party_licenses'
+ projects = [project.rootProject] + project.rootProject.subprojects
+ excludeOwnGroup = true
+}
+
+task copyThirdPartyLicenses(type: Copy) {
Review comment:
In the previous PR, @alanmyrvold mentioned that move this to
applyDockerNature in
buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy.
Given this implementation, I think it's better to keep it with individual
language, because Python does not have this task. (Python writes to
/opt/apache/beam/third_party_licenses directly.) Making this task runs for Java
and Go is not as simple as this implementation. Does this sound good?
----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:
[email protected]
With regards,
Apache Git Services