pom.xml 12.9 KB
Newer Older
1
<!--
wu-sheng's avatar
wu-sheng 已提交
2 3 4 5 6 7
  ~ Licensed to the Apache Software Foundation (ASF) under one or more
  ~ contributor license agreements.  See the NOTICE file distributed with
  ~ this work for additional information regarding copyright ownership.
  ~ The ASF licenses this file to You under the Apache License, Version 2.0
  ~ (the "License"); you may not use this file except in compliance with
  ~ the License.  You may obtain a copy of the License at
8 9 10 11 12 13 14 15 16 17 18
  ~
  ~     http://www.apache.org/licenses/LICENSE-2.0
  ~
  ~ Unless required by applicable law or agreed to in writing, software
  ~ distributed under the License is distributed on an "AS IS" BASIS,
  ~ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
  ~ See the License for the specific language governing permissions and
  ~ limitations under the License.
  ~
  -->

wu-sheng's avatar
wu-sheng 已提交
19 20
<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">
wu-sheng's avatar
wu-sheng 已提交
21
    <modelVersion>4.0.0</modelVersion>
22

wu-sheng's avatar
wu-sheng 已提交
23
    <parent>
24
        <groupId>org.apache.skywalking</groupId>
P
pengys5 已提交
25
        <artifactId>apm-sniffer</artifactId>
P
peng-yongsheng 已提交
26
        <version>6.0.0-alpha-SNAPSHOT</version>
wu-sheng's avatar
wu-sheng 已提交
27
    </parent>
wu-sheng's avatar
wu-sheng 已提交
28

29
    <artifactId>apm-agent-core</artifactId>
wu-sheng's avatar
wu-sheng 已提交
30
    <packaging>jar</packaging>
31

32
    <name>apm-agent-core</name>
wu-sheng's avatar
wu-sheng 已提交
33
    <url>http://maven.apache.org</url>
34

wu-sheng's avatar
wu-sheng 已提交
35 36
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
37
        <jetty.version>9.4.2.v20170220</jetty.version>
D
dylan 已提交
38 39
        <grpc.version>1.14.0</grpc.version>
        <guava.version>20.0</guava.version>
40
        <bytebuddy.version>1.9.2</bytebuddy.version>
41 42
        <disruptor.version>3.3.6</disruptor.version>
        <wiremock.version>2.6.0</wiremock.version>
wu-sheng's avatar
wu-sheng 已提交
43
        <netty-tcnative-boringssl-static.version>2.0.7.Final</netty-tcnative-boringssl-static.version>
44
        <os-maven-plugin.version>1.4.1.Final</os-maven-plugin.version>
45
        <shade.package>org.apache.skywalking.apm.dependencies</shade.package>
46 47 48 49 50
        <shade.com.lmax.disruptor.source>com.lmax.disruptor</shade.com.lmax.disruptor.source>
        <shade.com.lmax.disruptor.target>${shade.package}.${shade.com.lmax.disruptor.source}
        </shade.com.lmax.disruptor.target>
        <shade.com.google.source>com.google</shade.com.google.source>
        <shade.com.google.target>${shade.package}.${shade.com.google.source}</shade.com.google.target>
A
ascrutae 已提交
51 52 53 54
        <shade.io.grpc.source>io.grpc</shade.io.grpc.source>
        <shade.io.grpc.target>${shade.package}.${shade.io.grpc.source}</shade.io.grpc.target>
        <shade.io.netty.source>io.netty</shade.io.netty.source>
        <shade.io.netty.target>${shade.package}.${shade.io.netty.source}</shade.io.netty.target>
55 56
        <shade.io.opencensus.source>io.opencensus</shade.io.opencensus.source>
        <shade.io.opencensus.target>${shade.package}.${shade.io.opencensus.source}</shade.io.opencensus.target>
57 58 59
        <shade.org.apache.http.source>org.apache.http</shade.org.apache.http.source>
        <shade.org.apache.http.target>${shade.package}.${shade.org.apache.http.source}</shade.org.apache.http.target>
        <shade.org.apache.commons.source>org.apache.commons</shade.org.apache.commons.source>
