This is an automated email from the ASF dual-hosted git repository.

mergebot-role pushed a commit to branch mergebot
in repository https://gitbox.apache.org/repos/asf/beam-site.git

commit 3fbfbba92612bd80d3a21287406c494c01513499
Author: Daniel Oliveira <daniel.o.program...@gmail.com>
AuthorDate: Fri Apr 6 11:29:37 2018 -0700

    [BEAM-3252] Updating contributor's guide to reference Gradle.
    
    Removed as many references to maven or pom files under contribute
    as I could. There's still a few references in the Eclipse Tips file
    since I have no clue how to use Eclipse with Gradle and have yet to
    find someone who does.
    
    Also references in maturity-model in the dependency tree. It's not
    really possible to create a Gradle dependency tree that isn't hundreds
    of thousands of lines though, because each distinct configuration in
    each project has it's own dependencies so you end up creating hundreds
    of dependency trees, many of which are hundreds of lines long by
    themselves.
---
 src/contribute/contribution-guide.md |  8 ++++----
 src/contribute/intellij.md           | 20 ++++++++++++++++--
 src/contribute/maturity-model.md     |  2 +-
 src/contribute/runner-guide.md       | 40 ++++++++++++------------------------
 src/contribute/testing.md            | 37 ++++++++++++++-------------------
 5 files changed, 51 insertions(+), 56 deletions(-)

diff --git a/src/contribute/contribution-guide.md 
b/src/contribute/contribution-guide.md
index c8ddd8d..1fd46cd 100644
--- a/src/contribute/contribution-guide.md
+++ b/src/contribute/contribution-guide.md
@@ -246,9 +246,9 @@ to prevent the issue from reoccurring.
 
 #### Java SDK
 
-For contributions to the Java code, run unit tests locally via Maven.
+For contributions to the Java code, run unit tests locally via Gradle.
 
-    $ mvn clean verify
+    $ ./gradlew clean && ./gradlew :sdks:java:check
 
 #### Python SDK
 
@@ -271,11 +271,11 @@ command.
     $ tox -e lint_py2,lint_py3
 
 
-Beam supports running Python SDK tests using Maven. For this, navigate to root
+Beam supports running Python SDK tests using Gradle. For this, navigate to root
 directory of your Apache Beam clone and execute following command. Currently
 this cannot be run from a virtual environment.
 
-    $ mvn clean verify -pl sdks/python
+    $ ./gradlew clean && ./gradlew :sdks:python:check
 
 ## Review
 
diff --git a/src/contribute/intellij.md b/src/contribute/intellij.md
index fe3d7fb..2390083 100644
--- a/src/contribute/intellij.md
+++ b/src/contribute/intellij.md
@@ -15,6 +15,22 @@ section_menu: section-menu/contribute.html
 >
 > Mastering IntelliJ is, ultimately, your responsibility.
 
+## Create a working Gradle module
+
+1. Create an empty IntelliJ project outside of the Beam source tree.
+2. Under Project Structure > Project, select a Project SDK.
+3. Under Project Structure > Modules, click the + sign to add a module and 
select "Import Module".
+    1. Select the directory containing the Beam source tree.
+    2. Tick the "Import module from external model" button and select Gradle 
from the list.
+    3. Tick the following boxes.
+       * Use auto-import
+       * Create separate module per source set
+       * Store generated project files externally
+       * Use default gradle wrapper
+
+This should result in a working Gradle project. Build the project by executing 
the "build" task in
+the root Gradle module.
+
 ## Enable Annotation Processing
 
 To configure annotation processing in IntelliJ:
@@ -25,7 +41,7 @@ To configure annotation processing in IntelliJ:
    * "Enable annotation processing"
    * "Obtain processors from project classpath"
    * "Store generated sources relative to: _Module content root_"
-3. Set the generated source directories to be equal to the Maven directories:
+3. Set the generated source directories:
    * Set "Production sources directory:" to 
`target/generated-sources/annotations`
    * Set "Test sources directory:" to 
`target/generated-test-sources/test-annotations`
 4. Click "OK"
