From 5b6a8905924280a593cb924f441eeefb7a5483e3 Mon Sep 17 00:00:00 2001 From: kezhenxu94 Date: Fri, 14 Jun 2019 07:21:47 +0800 Subject: [PATCH] Adjust pom plugin position and add docs (#2870) * Adjust pom plugin position and add docs * Polishing * Update as requested --- docs/en/guides/How-to-build.md | 2 +- docs/en/guides/README.md | 21 +++++++++++++++++++-- oap-server/pom.xml | 23 ----------------------- pom.xml | 21 +++++++++++++++++++++ 4 files changed, 41 insertions(+), 26 deletions(-) diff --git a/docs/en/guides/How-to-build.md b/docs/en/guides/How-to-build.md index 893e7ad76f..26af85ef1d 100644 --- a/docs/en/guides/How-to-build.md +++ b/docs/en/guides/How-to-build.md @@ -142,5 +142,5 @@ a oap image with name `bar/oap:foo`, run the following command ``` 5. Run `./mvnw compile -Dmaven.test.skip=true` 6. Run `maven update`. Must remove the clean projects item before maven update(This will be clear the proto conversion Java file generated by the complie) -7. Run `./mvnw compile` complie collector-remote-grpc-provider and apm-protocol +7. Run `./mvnw compile` compile collector-remote-grpc-provider and apm-protocol 8. Refresh project diff --git a/docs/en/guides/README.md b/docs/en/guides/README.md index 63bf3477a1..6198fc987e 100644 --- a/docs/en/guides/README.md +++ b/docs/en/guides/README.md @@ -24,7 +24,24 @@ All the following channels are open to the community, you could choose the way y * QQ Group: 392443393 ## For code developer -As a develop, first step, read [Compiling Guide](How-to-build.md). It teaches developer how to build the project in local. +For developers, first step, read [Compiling Guide](How-to-build.md). It teaches developer how to build the project in local and set up the environment. + +After setting up the environment and writing your codes, in order to make it more easily accepted by SkyWalking project, you'll +need to run the tests locally to verify that your codes don't break any existed features, +and write some unit test (UT) codes to verify that the new codes work well, preventing them being broke by future contributors. +If the new codes involve other components or libraries, you're also supposed to write integration tests (IT). + +SkyWalking leverages plugin `maven-surefire-plugin` to run the UTs while using `maven-failsafe-plugin` +to run the ITs, `maven-surefire-plugin` will exclude ITs (whose class name starts with `IT`) +and leave them for `maven-failsafe-plugin` to run, which is bound to the `verify` goal, `CI-with-IT` profile. +Therefore, to run the UTs, try `./mvnw clean test`, this will only run the UTs, not including ITs. + +If you want to run the ITs please activate the `CI-with-IT` profile +as well as the the profiles of the modules whose ITs you want to run. +e.g. if you want to run the ITs in `oap-server`, try `./mvnw -Pbackend,CI-with-IT clean verify`, +and if you'd like to run all the ITs, simple run `./mvnw -Pall,CI-with-IT clean verify`. + +Please be advised that if you're writing integration tests, name it with the pattern `IT*` to make them only run in `CI-with-IT` profile. ### Project Extensions SkyWalking project supports many ways to extend existing features. If you are interesting in these ways, @@ -58,4 +75,4 @@ in SkyWalking release, after 6.0.0-GA. ## For release [Apache Release Guide](How-to-release.md) introduces to the committer team about doing official Apache version release, to avoid breaking any Apache rule. Apache license allows everyone to redistribute if you keep our licenses and NOTICE -in your redistribution. \ No newline at end of file +in your redistribution. diff --git a/oap-server/pom.xml b/oap-server/pom.xml index 104ae92db1..24ec025ae5 100644 --- a/oap-server/pom.xml +++ b/oap-server/pom.xml @@ -367,27 +367,4 @@ - - - - - - io.fabric8 - docker-maven-plugin - ${maven-docker-plugin.version} - - - - - - org.apache.maven.plugins - maven-surefire-plugin - - - IT*.class - - - - - diff --git a/pom.xml b/pom.xml index a6dc5a38b5..e7c0aef996 100644 --- a/pom.xml +++ b/pom.xml @@ -313,6 +313,27 @@ maven-shade-plugin ${maven-shade-plugin.version} + + + org.apache.maven.plugins + maven-surefire-plugin + + + IT*.class + + + + + io.fabric8 + docker-maven-plugin + ${maven-docker-plugin.version} + -- GitLab