You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@skywalking.apache.org by wu...@apache.org on 2019/06/13 23:21:56 UTC

[skywalking] branch master updated: Adjust pom plugin position and add docs (#2870)

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

wusheng pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/skywalking.git


The following commit(s) were added to refs/heads/master by this push:
     new 5b6a890  Adjust pom plugin position and add docs (#2870)
5b6a890 is described below

commit 5b6a8905924280a593cb924f441eeefb7a5483e3
Author: kezhenxu94 <ke...@163.com>
AuthorDate: Fri Jun 14 07:21:47 2019 +0800

    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 893e7ad..26af85e 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 63bf347..6198fc9 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 104ae92..24ec025 100644
--- a/oap-server/pom.xml
+++ b/oap-server/pom.xml
@@ -367,27 +367,4 @@
             </dependency>
         </dependencies>
     </dependencyManagement>
-
-    <build>
-        <pluginManagement>
-            <plugins>
-                <plugin>
-                    <groupId>io.fabric8</groupId>
-                    <artifactId>docker-maven-plugin</artifactId>
-                    <version>${maven-docker-plugin.version}</version>
-                </plugin>
-            </plugins>
-        </pluginManagement>
-        <plugins>
-            <plugin>
-                <groupId>org.apache.maven.plugins</groupId>
-                <artifactId>maven-surefire-plugin</artifactId>
-                <configuration>
-                    <excludes>
-                        <exclude>IT*.class</exclude>
-                    </excludes>
-                </configuration>
-            </plugin>
-        </plugins>
-    </build>
 </project>
diff --git a/pom.xml b/pom.xml
index a6dc5a3..e7c0aef 100644
--- a/pom.xml
+++ b/pom.xml
@@ -313,6 +313,27 @@
                     <artifactId>maven-shade-plugin</artifactId>
                     <version>${maven-shade-plugin.version}</version>
                 </plugin>
+                <!--
+                    maven-surefire-plugin will exclude integration tests (ITs)
+                    and leave them for maven-failsafe-plugin to run, which is bound to the `verify` goal.
+                    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. you want to run the ITs in oap-server, run `./mvnw -Pbackend,CI-with-IT clean verify`
+                 -->
+                <plugin>
+                    <groupId>org.apache.maven.plugins</groupId>
+                    <artifactId>maven-surefire-plugin</artifactId>
+                    <configuration>
+                        <excludes>
+                            <exclude>IT*.class</exclude>
+                        </excludes>
+                    </configuration>
+                </plugin>
+                <plugin>
+                    <groupId>io.fabric8</groupId>
+                    <artifactId>docker-maven-plugin</artifactId>
+                    <version>${maven-docker-plugin.version}</version>
+                </plugin>
             </plugins>
         </pluginManagement>
         <plugins>