@@ -36,7 +52,7 @@ IntelliJ supports checkstyle within the IDE using the 
Checkstyle-IDEA plugin.
 
 1. Install the "Checkstyle-IDEA" plugin from the IntelliJ plugin repository
 2. Configure the plugin by going to Settings -> Other Settings -> Checkstyle
-3. Set Checkstyle version to the same as in `/pom.xml` (e.g. 6.19)
+3. Set Checkstyle version to the same as in `/build_rules.gradle` (e.g. 8.2)
 4. Set the "Scan Scope" to "Only Java sources (including tests)"
 5. In the "Configuration File" pane, add a new configuration using the plus 
icon:
     1. Set the "Description" to "Beam"
diff --git a/src/contribute/maturity-model.md b/src/contribute/maturity-model.md
index 429b04a..8f8cc04 100644
--- a/src/contribute/maturity-model.md
+++ b/src/contribute/maturity-model.md
@@ -42,7 +42,7 @@ The following table summarizes project's self-assessment 
against the Apache Matu
     <tr>
       <td><p>CD30</p></td>
       <td><p>The code can be built in a reproducible way using widely 
available standard tools.</p></td>
-      <td><p><b>YES.</b> The project uses Apache Maven and can be built via <a 
href="https://github.com/apache/beam/blob/master/README.md";>the standard 
&ldquo;mvn install&rdquo; on any platform</a>.</p></td>
+      <td><p><b>YES.</b> The project uses Gradle and can be built via <a 
href="https://github.com/apache/beam/blob/master/README.md";>the standard 
&ldquo;gradle build&rdquo; on any platform</a>.</p></td>
     </tr>
     <tr>
       <td><p>CD40</p></td>
diff --git a/src/contribute/runner-guide.md b/src/contribute/runner-guide.md
index 0302cd1..3fdfbab 100644
--- a/src/contribute/runner-guide.md
+++ b/src/contribute/runner-guide.md
@@ -637,37 +637,23 @@ matching a `ParDo` where the `DoFn` uses state or timers, 
etc.
 The Beam Java SDK and Python SDK have suites of runner validation tests. The
 configuration may evolve faster than this document, so check the configuration
 of other Beam runners. But be aware that we have tests and you can use them
-very easily!  To enable these tests in a Java-based runner using Maven, you
+very easily!  To enable these tests in a Java-based runner using Gradle, you
 scan the dependencies of the SDK for tests with the JUnit category
 `ValidatesRunner`.
 
 {:.no-toggle}
-```xml
-<plugin>
-  <groupId>org.apache.maven.plugins</groupId>
-  <artifactId>maven-surefire-plugin</artifactId>
-  <executions>
-    <execution>
-      <id>validates-runner-tests</id>
-      <phase>integration-test</phase>
-      <goals><goal>test</goal></goals>
-      <configuration>
-        <groups>org.apache.beam.sdk.testing.ValidatesRunner</groups>
-        <dependenciesToScan>
-          <dependency>org.apache.beam:beam-sdks-java-core</dependency>
-        </dependenciesToScan>
-        <systemPropertyVariables>
-          <beamTestPipelineOptions>
-            [
-              "--runner=MyRunner",
-              … misc test options …
-            ]
-          </beamTestPipelineOptions>
-        </systemPropertyVariables>
-      </configuration>
-    </execution>
-  </executions>
-</plugin>
+```
+task validatesRunner(type: Test) {
+  group = "Verification"
+  description = "Validates the runner"
+  def pipelineOptions = JsonOutput.toJson(["--runner=MyRunner", ... misc test 
options ...])
+  systemProperty "beamTestPipelineOptions", pipelineOptions
+  classpath = configurations.validatesRunner
+  testClassesDirs = 
files(project(":sdks:java:core").sourceSets.test.output.classesDirs)
+  useJUnit {
+    includeCategories 'org.apache.beam.sdk.testing.ValidatesRunner'
+  }
+}
 ```
 
 Enable these tests in other languages is unexplored.
diff --git a/src/contribute/testing.md b/src/contribute/testing.md
index ed733f9..2dcc7fe 100644
--- a/src/contribute/testing.md
+++ b/src/contribute/testing.md
@@ -161,7 +161,7 @@ details on those testing types.
    </td>
    <td>Correctness
    </td>
-   <td>E2E Test, <a 
href="https://github.com/apache/beam/blob/master/runners/pom.xml#L47";>@ValidatesRunner</a>
+   <td>E2E Test, @ValidatesRunner
    </td>
    <td><a 
href="https://github.com/apache/beam/blob/master/examples/java/src/test/java/org/apache/beam/examples/WordCountIT.java#L78";>WordCountIT</a>,
 <a 
href="https://github.com/apache/beam/blob/master/sdks/java/core/src/test/java/org/apache/beam/sdk/transforms/ParDoTest.java";>ParDoTest</a>
    </td>
@@ -319,33 +319,27 @@ desired configurations.
 
 #### How to run Java NeedsRunner tests
 
-NeedsRunner is a category of tests that require a Beam runner. A subset of 
these
-tests cannot be executed while building their corresponding modules because all
-runners depend on these modules (e.g. `sdks/java/core`) to be built. To break
-the circular dependency, these tests are executed after the Direct Runner is
-built.
-
-To run this subset of the NeedsRunner tests (requires Maven 3.3.1+):
+NeedsRunner is a category of tests that require a Beam runner. To run
+NeedsRunner tests:
 
 ```
