Details

    • New Feature
    • Status: Resolved
    • P2
    • Resolution: Fixed
    • None
    • 2.6.0
    • dsl-sql
    • None

    Description

      We don't have a brilliant way to distribute or launch using just downloaded jars, but it is useful anyhow to be able to quickly build a self-contained SQL shell. The Gradle application plugin does this really well.

      Attachments

        Issue Links

          Activity

            githubbot ASF GitHub Bot logged work - 27/Jun/18 18:33
            • Time Spent:
              10m
               
              kennknowles closed pull request #5786: [BEAM-4651] Add bundle-ready SQL shell using application plugin
              URL: https://github.com/apache/beam/pull/5786
               
               
                 

              This is a PR merged from a forked repository.
              As GitHub hides the original diff on merge, it is displayed below for
              the sake of provenance:

              As this is a foreign pull request (from a fork), the diff is supplied
              below (as it won't show otherwise due to GitHub magic):

              diff --git a/sdks/java/extensions/sql/shell/build.gradle b/sdks/java/extensions/sql/shell/build.gradle
              new file mode 100644
              index 00000000000..74fc9734e44
              --- /dev/null
              +++ b/sdks/java/extensions/sql/shell/build.gradle
              @@ -0,0 +1,39 @@
              +/*
              + * 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.
              + */
              +
              +apply plugin: org.apache.beam.gradle.BeamModulePlugin
              +
              +apply plugin: "application"
              +
              +dependencies {
              + compile project(path: ":beam-sdks-java-extensions-sql-jdbc", configuration: "shadow")
              +
              + if (project.hasProperty("beam.sql.shell.bundled")) {
              + project.getProperty("beam.sql.shell.bundled").tokenize(",").each {
              + subproject -> compile project(path: subproject, configuration: "shadow")
              + }
              + }
              +}
              +
              +processResources {
              + filter org.apache.tools.ant.filters.ReplaceTokens, tokens: [
              + 'beam.version': version,
              + ]
              +}
              +
              +mainClassName = "org.apache.beam.sdk.extensions.sql.jdbc.BeamSqlLine"
              diff --git a/settings.gradle b/settings.gradle
              index 969400951ff..07ae1adead7 100644
              --- a/settings.gradle
              +++ b/settings.gradle
              @@ -94,6 +94,8 @@ include "beam-sdks-java-extensions-sql"
               project(":beam-sdks-java-extensions-sql").dir = file("sdks/java/extensions/sql")
               include "beam-sdks-java-extensions-sql-jdbc"
               project(":beam-sdks-java-extensions-sql-jdbc").dir = file("sdks/java/extensions/sql/jdbc")
              +include "beam-sdks-java-extensions-sql-shell"
              +project(":beam-sdks-java-extensions-sql-shell").dir = file("sdks/java/extensions/sql/shell")
               include "beam-sdks-java-fn-execution"
               project(":beam-sdks-java-fn-execution").dir = file("sdks/java/fn-execution")
               include "beam-sdks-java-harness"


               

              ----------------------------------------------------------------
              This is an automated message from the Apache Git Service.
              To respond to the message, please log on 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
            githubbot ASF GitHub Bot logged work - 27/Jun/18 17:19
            • Time Spent:
              10m
               
              apilloud commented on issue #5786: [BEAM-4651] Add bundle-ready SQL shell using application plugin
              URL: https://github.com/apache/beam/pull/5786#issuecomment-400762925
               
               
                 LGTM.

              ----------------------------------------------------------------
              This is an automated message from the Apache Git Service.
              To respond to the message, please log on 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
            githubbot ASF GitHub Bot logged work - 27/Jun/18 16:48

            People

              kenn Kenneth Knowles
              kenn Kenneth Knowles
              Votes:
              0 Vote for this issue
              Watchers:
              0 Start watching this issue

              Dates

                Created:
                Updated:
                Resolved:

                Time Tracking

                  Estimated:
                  Original Estimate - Not Specified
                  Not Specified
                  Remaining:
                  Remaining Estimate - 0h
                  0h
                  Logged:
                  Time Spent - 0.5h
                  0.5h