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 2021/09/13 10:14:45 UTC

[skywalking-java] branch main updated: Add compiling doc (#23)

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

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


The following commit(s) were added to refs/heads/main by this push:
     new 9c206be  Add compiling doc (#23)
9c206be is described below

commit 9c206bea5c743f5a2db893e41eba4c99920d93bc
Author: 吴晟 Wu Sheng <wu...@foxmail.com>
AuthorDate: Mon Sep 13 18:14:36 2021 +0800

    Add compiling doc (#23)
---
 .github/PULL_REQUEST_TEMPLATE              |  2 +-
 README.md                                  |  9 --------
 docs/en/contribution/compiling.md          | 18 +++++++++++++++
 docs/en/contribution/release-java-agent.md |  4 ++--
 docs/menu.yml                              |  2 ++
 pom.xml                                    | 37 ++++++++++++++++++++++++++++++
 6 files changed, 60 insertions(+), 12 deletions(-)

diff --git a/.github/PULL_REQUEST_TEMPLATE b/.github/PULL_REQUEST_TEMPLATE
index 2552047..583367a 100644
--- a/.github/PULL_REQUEST_TEMPLATE
+++ b/.github/PULL_REQUEST_TEMPLATE
@@ -37,4 +37,4 @@
      ==== 🆕 Remove this line WHEN AND ONLY WHEN you're adding a new feature, follow the checklist 👆 ==== -->
 
 - [ ] If this pull request closes/resolves/fixes an existing issue, replace the issue number. Closes #<issue number>.
-- [ ] Update the [`CHANGES` log](https://github.com/apache/skywalking/blob/master/CHANGES.md).
+- [ ] Update the [`CHANGES` log](https://github.com/apache/skywalking-java/blob/main/CHANGES.md).
diff --git a/README.md b/README.md
index b9b361b..017bafc 100644
--- a/README.md
+++ b/README.md
@@ -20,15 +20,6 @@ SkyWalking: an APM(application performance monitor) system, especially designed
 # Downloads
 Please head to the [releases page](https://skywalking.apache.org/downloads/) to download a release of Apache SkyWalking.
 
-# Compiling project
-> ./mvnw clean package
-
-The agent binary package is generated in `skywalking-agent` folder.
-
-Set **Generated Source Codes**(`grpc-java` and `java` folders in **apm-protocol/apm-network/target/generated-sources/protobuf**) 
-folders if you are using IntelliJ IDE.
-
-
 # Code of conduct
 This project adheres to the Contributor Covenant [code of conduct](https://www.apache.org/foundation/policies/conduct). By participating, you are expected to uphold this code.
 Please follow the [REPORTING GUIDELINES](https://www.apache.org/foundation/policies/conduct#reporting-guidelines) to report unacceptable behavior.
diff --git a/docs/en/contribution/compiling.md b/docs/en/contribution/compiling.md
new file mode 100644
index 0000000..48771ec
--- /dev/null
+++ b/docs/en/contribution/compiling.md
@@ -0,0 +1,18 @@
+# Compiling project
+This document will help you compile and build a project in your maven and set your IDE.
+
+Prepare JDK 8+.
+
+* If you clone codes from https://github.com/apache/skywalking-java
+> git clone https://github.com/apache/skywalking-java.git
+> cd skywalking-java
+> ./mvnw clean package -Pall
+
+* If you download source codes tar from https://skywalking.apache.org/downloads/
+
+> ./mvnw clean package
+
+The agent binary package is generated in `skywalking-agent` folder.
+
+Set **Generated Source Codes**(`grpc-java` and `java` folders in **apm-protocol/apm-network/target/generated-sources/protobuf**)
+folders if you are using IntelliJ IDE.
\ No newline at end of file
diff --git a/docs/en/contribution/release-java-agent.md b/docs/en/contribution/release-java-agent.md
index 30291b6..2a36763 100644
--- a/docs/en/contribution/release-java-agent.md
+++ b/docs/en/contribution/release-java-agent.md
@@ -45,7 +45,7 @@ This step is only for testing purpose. If your env is correctly set, you don't n
 ## Prepare for the release
 ```
 ./mvnw release:clean
-./mvnw release:prepare -DautoVersionSubmodules=true
+./mvnw release:prepare -DautoVersionSubmodules=true -Pall
 ```
 
 - Set version number as x.y.z, and tag as **v**x.y.z (The version tag must start with **v**. You will find out why this is necessary in the next step.)
@@ -54,7 +54,7 @@ _You could do a GPG signature before preparing for the release. If you need to i
 
 ## Stage the release 
 ```
-./mvnw release:perform -DskipTests
+./mvnw release:perform -DskipTests -Pall
 ```
 
 - The release will be automatically inserted into a temporary staging repository.
diff --git a/docs/menu.yml b/docs/menu.yml
index fc32588..8cbeb69 100644
--- a/docs/menu.yml
+++ b/docs/menu.yml
@@ -80,6 +80,8 @@ catalog:
         path: "https://skyapmtest.github.io/Agent-Benchmarks/"
   - name: "Contribution"
     catalog:
+      - name: "Compiling Guidance"
+        path: "/en/contribution/compiling/"
       - name: "Java Agent Release Guidance"
         path: "/en/contribution/release-java-agent/"
   - name: "Changelog"
diff --git a/pom.xml b/pom.xml
index 811246f..d16eeb6 100755
--- a/pom.xml
+++ b/pom.xml
@@ -125,6 +125,43 @@
 
     </properties>
 
+    <profiles>
+        <profile>
+            <id>all</id>
+            <activation>
+                <activeByDefault>false</activeByDefault>
+            </activation>
+            <build>
+                <plugins>
+                    <plugin>
+                        <groupId>org.codehaus.mojo</groupId>
+                        <artifactId>exec-maven-plugin</artifactId>
+                        <version>${exec-maven-plugin.version}</version>
+                        <executions>
+                            <execution>
+                                <id>git submodule update</id>
+                                <phase>initialize</phase>
+                                <inherited>false</inherited>
+                                <configuration>
+                                    <executable>git</executable>
+                                    <arguments>
+                                        <argument>submodule</argument>
+                                        <argument>update</argument>
+                                        <argument>--init</argument>
+                                        <argument>--recursive</argument>
+                                    </arguments>
+                                </configuration>
+                                <goals>
+                                    <goal>exec</goal>
+                                </goals>
+                            </execution>
+                        </executions>
+                    </plugin>
+                </plugins>
+            </build>
+        </profile>
+    </profiles>
+
     <dependencies>
         <dependency>
             <groupId>junit</groupId>