wu-sheng's avatar
wu-sheng 已提交
60 61
        <shade.org.apache.commons.target>${shade.package}.${shade.org.apache.http.source}
        </shade.org.apache.commons.target>
wu-sheng's avatar
wu-sheng 已提交
62
    </properties>
63

wu-sheng's avatar
wu-sheng 已提交
64
    <dependencies>
wu-sheng's avatar
wu-sheng 已提交
65
        <dependency>
66
            <groupId>org.apache.skywalking</groupId>
wu-sheng's avatar
wu-sheng 已提交
67 68 69
            <artifactId>apm-network</artifactId>
            <version>${project.version}</version>
        </dependency>
70
        <dependency>
71
            <groupId>org.apache.skywalking</groupId>
72 73 74
            <artifactId>apm-util</artifactId>
            <version>${project.version}</version>
        </dependency>
75 76 77
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
78
            <version>${bytebuddy.version}</version>
79
        </dependency>
wu-sheng's avatar
wu-sheng 已提交
80 81 82
        <dependency>
            <groupId>com.lmax</groupId>
            <artifactId>disruptor</artifactId>
83 84 85
            <version>${disruptor.version}</version>
        </dependency>
        <dependency>
wu-sheng's avatar
wu-sheng 已提交
86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109
            <groupId>io.grpc</groupId>
            <artifactId>grpc-netty</artifactId>
            <version>${grpc.version}</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-protobuf</artifactId>
            <version>${grpc.version}</version>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-stub</artifactId>
            <version>${grpc.version}</version>
        </dependency>
        <dependency>
            <groupId>io.netty</groupId>
            <artifactId>netty-tcnative-boringssl-static</artifactId>
            <version>${netty-tcnative-boringssl-static.version}</version>
        </dependency>
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy-agent</artifactId>
            <version>${bytebuddy.version}</version>
            <scope>test</scope>
wu-sheng's avatar
wu-sheng 已提交
110
        </dependency>
