[ 
https://issues.apache.org/jira/browse/BEAM-8106?focusedWorklogId=510651&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-510651
 ]

ASF GitHub Bot logged work on BEAM-8106:
----------------------------------------

                Author: ASF GitHub Bot
            Created on: 12/Nov/20 07:59
            Start Date: 12/Nov/20 07:59
    Worklog Time Spent: 10m 
      Work Description: emilymye commented on a change in pull request #13211:
URL: https://github.com/apache/beam/pull/13211#discussion_r521899254



##########
File path: sdks/java/container/java11/build.gradle
##########
@@ -0,0 +1,28 @@
+/*
+ * 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.
+ */
+
+plugins {
+    id 'base'
+    id 'org.apache.beam.module'
+}
+
+project.ext {
+    imageJavaVersion = '11'

Review comment:
       I don't think apply from supports this (I think? gradle documentation is 
confusing but it seems like it's not supported via 
https://docs.gradle.org/current/dsl/org.gradle.api.Project.html#org.gradle.api.Project:apply(java.util.Map))
 but I tried to make this slightly cleaner so these files literally only holds 
the parameters before applying the script

##########
File path: sdks/java/container/common.gradle
##########
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+applyDockerNature()
+
+def imageJavaVersion = project.hasProperty('imageJavaVersion') ? 
project.findProperty('imageJavaVersion').replace("java", "") : '8'

Review comment:
       done

##########
File path: sdks/java/container/common.gradle
##########
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+applyDockerNature()
+
+def imageJavaVersion = project.hasProperty('imageJavaVersion') ? 
project.findProperty('imageJavaVersion').replace("java", "") : '8'
+
+description = "Apache Beam :: SDKs :: Python :: Container :: Java 
${imageJavaVersion} Container"
+
+configurations {
+    dockerDependency
+    sdkHarnessLauncher
+    pulledLicenses
+}
+
+dependencies {
+    pulledLicenses project(path: ":sdks:java:container", configuration: 
"pulledLicenses")
+    dockerDependency project(path: ":sdks:java:container", configuration: 
"dockerDependency")
+    sdkHarnessLauncher project(path: ":sdks:java:container", configuration: 
"sdkHarnessLauncher")
+}
+
+task copyDockerfileDependencies(type: Copy) {
+    from configurations.dockerDependency
+    rename "slf4j-api.*", "slf4j-api.jar"
+    rename "slf4j-jdk14.*", "slf4j-jdk14.jar"
+    rename 'beam-sdks-java-harness-.*.jar', 'beam-sdks-java-harness.jar'
+    rename 'beam-sdks-java-io-kafka.*.jar', 'beam-sdks-java-io-kafka.jar'
+    rename 'kafka-clients.*.jar', 'kafka-clients.jar'
+    into "build/target"
+}
+
+task copySdkHarnessLauncher(type: Copy) {
+    from configurations.sdkHarnessLauncher
+    into "build/target"
+}
+
+task copyPulledLicenses(type: Copy) {
+    from configurations.pulledLicenses
+    into "build/target"
+}
+
+task copyGolangLicenses(type: Copy) {
+    from "${project(':release:go-licenses:java').buildDir}/output"
+    into "build/target/go-licenses"
+    dependsOn ':release:go-licenses:java:createLicenses'
+}
+
+task skipPullLicenses(type: Exec) {
+    executable "sh"
+    args "-c", "mkdir -p build/target/third_party_licenses && touch 
build/target/third_party_licenses/skip"
+}
+
+docker {
+    name containerImageName(
+            name: 
"${project.docker_image_default_repo_prefix}java${imageJavaVersion}_sdk",

Review comment:
       If I adapted it to applyDockerNature I'd probably do it in a different 
PR since I'll be potentially affecting all the other containers

##########
File path: sdks/java/container/common.gradle
##########
@@ -0,0 +1,93 @@
+/*
+ * 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.
+ */
+
+applyDockerNature()
+
+def imageJavaVersion = project.hasProperty('imageJavaVersion') ? 
project.findProperty('imageJavaVersion').replace("java", "") : '8'
+
+description = "Apache Beam :: SDKs :: Python :: Container :: Java 
${imageJavaVersion} Container"

Review comment:
       I kind of like the safety that we only have to supply this description 
path in one place




----------------------------------------------------------------
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]


Issue Time Tracking
-------------------

    Worklog Id:     (was: 510651)
    Time Spent: 15h  (was: 14h 50m)

> Publish Java 11 SDK Harness docker image
> ----------------------------------------
>
>                 Key: BEAM-8106
>                 URL: https://issues.apache.org/jira/browse/BEAM-8106
>             Project: Beam
>          Issue Type: Sub-task
>          Components: build-system, sdk-java-harness
>            Reporter: Hannah Jiang
>            Priority: P3
>              Labels: Clarified, portability
>          Time Spent: 15h
>  Remaining Estimate: 0h
>
> There are multiple benefits including optimized String representation in 
> memory, better GC, more Docker friendliness and others that could be of the 
> interest of users.



--
This message was sent by Atlassian Jira
(v8.3.4#803005)

Reply via email to