You are viewing a plain text version of this content. The canonical link for it is here.
Posted to github@beam.apache.org by GitBox <gi...@apache.org> on 2020/03/27 00:00:48 UTC

[GitHub] [beam] Hannah-Jiang opened a new pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Hannah-Jiang opened a new pull request #11243: [BEAM-9136]Add licenses for dependencies for Java
URL: https://github.com/apache/beam/pull/11243
 
 
   **Please** add a meaningful description for your change here
   
   ------------------------
   
   Thank you for your contribution! Follow this checklist to help us incorporate your contribution quickly and easily:
   
    - [ ] [**Choose reviewer(s)**](https://beam.apache.org/contribute/#make-your-change) and mention them in a comment (`R: @username`).
    - [ ] Format the pull request title like `[BEAM-XXX] Fixes bug in ApproximateQuantiles`, where you replace `BEAM-XXX` with the appropriate JIRA issue, if applicable. This will automatically link the pull request to the issue.
    - [ ] Update `CHANGES.md` with noteworthy changes.
    - [ ] If this contribution is large, please file an Apache [Individual Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
   
   See the [Contributor Guide](https://beam.apache.org/contribute) for more tips on [how to make review process smoother](https://beam.apache.org/contribute/#make-reviewers-job-easier).
   
   Post-Commit Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   
   Lang | SDK | Apex | Dataflow | Flink | Gearpump | Samza | Spark
   --- | --- | --- | --- | --- | --- | --- | ---
   Go | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go/lastCompletedBuild/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Flink/lastCompletedBuild/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Go_VR_Spark/lastCompletedBuild/)
   Java | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Apex/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Dataflow_Java11/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Flink/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Batch/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Flink_Streaming/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Gearpump/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Samza/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_Spark/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_PVR_Spark_Batch/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_SparkStructuredStreaming/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Java_ValidatesRunner_SparkStructuredStreaming/lastCompletedBuild/)
   Python | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Python2/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python2/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Python35/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python35/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Python36/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python36/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Python37/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python37/lastCompletedBuild/) | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow_V2/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_VR_Dataflow_V2/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Py_ValCont/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Python2_PVR_Flink_Cron/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PostCommit_Python35_VR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python35_VR_Flink/lastCompletedBuild/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_Python_VR_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_Python_VR_Spark/lastCompletedBuild/)
   XLang | --- | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_XVR_Flink/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_XVR_Flink/lastCompletedBuild/) | --- | --- | [![Build Status](https://builds.apache.org/job/beam_PostCommit_XVR_Spark/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PostCommit_XVR_Spark/lastCompletedBuild/)
   
   Pre-Commit Tests Status (on master branch)
   ------------------------------------------------------------------------------------------------
   
   --- |Java | Python | Go | Website
   --- | --- | --- | --- | ---
   Non-portable | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Java_Cron/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Python_Cron/lastCompletedBuild/)<br>[![Build Status](https://builds.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_PythonLint_Cron/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Go_Cron/lastCompletedBuild/) | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Website_Cron/lastCompletedBuild/) 
   Portable | --- | [![Build Status](https://builds.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/badge/icon)](https://builds.apache.org/job/beam_PreCommit_Portable_Python_Cron/lastCompletedBuild/) | --- | ---
   
   See [.test-infra/jenkins/README](https://github.com/apache/beam/blob/master/.test-infra/jenkins/README.md) for trigger phrase, status and link of all Jenkins jobs.
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang commented on a change in pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
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_r406502531
 
 

 ##########
 File path: sdks/java/container/license_scripts/license_script.sh
 ##########
 @@ -0,0 +1,37 @@
+ # Licensed to the Apache Software Foundation (ASF) under one
+ # or more contributor license agreements.  See the NOTICE file
+ # distributed with this work for additional information
+ # regarding copyright ownership.  The ASF licenses this file
+ # to you under the Apache License, Version 2.0 (the
+ # License); you may not use this file except in compliance
+ # with the License.  You may obtain a copy of the License at
+ #
+ #     http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an AS IS BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
+set -e
+# reports are generated at ~/beam/java_third_party_licenses
+./gradlew generateLicenseReport --rerun-tasks
 
 Review comment:
   This is same as answered below.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] alanmyrvold commented on a change in pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
alanmyrvold 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_r406487569
 
 

 ##########
 File path: sdks/java/container/build.gradle
 ##########
 @@ -16,7 +16,11 @@
  * limitations under the License.
  */
 
-plugins { id 'org.apache.beam.module' }
+plugins {
+  id 'org.apache.beam.module'
+  id 'com.github.jk1.dependency-license-report' version '1.13'
 
 Review comment:
   Kenn mentioned hierynomus/license-gradle-plugin found  more accurate license dependencies; does that need to be added?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang commented on a change in pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
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_r406495748
 
 

 ##########
 File path: sdks/java/container/license_scripts/pull_licenses_java.py
 ##########
 @@ -0,0 +1,186 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+"""
+A script to pull licenses/notices/source code for Java dependencies.
 
 Review comment:
   We can do that by adding some more code to the scripts. I will add it.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang commented on issue #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
Hannah-Jiang commented on issue #11243: [BEAM-9136]Add licenses for dependencies for Java
URL: https://github.com/apache/beam/pull/11243#issuecomment-611175578
 
 
   @alanmyrvold, the PR is updated with 
   1. Pull missing licenses/notices from URL
   2. Pull source code of packages if the license is one of ['CDDL',  'LGPL', 'GLP', 'MPL' ].
   
   Could you please take a look?
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] alanmyrvold commented on a change in pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
alanmyrvold 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_r406491805
 
 

 ##########
 File path: sdks/java/container/license_scripts/pull_licenses_java.py
 ##########
 @@ -0,0 +1,186 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+"""
+A script to pull licenses/notices/source code for Java dependencies.
 
 Review comment:
   In addition to pulling the licenses, can this script generate a CSV of Library name, link to license, license name (like Apache, LGPL, etc), and whether source is downloaded/included?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang commented on issue #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
Hannah-Jiang commented on issue #11243: [BEAM-9136]Add licenses for dependencies for Java
URL: https://github.com/apache/beam/pull/11243#issuecomment-613013312
 
 
   Thanks @alanmyrvold.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang merged pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
Hannah-Jiang merged pull request #11243: [BEAM-9136]Add licenses for dependencies for Java
URL: https://github.com/apache/beam/pull/11243
 
 
   

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] alanmyrvold commented on a change in pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
alanmyrvold 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_r406488322
 
 

 ##########
 File path: sdks/java/container/license_scripts/license_script.sh
 ##########
 @@ -0,0 +1,37 @@
+ # Licensed to the Apache Software Foundation (ASF) under one
+ # or more contributor license agreements.  See the NOTICE file
+ # distributed with this work for additional information
+ # regarding copyright ownership.  The ASF licenses this file
+ # to you under the Apache License, Version 2.0 (the
+ # License); you may not use this file except in compliance
+ # with the License.  You may obtain a copy of the License at
+ #
+ #     http://www.apache.org/licenses/LICENSE-2.0
+ #
+ # Unless required by applicable law or agreed to in writing, software
+ # distributed under the License is distributed on an AS IS BASIS,
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ # See the License for the specific language governing permissions and
+ # limitations under the License.
+
+set -e
+# reports are generated at ~/beam/java_third_party_licenses
+./gradlew generateLicenseReport --rerun-tasks
 
 Review comment:
   Why does the gradle task need to run gradle? Can it be a dependency above?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang commented on a change in pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
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_r406494846
 
 

 ##########
 File path: sdks/java/container/build.gradle
 ##########
 @@ -68,6 +73,28 @@ golang {
   }
 }
 
+// this is a workaround to call generateLicenseReport task from project root directory.
+// generateLicenseReport does not return correct dependency list when not called from the root.
+task generateThirdPartyLicenses(type: Exec) {
+  workingDir project.rootProject.projectDir
+  commandLine './sdks/java/container/license_scripts/license_script.sh'
 
 Review comment:
   When the `generateLicenseReport` task is triggered by `dependsOn`, the task is not running at the project root directory regardless how to set project scope, and dependency list is not correct. This is a workaround to execute the `generateLicenseReport` from root directory and get correct dependency list.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang commented on a change in pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
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_r406502326
 
 

 ##########
 File path: sdks/java/container/build.gradle
 ##########
 @@ -16,7 +16,11 @@
  * limitations under the License.
  */
 
-plugins { id 'org.apache.beam.module' }
+plugins {
+  id 'org.apache.beam.module'
+  id 'com.github.jk1.dependency-license-report' version '1.13'
 
 Review comment:
   If I understand it correctly, dependencies without licenses/notice included in jar are *considered* as the missing dependencies at first. However, the reality is dependency scan is correct, it only missing licenses.  `com.github.jk1.dependency-license-report` generates `index.json` file as well, which provides a list of all dependencies. I used this file to go through all dependencies and pull licenses/notices if they are not pulled automatically.

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang commented on issue #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
Hannah-Jiang commented on issue #11243: [BEAM-9136]Add licenses for dependencies for Java
URL: https://github.com/apache/beam/pull/11243#issuecomment-612180179
 
 
   Thanks @alanmyrvold for reviewing it. 
   I added csv part and replied to your comments.
   Are these all resolved now or are there something I need to improve/fix?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang commented on a change in pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
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:
   From @alanmyrvold 
   > Can this task be added to buildSrc/src/main/groovy/org/apache/beam/gradle/BeamModulePlugin.groovy in applyDockerNature?
   
   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 only needs some configurations and 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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang commented on a change in pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
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_r406523425
 
 

 ##########
 File path: sdks/java/container/license_scripts/pull_licenses_java.py
 ##########
 @@ -0,0 +1,186 @@
+#
+# Licensed to the Apache Software Foundation (ASF) under one or more
+# contributor license agreements.  See the NOTICE file distributed with
+# this work for additional information regarding copyright ownership.
+# The ASF licenses this file to You under the Apache License, Version 2.0
+# (the "License"); you may not use this file except in compliance with
+# the License.  You may obtain a copy of the License at
+#
+#    http://www.apache.org/licenses/LICENSE-2.0
+#
+# Unless required by applicable law or agreed to in writing, software
+# distributed under the License is distributed on an "AS IS" BASIS,
+# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+# See the License for the specific language governing permissions and
+# limitations under the License.
+#
+"""
+A script to pull licenses/notices/source code for Java dependencies.
 
 Review comment:
   This is done. 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang commented on issue #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
Hannah-Jiang commented on issue #11243: [BEAM-9136]Add licenses for dependencies for Java
URL: https://github.com/apache/beam/pull/11243#issuecomment-604866764
 
 
   R: @robertwb, @alanmyrvold 
   Cc: @tvalentyn 

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] alanmyrvold commented on a change in pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
alanmyrvold 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_r406488881
 
 

 ##########
 File path: sdks/java/container/build.gradle
 ##########
 @@ -68,6 +73,28 @@ golang {
   }
 }
 
+// this is a workaround to call generateLicenseReport task from project root directory.
+// generateLicenseReport does not return correct dependency list when not called from the root.
+task generateThirdPartyLicenses(type: Exec) {
+  workingDir project.rootProject.projectDir
+  commandLine './sdks/java/container/license_scripts/license_script.sh'
 
 Review comment:
   Why does the gradle task need to start a shell script that runs gradle? Can the gradle task be a dependency instead?

----------------------------------------------------------------
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:
users@infra.apache.org


With regards,
Apache Git Services

[GitHub] [beam] Hannah-Jiang commented on a change in pull request #11243: [BEAM-9136]Add licenses for dependencies for Java

Posted by GitBox <gi...@apache.org>.
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:
users@infra.apache.org


With regards,
Apache Git Services