111 112 113 114 115 116 117 118 119 120 121 122
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-server</artifactId>
            <version>${jetty.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.eclipse.jetty</groupId>
            <artifactId>jetty-servlet</artifactId>
            <version>${jetty.version}</version>
            <scope>test</scope>
        </dependency>
A
ascrutae 已提交
123 124 125
        <dependency>
            <groupId>com.github.tomakehurst</groupId>
            <artifactId>wiremock</artifactId>
126
            <version>${wiremock.version}</version>
A
ascrutae 已提交
127 128 129 130 131
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.grpc</groupId>
            <artifactId>grpc-testing</artifactId>
132
            <version>${grpc.version}</version>
A
ascrutae 已提交
133 134 135 136 137 138 139 140
            <exclusions>
                <exclusion>
                    <artifactId>mockito-core</artifactId>
                    <groupId>org.mockito</groupId>
                </exclusion>
            </exclusions>
            <scope>test</scope>
        </dependency>
A
ascrutae 已提交
141
        <dependency>
142
            <groupId>org.apache.skywalking</groupId>
A
ascrutae 已提交
143 144 145
            <artifactId>apm-datacarrier</artifactId>
            <version>${project.version}</version>
        </dependency>
wu-sheng's avatar
wu-sheng 已提交
146
    </dependencies>
D
dylan 已提交
147
    <dependencyManagement>
wu-sheng's avatar
wu-sheng 已提交
148 149 150 151 152 153 154
        <dependencies>
            <dependency>
                <groupId>com.google.guava</groupId>
                <artifactId>guava</artifactId>
                <version>${guava.version}</version>
            </dependency>
        </dependencies>
D
dylan 已提交
155
    </dependencyManagement>
wu-sheng's avatar
wu-sheng 已提交
156
    <build>
wu-sheng's avatar
wu-sheng 已提交
157 158 159 160
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
161
                <version>${os-maven-plugin.version}</version>
wu-sheng's avatar
wu-sheng 已提交
162 163
            </extension>
        </extensions>
wu-sheng's avatar
wu-sheng 已提交
164 165
        <plugins>
            <plugin>
166 167 168 169 170 171 172 173 174 175 176
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <excludes>
                                    <exclude>net.bytebuddy:byte-buddy:jar:</exclude>
A
ascrutae 已提交
177 178
                                    <exclude>com.google.errorprone:error_prone_annotations:jar:</exclude>
                                    <exclude>com.google.code.findbugs:jsr305:jar:</exclude>
179 180 181 182 183 184 185 186 187 188 189
                                </excludes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <pattern>${shade.com.lmax.disruptor.source}</pattern>
                                    <shadedPattern>${shade.com.lmax.disruptor.target}</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>${shade.com.google.source}</pattern>
                                    <shadedPattern>${shade.com.google.target}</shadedPattern>
                                </relocation>
A
ascrutae 已提交
190 191 192 193 194 195 196 197
                                <relocation>
                                    <pattern>${shade.io.grpc.source}</pattern>
                                    <shadedPattern>${shade.io.grpc.target}</shadedPattern>
                                </relocation>
                                <relocation>
                                    <pattern>${shade.io.netty.source}</pattern>
                                    <shadedPattern>${shade.io.netty.target}</shadedPattern>
                                </relocation>
198 199 200 201
                                <relocation>
                                    <pattern>${shade.io.opencensus.source}</pattern>
                                    <shadedPattern>${shade.io.opencensus.target}</shadedPattern>
                                </relocation>
202 203 204 205
                                <relocation>
                                    <pattern>${shade.org.apache.commons.source}</pattern>
                                    <shadedPattern>${shade.org.apache.commons.target}</shadedPattern>
                                </relocation>
206
                            </relocations>
207 208 209 210
                            <filters>
                                <filter>
                                    <artifact>com.google.protobuf:protobuf-java</artifact>
                                    <excludes>
A
ascrutae 已提交
211 212
                                        <exclude>google/protobuf/*.proto</exclude>
                                        <exclude>google/protobuf/compiler/*.proto</exclude>
213 214 215
                                    </excludes>
                                </filter>
                            </filters>
216
                            <transformers>
wu-sheng's avatar
wu-sheng 已提交
217 218
                                <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
219
                            </transformers>
220 221 222 223
                        </configuration>
                    </execution>
                </executions>
            </plugin>
wu-sheng's avatar
wu-sheng 已提交
224 225 226 227 228 229 230 231 232 233
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
wu-sheng's avatar
wu-sheng 已提交
234
                                <delete dir="${project.basedir}/../../packages"/>
wu-sheng's avatar
wu-sheng 已提交
235 236 237
                            </tasks>
                        </configuration>
                    </execution>
238 239 240 241 242
                    <execution>
                        <id>unpack</id>
                        <phase>package</phase>
                        <configuration>
                            <target>
wu-sheng's avatar
wu-sheng 已提交
243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258
                                <echo message="unjar"/>
                                <unzip src="${project.build.directory}/${artifactId}-${version}.jar"
                                       dest="${project.build.directory}/unpacked/"/>
                                <echo message="rename service providers in META-INF/services"/>
                                <move
                                    file="${project.build.directory}/unpacked/META-INF/native/libnetty_tcnative_osx_x86_64.jnilib"
                                    tofile="${project.build.directory}/unpacked/META-INF/native/liborg_apache_skywalking_apm_dependencies_netty_tcnative_osx_x86_64.jnilib"/>
                                <move
                                    file="${project.build.directory}/unpacked/META-INF/native/libnetty_tcnative_linux_x86_64.so"
                                    tofile="${project.build.directory}/unpacked/META-INF/native/liborg_apache_skywalking_apm_dependencies_netty_tcnative_linux_x86_64.so"/>
                                <move
                                    file="${project.build.directory}/unpacked/META-INF/native/netty_tcnative_windows_x86_64.dll"
                                    tofile="${project.build.directory}/unpacked/META-INF/native/org_apache_skywalking_apm_dependencies_netty_tcnative_windows_x86_64.dll"/>
                                <echo message="jar back"/>
                                <jar destfile="${project.build.directory}/${artifactId}-${version}.jar"
                                     basedir="${project.build.directory}/unpacked"/>
259 260 261 262 263 264
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
wu-sheng's avatar
wu-sheng 已提交
265 266
                </executions>
            </plugin>
wu-sheng's avatar
wu-sheng 已提交
267 268
        </plugins>
    </build>
269
</project>