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 2020/07/14 10:02:40 UTC

[skywalking] branch zipkin updated: Make package works.

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

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


The following commit(s) were added to refs/heads/zipkin by this push:
     new e918402  Make package works.
e918402 is described below

commit e9184029bdf5a07adc593da68356417a02b713f5
Author: Wu Sheng <wu...@foxmail.com>
AuthorDate: Tue Jul 14 18:02:15 2020 +0800

    Make package works.
---
 apm-sniffer/optional-reporter-plugins/pom.xml      | 61 +-------------
 .../zipkin-reporter-plugin/pom.xml                 | 97 ++++++++++++++++++++++
 apm-sniffer/pom.xml                                |  1 +
 3 files changed, 102 insertions(+), 57 deletions(-)

diff --git a/apm-sniffer/optional-reporter-plugins/pom.xml b/apm-sniffer/optional-reporter-plugins/pom.xml
index 140eac2..e7c4df0 100644
--- a/apm-sniffer/optional-reporter-plugins/pom.xml
+++ b/apm-sniffer/optional-reporter-plugins/pom.xml
@@ -36,14 +36,13 @@
     <properties>
         <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
 
-        <agent.package.dest.dir>${project.build.directory}/../../../../skywalking-agent</agent.package.dest.dir>
-        <optional.reporter.plugins.dest.dir>${agent.package.dest.dir}/optional-reporter-plugins</optional.reporter.plugins.dest.dir>
+        <sdk.plugin.related.dir/>
+        <agent.package.dest.dir>${project.build.directory}${sdk.plugin.related.dir}/../../../../skywalking-agent
+        </agent.package.dest.dir>
+        <plugin.dest.dir>${agent.package.dest.dir}/reporter-plugins</plugin.dest.dir>
 
         <ant-contrib.version>1.0b3</ant-contrib.version>
         <ant-nodeps.version>1.8.1</ant-nodeps.version>
-
-        <kafk-clients.version>2.4.1</kafk-clients.version>
-        <spring-kafka-test.version>2.4.6.RELEASE</spring-kafka-test.version>
     </properties>
 
     <dependencies>
@@ -66,56 +65,4 @@
             <scope>test</scope>
         </dependency>
     </dependencies>
-
-    <build>
-        <plugins>
-            <plugin>
-                <artifactId>maven-antrun-plugin</artifactId>
-                <executions>
-                    <execution>
-                        <phase>package</phase>
-                        <goals>
-                            <goal>run</goal>
-                        </goals>
-                        <configuration>
-                            <tasks>
-                                <taskdef resource="net/sf/antcontrib/antcontrib.properties"
-                                         classpathref="maven.runtime.classpath"/>
-                                <if>
-                                    <equals arg1="${project.packaging}" arg2="jar"/>
-                                    <then>
-                                        <mkdir dir="${optional.reporter.plugins.dest.dir}"/>
-                                        <mkdir dir="${agent.package.dest.dir}/reporter-plugins" />
-                                        <copy
-                                            file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
-                                            tofile="${optional.reporter.plugins.dest.dir}/${project.artifactId}-${project.version}.jar"
-                                            overwrite="true"/>
-                                    </then>
-                                </if>
-                            </tasks>
-                        </configuration>
-                    </execution>
-                </executions>
-                <dependencies>
-                    <dependency>
-                        <groupId>ant-contrib</groupId>
-                        <artifactId>ant-contrib</artifactId>
-                        <version>${ant-contrib.version}</version>
-                        <exclusions>
-                            <exclusion>
-                                <groupId>ant</groupId>
-                                <artifactId>ant</artifactId>
-                            </exclusion>
-                        </exclusions>
-                    </dependency>
-                    <dependency>
-                        <groupId>org.apache.ant</groupId>
-                        <artifactId>ant-nodeps</artifactId>
-                        <version>${ant-nodeps.version}</version>
-                    </dependency>
-                </dependencies>
-            </plugin>
-        </plugins>
-    </build>
-
 </project>
\ No newline at end of file
diff --git a/apm-sniffer/optional-reporter-plugins/zipkin-reporter-plugin/pom.xml b/apm-sniffer/optional-reporter-plugins/zipkin-reporter-plugin/pom.xml
index 9ace787..25e24ff 100644
--- a/apm-sniffer/optional-reporter-plugins/zipkin-reporter-plugin/pom.xml
+++ b/apm-sniffer/optional-reporter-plugins/zipkin-reporter-plugin/pom.xml
@@ -31,11 +31,21 @@
     <groupId>org.apache.skywalking</groupId>
     <artifactId>zipkin-reporter-plugin</artifactId>
     <version>8.1.0-SNAPSHOT</version>
