未验证 提交 7420d256 编写于 作者: wu-sheng's avatar wu-sheng 提交者: GitHub

Support compile project agent, backend, UI separately. (#2399)

上级 191740fc
...@@ -17,7 +17,8 @@ ...@@ -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> <parent>
<artifactId>apm</artifactId> <artifactId>apm</artifactId>
<groupId>org.apache.skywalking</groupId> <groupId>org.apache.skywalking</groupId>
...@@ -28,24 +29,47 @@ ...@@ -28,24 +29,47 @@
<artifactId>apache-skywalking-apm-incubating</artifactId> <artifactId>apache-skywalking-apm-incubating</artifactId>
<packaging>pom</packaging> <packaging>pom</packaging>
<profiles>
<dependencies> <profile>
<dependency> <id>agent</id>
<groupId>org.apache.skywalking</groupId> <activation>
<artifactId>apm-agent-core</artifactId> <activeByDefault>true</activeByDefault>
<version>${project.version}</version> </activation>
</dependency> <dependencies>
<dependency> <dependency>
<groupId>org.apache.skywalking</groupId> <groupId>org.apache.skywalking</groupId>
<artifactId>server-starter</artifactId> <artifactId>apm-agent</artifactId>
<version>${project.version}</version> <version>${project.version}</version>
</dependency> </dependency>
<dependency> </dependencies>
<groupId>org.apache.skywalking</groupId> </profile>
<artifactId>apm-webapp</artifactId> <profile>
<version>${project.version}</version> <id>backend</id>
</dependency> <activation>
</dependencies> <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> <build>
<finalName>apache-skywalking-apm-incubating-bin</finalName> <finalName>apache-skywalking-apm-incubating-bin</finalName>
...@@ -81,8 +105,12 @@ ...@@ -81,8 +105,12 @@
</goals> </goals>
<configuration> <configuration>
<tasks> <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.tar.gz"
<copy file="${project.build.directory}/apache-skywalking-apm-incubating-bin.zip" tofile="${project.basedir}/../dist/apache-skywalking-apm-incubating-bin.zip" overwrite="true" /> 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> </tasks>
</configuration> </configuration>
</execution> </execution>
......
...@@ -106,13 +106,25 @@ ...@@ -106,13 +106,25 @@
<artifactId>maven-antrun-plugin</artifactId> <artifactId>maven-antrun-plugin</artifactId>
<executions> <executions>
<execution> <execution>
<phase>package</phase> <id>clean</id>
<phase>clean</phase>
<goals> <goals>
<goal>run</goal> <goal>run</goal>
</goals> </goals>
<configuration> <configuration>
<tasks> <tasks>
<delete dir="${project.basedir}/../../skywalking-agent" /> <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" /> <mkdir dir="${project.basedir}/../../skywalking-agent" />
<copy file="${project.build.directory}/skywalking-agent.jar" tofile="${project.basedir}/../../skywalking-agent/skywalking-agent.jar" overwrite="true" /> <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" /> <mkdir dir="${project.basedir}/../../skywalking-agent/config" />
......
...@@ -23,6 +23,18 @@ For each official Apache release, there is a complete and independent source cod ...@@ -23,6 +23,18 @@ For each official Apache release, there is a complete and independent source cod
1. Run `./mvnw clean package -DskipTests` 1. Run `./mvnw clean package -DskipTests`
1. All packages are in `/dist`.(.tar.gz for Linux and .zip for Windows). 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 ## Setup your IntelliJ IDEA
1. Import the project as a maven project 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. 1. Run `./mvnw compile -Dmaven.test.skip=true` to compile project and generate source codes. Because we use gRPC and protobuf.
......
...@@ -32,13 +32,8 @@ ...@@ -32,13 +32,8 @@
</parent> </parent>
<modules> <modules>
<module>oap-server</module>
<module>apm-commons</module> <module>apm-commons</module>
<module>apm-sniffer</module>
<module>apm-application-toolkit</module>
<module>apm-protocol</module> <module>apm-protocol</module>
<module>apm-webapp</module>
<module>apm-dist</module>
<module>apm-checkstyle</module> <module>apm-checkstyle</module>
</modules> </modules>
<packaging>pom</packaging> <packaging>pom</packaging>
...@@ -80,6 +75,46 @@ ...@@ -80,6 +75,46 @@
</mailingList> </mailingList>
</mailingLists> </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> <properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<compiler.version>1.8</compiler.version> <compiler.version>1.8</compiler.version>
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册