Skip to content

Commit

Permalink
Adjust pom plugin position and add docs (apache#2870)
Browse files Browse the repository at this point in the history
* Adjust pom plugin position and add docs

* Polishing

* Update as requested
  • Loading branch information
kezhenxu94 authored and wu-sheng committed Jun 13, 2019
1 parent bc0c25a commit 5b6a890
Show file tree
Hide file tree
Showing 4 changed files with 41 additions and 26 deletions.
2 changes: 1 addition & 1 deletion docs/en/guides/How-to-build.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
21 changes: 19 additions & 2 deletions docs/en/guides/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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,
Expand Down Expand Up @@ -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.
in your redistribution.
23 changes: 0 additions & 23 deletions oap-server/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
21 changes: 21 additions & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -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>
Expand Down

0 comments on commit 5b6a890

Please sign in to comment.