[
https://issues.apache.org/jira/browse/BEAM-3522?focusedWorklogId=92658&page=com.atlassian.jira.plugin.system.issuetabpanels:worklog-tabpanel#worklog-92658
]
ASF GitHub Bot logged work on BEAM-3522:
----------------------------------------
Author: ASF GitHub Bot
Created on: 19/Apr/18 16:16
Start Date: 19/Apr/18 16:16
Worklog Time Spent: 10m
Work Description: aaltay closed pull request #5183: [BEAM-3522] Update
beam docs to reference Gradle instead of Maven
URL: https://github.com/apache/beam/pull/5183
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/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md
index cbfa0377fab..0cf500288c5 100644
--- a/.github/PULL_REQUEST_TEMPLATE.md
+++ b/.github/PULL_REQUEST_TEMPLATE.md
@@ -12,6 +12,6 @@ Follow this checklist to help us incorporate your
contribution quickly and easil
- [ ] How it does it
- [ ] Why this approach
- [ ] Each commit in the pull request should have a meaningful subject line
and body.
- - [ ] Run `mvn clean verify` to make sure basic checks pass. A more thorough
check will be performed on your pull request automatically.
+ - [ ] Run `./gradlew build` to make sure basic checks pass. A more thorough
check will be performed on your pull request automatically.
- [ ] If this contribution is large, please file an Apache [Individual
Contributor License Agreement](https://www.apache.org/licenses/icla.pdf).
diff --git a/.test-infra/jenkins/common_job_properties.groovy
b/.test-infra/jenkins/common_job_properties.groovy
index beb6e2ac467..d19fc88f474 100644
--- a/.test-infra/jenkins/common_job_properties.groovy
+++ b/.test-infra/jenkins/common_job_properties.groovy
@@ -183,26 +183,6 @@ class common_job_properties {
}
}
- // Sets common config for Maven jobs.
- static void setMavenConfig(context, String mavenInstallation='Maven 3.5.2') {
- context.mavenInstallation(mavenInstallation)
- context.mavenOpts('-Dorg.slf4j.simpleLogger.showDateTime=true')
-
context.mavenOpts('-Dorg.slf4j.simpleLogger.dateTimeFormat=yyyy-MM-dd\\\'T\\\'HH:mm:ss.SSS')
- // The -XX:+TieredCompilation -XX:TieredStopAtLevel=1 JVM options enable
- // tiered compilation to make the JVM startup times faster during the
tests.
- context.mavenOpts('-XX:+TieredCompilation')
- context.mavenOpts('-XX:TieredStopAtLevel=1')
- context.rootPOM(checkoutDir + '/pom.xml')
- // Use a repository local to the workspace for better isolation of jobs.
- context.localRepository(LocalRepositoryLocation.LOCAL_TO_WORKSPACE)
- // Disable archiving the built artifacts by default, as this is slow and
flaky.
- // We can usually recreate them easily, and we can also opt-in individual
jobs
- // to artifact archiving.
- if (context.metaClass.respondsTo(context, 'archivingDisabled', boolean)) {
- context.archivingDisabled(true)
- }
- }
-
// Sets common config for PreCommit jobs.
static void setPreCommit(context,
String commitStatusName,
diff --git a/.test-infra/jenkins/test_wordcount.sh
b/.test-infra/jenkins/test_wordcount.sh
deleted file mode 100755
index e059a3552bf..00000000000
--- a/.test-infra/jenkins/test_wordcount.sh
+++ /dev/null
@@ -1,125 +0,0 @@
-#!/bin/bash
-#
-# 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.
-#
-
-# This script runs WordCount example locally in a few different ways.
-# Specifically, all combinations of:
-# a) using mvn exec, or java -cp with a bundled jar file;
-# b) input filename with no directory component, with a relative directory, or
-# with an absolute directory; AND
-# c) input filename containing wildcards or not.
-#
-# The one optional parameter is a path from the directory containing the script
-# to the directory containing the top-level (parent) pom.xml. If no parameter
-# is provided, the script assumes that directory is equal to the directory
-# containing the script itself.
-#
-# The exit-code of the script indicates success or a failure.
-
-set -e
-set -o pipefail
-
-PASS=1
-VERSION=$(mvn org.apache.maven.plugins:maven-help-plugin:2.1.1:evaluate
-Dexpression=project.version | grep -v '\[')
-JAR_FILE=examples/java/target/beam-examples-java-bundled-${VERSION}.jar
-
-function check_result_hash {
- local name=$1
- local outfile_prefix=$2
- local expected=$3
-
- local actual=$(LC_ALL=C sort $outfile_prefix-* | md5sum | awk '{print $1}' \
- || LC_ALL=C sort $outfile_prefix-* | md5 -q) || exit 2 # OSX
- if [[ "$actual" != "$expected" ]]
- then
- echo "FAIL $name: Output hash mismatch. Got $actual, expected $expected."
- PASS=""
- echo "head hexdump of actual:"
- head $outfile_prefix-* | hexdump -c
- else
- echo "pass $name"
- # Output files are left behind in /tmp
- fi
-}
-
-function get_outfile_prefix {
- local name=$1
- # NOTE: mktemp on OSX doesn't support --tmpdir
- mktemp -u "/tmp/$name.out.XXXXXXXXXX"
-}
-
-function run_via_mvn {
- local name=$1
- local input=$2
- local expected_hash=$3
-
- local outfile_prefix="$(get_outfile_prefix "$name")" || exit 2
- local cmd='mvn exec:java -f pom.xml -pl examples/java \
- -Dexec.mainClass=org.apache.beam.examples.WordCount \
- -Dexec.args="--runner=DirectRunner --inputFile='"$input"'
--output='"$outfile_prefix"'"'
- echo "$name: Running $cmd" >&2
- sh -c "$cmd"
- check_result_hash "$name" "$outfile_prefix" "$expected_hash"
-}
-
-function run_bundled {
- local name=$1
- local input=$2
- local expected_hash=$3
-
- local outfile_prefix="$(get_outfile_prefix "$name")" || exit 2
- local cmd='java -cp '"$JAR_FILE"' \
- org.apache.beam.examples.WordCount \
- --runner=DirectRunner \
- --inputFile='"'$input'"' \
- --output='"$outfile_prefix"
- echo "$name: Running $cmd" >&2
- sh -c "$cmd"
- check_result_hash "$name" "$outfile_prefix" "$expected_hash"
-}
-
-function run_all_ways {
- local name=$1
- local input=$2
- local expected_hash=$3
-
- run_via_mvn ${name}a "$input" $expected_hash
- check_for_jar_file
- run_bundled ${name}b "$input" $expected_hash
-}
-
-function check_for_jar_file {
- if [[ ! -f $JAR_FILE ]]
- then
- echo "Jar file $JAR_FILE not created" >&2
- exit 2
- fi
-}
-
-run_all_ways wordcount1 "LICENSE" c5350a5ad4bb51e3e018612b4b044097
-run_all_ways wordcount2 "./LICENSE" c5350a5ad4bb51e3e018612b4b044097
-run_all_ways wordcount3 "$PWD/LICENSE" c5350a5ad4bb51e3e018612b4b044097
-run_all_ways wordcount4 "L*N?E*" c5350a5ad4bb51e3e018612b4b044097
-run_all_ways wordcount5 "./LICE*N?E" c5350a5ad4bb51e3e018612b4b044097
-run_all_ways wordcount6 "$PWD/*LIC?NSE" c5350a5ad4bb51e3e018612b4b044097
-
-if [[ ! "$PASS" ]]
-then
- echo "One or more tests FAILED."
- exit 1
-fi
-echo "All tests PASS"
diff --git a/runners/gearpump/README.md b/runners/gearpump/README.md
index e8ce79487d4..d447d1b25a1 100644
--- a/runners/gearpump/README.md
+++ b/runners/gearpump/README.md
@@ -34,15 +34,12 @@ git clone https://github.com/apache/beam
git checkout gearpump-runner
```
-Then switch to the newly created directory and run Maven to build the Apache
Beam:
+Then run Gradle to build Apache Beam:
```
-cd beam
-mvn clean install -DskipTests
+./gradlew :beam-runners-gearpump:build
```
-Now Apache Beam and the Gearpump Runner are installed in your local Maven
repository.
-
###Running Wordcount Example
Download something to count:
@@ -51,6 +48,9 @@ Download something to count:
curl http://www.gutenberg.org/cache/epub/1128/pg1128.txt > /tmp/kinglear.txt
```
+> Note: There is an open issue to update this README for Gradle:
+[BEAM-4129](https://issues.apache.org/jira/browse/BEAM-4129).
+
Run the pipeline, using the Gearpump runner:
```
diff --git a/sdks/go/BUILD.md b/sdks/go/BUILD.md
index 2cd81c9e467..3471f117624 100644
--- a/sdks/go/BUILD.md
+++ b/sdks/go/BUILD.md
@@ -20,19 +20,19 @@
# Go build
This document describes the [Go](https://golang.org) code layout and build
integration
-with Maven. The setup is non-trivial, because the Go toolchain expects a
-certain layout and Maven support is limited.
+with Gradle. The setup is non-trivial, because the Go toolchain expects a
+certain layout and Gradle support is limited.
Goals:
- 1. Go code can be built and tested using Maven w/o special requirements.
+ 1. Go code can be built and tested using Gradle w/o special requirements.
1. Go tools such as `go build`, `go test` and `go generate` work as usual.
1. Go code can be pulled with `go get` from `github.com/apache/beam` for
users.
1. Go programs can used in docker container images.
In short, the goals are to make both worlds work well.
-### Maven integration
+### Gradle integration
The Go toolchain expects the package name to match the directory structure,
which in turn must be rooted in `github.com/apache/beam` for `go get` to work.
----------------------------------------------------------------
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:
[email protected]
Issue Time Tracking
-------------------
Worklog Id: (was: 92658)
Time Spent: 0.5h (was: 20m)
> Review and update the references of maven to gradle in the source code
> ----------------------------------------------------------------------
>
> Key: BEAM-3522
> URL: https://issues.apache.org/jira/browse/BEAM-3522
> Project: Beam
> Issue Type: Sub-task
> Components: build-system
> Reporter: Ismaël Mejía
> Assignee: Scott Wegner
> Priority: Major
> Time Spent: 0.5h
> Remaining Estimate: 0h
>
> Multiple files in the source code containe references in their documentation
> to use of maven commands, this should be updated into the corresponding
> gradle ones or be moved into the website.
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)