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/03/24 17:28:54 UTC

[incubator-skywalking] branch improve-compile created (now e9cf1f4)

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

wusheng pushed a change to branch improve-compile
in repository https://gitbox.apache.org/repos/asf/incubator-skywalking.git.


      at e9cf1f4  Support compile project agent, backend, UI separately.

This branch includes the following new commits:

     new e9cf1f4  Support compile project agent, backend, UI separately.

The 1 revisions listed above as "new" are entirely new to this
repository and will be described in separate emails.  The revisions
listed as "add" were already present in the repository and have only
been added to this reference.



[incubator-skywalking] 01/01: Support compile project agent, backend, UI separately.

Posted by wu...@apache.org.
This is an automated email from the ASF dual-hosted git repository.

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

commit e9cf1f4eb66d40ef25e8905ae7418244c231d0db
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Sun Mar 24 10:28:44 2019 -0700

    Support compile project agent, backend, UI separately.
---
 apm-dist/pom.xml               | 70 +++++++++++++++++++++++++++++-------------
 apm-sniffer/apm-agent/pom.xml  | 14 ++++++++-
 docs/en/guides/How-to-build.md | 12 ++++++++
 pom.xml                        | 45 ++++++++++++++++++++++++---
 4 files changed, 114 insertions(+), 27 deletions(-)

diff --git a/apm-dist/pom.xml b/apm-dist/pom.xml
index 05a0b7b..237dc40 100644
--- a/apm-dist/pom.xml
+++ b/apm-dist/pom.xml
@@ -17,7 +17,8 @@
   ~
   -->
 
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
     <parent>
         <artifactId>apm</artifactId>
         <groupId>org.apache.skywalking</groupId>
@@ -28,24 +29,47 @@
     <artifactId>apache-skywalking-apm-incubating</artifactId>
     <packaging>pom</packaging>
 
-
-    <dependencies>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>apm-agent-core</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>server-starter</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-        <dependency>
-            <groupId>org.apache.skywalking</groupId>
-            <artifactId>apm-webapp</artifactId>
-            <version>${project.version}</version>
-        </dependency>
-    </dependencies>
+    <profiles>
+        <profile>
+            <id>agent</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.skywalking</groupId>
+                    <artifactId>apm-agent</artifactId>
+                    <version>${project.version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <id>backend</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.skywalking</groupId>
+                    <artifactId>server-starter</artifactId>
+                    <version>${project.version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
+        <profile>
+            <id>ui</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <dependencies>
+                <dependency>
+                    <groupId>org.apache.skywalking</groupId>
+                    <artifactId>apm-webapp</artifactId>
+                    <version>${project.version}</version>
+                </dependency>
+            </dependencies>
+        </profile>
+    </profiles>
 
     <build>
         <finalName>apache-skywalking-apm-incubating-bin</finalName>
@@ -81,8 +105,12 @@
                         </goals>
                         <configuration>
                             <tasks>
-                                <copy file="${project.build.directory}/apache-skywalking-apm-incubating-bin.tar.gz" tofile="${project.basedir}/../dist/apache-skywalking-apm-incubating-bin.tar.gz" overwrite="true" />
-                                <copy file="${project.build.directory}/apache-skywalking-apm-incubating-bin.zip" tofile="${project.basedir}/../dist/apache-skywalking-apm-incubating-bin.zip" overwrite="true" />
+                                <copy file="${project.build.directory}/apache-skywalking-apm-incubating-bin.tar.gz"
+                                      tofile="${project.basedir}/../dist/apache-skywalking-apm-incubating-bin.tar.gz"
+                                      overwrite="true"/>
+                                <copy file="${project.build.directory}/apache-skywalking-apm-incubating-bin.zip"
+                                      tofile="${project.basedir}/../dist/apache-skywalking-apm-incubating-bin.zip"
+                                      overwrite="true"/>
                             </tasks>
                         </configuration>
                     </execution>
diff --git a/apm-sniffer/apm-agent/pom.xml b/apm-sniffer/apm-agent/pom.xml
index 963b452..a9fb4e2 100644
--- a/apm-sniffer/apm-agent/pom.xml
+++ b/apm-sniffer/apm-agent/pom.xml
@@ -98,13 +98,25 @@
                 <artifactId>maven-antrun-plugin</artifactId>
                 <executions>
                     <execution>
-                        <phase>package</phase>
+                        <id>clean</id>
+                        <phase>clean</phase>
                         <goals>
                             <goal>run</goal>
                         </goals>
                         <configuration>
                             <tasks>
                                 <delete dir="${project.basedir}/../../skywalking-agent" />
+                            </tasks>
+                        </configuration>
+                    </execution>
+                    <execution>
+                        <id>package</id>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
                                 <mkdir dir="${project.basedir}/../../skywalking-agent" />
                                 <copy file="${project.build.directory}/skywalking-agent.jar" tofile="${project.basedir}/../../skywalking-agent/skywalking-agent.jar" overwrite="true" />
                                 <mkdir dir="${project.basedir}/../../skywalking-agent/config" />
diff --git a/docs/en/guides/How-to-build.md b/docs/en/guides/How-to-build.md
index aa2aca0..f2e5688 100644
--- a/docs/en/guides/How-to-build.md
+++ b/docs/en/guides/How-to-build.md
@@ -23,6 +23,18 @@ For each official Apache release, there is a complete and independent source cod
 1. Run `./mvnw clean package -DskipTests`
 1. All packages are in `/dist`.(.tar.gz for Linux and .zip for Windows).
 
+### Advanced compile
+SkyWalking is a complex maven project, including many modules, which could cause long compiling time. 
+If you just want to recompile part of the project, you have following options
+- Compile agent and package
+>  ./mvnw package -Pagent,dist
+- Compile backend and package
+>  ./mvnw package -Pbackend,dist
+- Compile UI and package
+>  ./mvnw package -Pui,dist
+
+
+
 ## Setup your IntelliJ IDEA
 1. Import the project as a maven project
 1. Run `./mvnw compile -Dmaven.test.skip=true` to compile project and generate source codes. Because we use gRPC and protobuf.
diff --git a/pom.xml b/pom.xml
index 1527fec..cf483b0 100644
--- a/pom.xml
+++ b/pom.xml
@@ -32,13 +32,8 @@
     </parent>
 
     <modules>
-        <module>oap-server</module>
         <module>apm-commons</module>
-        <module>apm-sniffer</module>
-        <module>apm-application-toolkit</module>
         <module>apm-protocol</module>
-        <module>apm-webapp</module>
-        <module>apm-dist</module>
         <module>apm-checkstyle</module>
     </modules>
     <packaging>pom</packaging>
@@ -80,6 +75,46 @@
         </mailingList>
     </mailingLists>
 
+    <profiles>
+        <profile>
+            <id>agent</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <modules>
+                <module>apm-sniffer</module>
+                <module>apm-application-toolkit</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>backend</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <modules>
+                <module>oap-server</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>ui</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <modules>
+                <module>apm-webapp</module>
+            </modules>
+        </profile>
+        <profile>
+            <id>dist</id>
+            <activation>
+                <activeByDefault>true</activeByDefault>
+            </activation>
+            <modules>
+                <module>apm-dist</module>
+            </modules>
+        </profile>
+    </profiles>
+
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
         <compiler.version>1.8</compiler.version>