-$ mvn -pl runners/direct-java -am install -DskipTests
-$ mvn -pl runners/direct-java surefire:test@validates-runner-tests
+$ ./gradlew :runners:direct-java:needsRunnerTests
 ```
 
 To run a single NeedsRunner test use the `test` property, e.g.
 
 ```
-$ mvn -pl runners/direct-java surefire:test@validates-runner-tests 
-Dtest=MapElementsTest#testMapBasic
+$ ./gradlew :runners:direct-java:needsRunnerTests --tests 
org.apache.beam.sdk.transforms.MapElementsTest.testMapBasic
 ```
 
 will run the `MapElementsTest.testMapBasic()` test.
 
-
 NeedsRunner tests in modules that are not required to build runners (e.g.
-`sdks/java/io/jdbc`) can be executed with the `mvn test` command:
+`sdks/java/io/google-cloud-platform`) can be executed with the `gradle test`
+command:
 
 ```
-mvn -pl sdks/java/io/jdbc test -Dgroups=org.apache.beam.sdk.testing.NeedsRunner
+$ ./gradlew sdks:java:io:google-cloud-platform:test --tests 
org.apache.beam.sdk.io.gcp.spanner.SpannerIOWriteTest
 ```
 
 ### ValidatesRunner
@@ -380,14 +374,13 @@ from the Beam examples, or custom-built pipelines, the 
framework will provide
 hooks during several pipeline lifecycle events, e.g., pipeline creation,
 pipeline success, and pipeline failure, to allow verification of pipeline 
state.
 
-The E2E testing framework is currently built to hook into the [Maven Failsafe
-Integration Test
-plugin](http://maven.apache.org/surefire/maven-failsafe-plugin/), which means 
it
-is tightly integrated with the overall build process. Once it is determined how
-Python and other future languages will integrate into the overall build/test
-system (via Maven or otherwise) we will adjust this. The framework provides a
-wrapper around actual Beam pipelines, enabling those pipelines to be run in an
-environment which facilitates verification of pipeline results and details.
+The E2E testing framework is currently built to execute the tests in [PerfKit
+Benchmarker](https://github.com/GoogleCloudPlatform/PerfKitBenchmarker),
+invoked via Gradle tasks. Once it is determined how Python and other future
+languages will integrate into the overall build/test system (via Gradle or
+otherwise) we will adjust this. The framework provides a wrapper around actual
+Beam pipelines, enabling those pipelines to be run in an environment which
+facilitates verification of pipeline results and details.
 
 Verifiers include:
 

-- 
To stop receiving notification emails like this one, please contact
mergebot-r...@apache.org.

Reply via email to