+    <packaging>jar</packaging>
 
     <properties>
         <zipkin.version>5.12.3</zipkin.version>
         <zipkin.okhttp3.version>2.15.0</zipkin.okhttp3.version>
         <zipkin.reporter.brave.version>2.15.0</zipkin.reporter.brave.version>
+
+        <shade.brave.source>brave</shade.brave.source>
+        <shade.brave.target>${shade.package}.${shade.brave.source}</shade.brave.target>
+        <shade.okhttp3.source>okhttp3</shade.okhttp3.source>
+        <shade.okhttp3.target>${shade.package}.${shade.okhttp3.source}</shade.okhttp3.target>
+        <shade.zipkin2.source>zipkin2</shade.zipkin2.source>
+        <shade.zipkin2.target>${shade.package}.${shade.zipkin2.source}</shade.zipkin2.target>
+        <shade.okio.source>okio</shade.okio.source>
+        <shade.okio.target>${shade.package}.${shade.okio.source}</shade.okio.target>
     </properties>
 
     <dependencies>
@@ -70,4 +80,91 @@
             <version>${zipkin.reporter.brave.version}</version>
         </dependency>
     </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <artifactId>maven-shade-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>shade</goal>
+                        </goals>
+                        <configuration>
+                            <createSourcesJar>true</createSourcesJar>
+                            <shadeSourcesContent>true</shadeSourcesContent>
+                            <relocations>
+                                <relocation>
+                                    <pattern>brave</pattern>
+                                    <shadedPattern>${shade.brave.target}</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>${shade.okhttp3.source}</pattern>
+                                    <shadedPattern>${shade.okhttp3.target}</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>${shade.zipkin2.source}</pattern>
+                                    <shadedPattern>${shade.zipkin2.target}</shadedPattern>
+                                </relocation>
+                                <relocation>
+                                    <pattern>${shade.okio.source}</pattern>
+                                    <shadedPattern>${shade.okio.target}</shadedPattern>
+                                </relocation>
+                            </relocations>
+                            <transformers>
+                                <transformer
+                                    implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
+                            </transformers>
+                        </configuration>
+                    </execution>
+                </executions>
+            </plugin>
+            <plugin>
+                <artifactId>maven-antrun-plugin</artifactId>
+                <executions>
+                    <execution>
+                        <phase>package</phase>
+                        <goals>
+                            <goal>run</goal>
+                        </goals>
+                        <configuration>
+                            <tasks>
+                                <taskdef resource="net/sf/antcontrib/antcontrib.properties"
+                                         classpathref="maven.runtime.classpath"/>
+                                <if>
+                                    <equals arg1="${project.packaging}" arg2="jar"/>
+                                    <then>
+                                        <mkdir dir="${plugin.dest.dir}"/>
+                                        <copy
+                                            file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
+                                            tofile="${plugin.dest.dir}/${project.artifactId}-${project.version}.jar"
+                                            overwrite="true"/>
+                                    </then>
+                                </if>
+                            </tasks>
+                        </configuration>
+                    </execution>
+                </executions>
+                <dependencies>
+                    <dependency>
+                        <groupId>ant-contrib</groupId>
+                        <artifactId>ant-contrib</artifactId>
+                        <version>${ant-contrib.version}</version>
+                        <exclusions>
+                            <exclusion>
+                                <groupId>ant</groupId>
+                                <artifactId>ant</artifactId>
+                            </exclusion>
+                        </exclusions>
+                    </dependency>
+                    <dependency>
+                        <groupId>org.apache.ant</groupId>
+                        <artifactId>ant-nodeps</artifactId>
+                        <version>${ant-nodeps.version}</version>
+                    </dependency>
+                </dependencies>
+            </plugin>
+        </plugins>
+    </build>
 </project>
\ No newline at end of file
diff --git a/apm-sniffer/pom.xml b/apm-sniffer/pom.xml
index ef0dc4b..64f7182 100644
--- a/apm-sniffer/pom.xml
+++ b/apm-sniffer/pom.xml
@@ -36,6 +36,7 @@
         <module>apm-test-tools</module>
         <module>bootstrap-plugins</module>
         <module>optional-plugins</module>
+        <module>optional-reporter-plugins</module>
     </modules>
 
     <properties>