pom.xml 8.2 KB
Newer Older
1
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
wu-sheng's avatar
wu-sheng 已提交
2 3
         xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
    <modelVersion>4.0.0</modelVersion>
4

wu-sheng's avatar
wu-sheng 已提交
5
    <parent>
P
pengys5 已提交
6 7
        <groupId>org.skywalking</groupId>
        <artifactId>apm-sniffer</artifactId>
wu-sheng's avatar
wu-sheng 已提交
8
        <version>3.2-2017</version>
wu-sheng's avatar
wu-sheng 已提交
9
    </parent>
wu-sheng's avatar
wu-sheng 已提交
10

11
    <artifactId>apm-agent-core</artifactId>
wu-sheng's avatar
wu-sheng 已提交
12
    <packaging>jar</packaging>
13

14
    <name>apm-agent-core</name>
wu-sheng's avatar
wu-sheng 已提交
15
    <url>http://maven.apache.org</url>
16

wu-sheng's avatar
wu-sheng 已提交
17 18
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
19
        <jetty.version>9.4.2.v20170220</jetty.version>
wu-sheng's avatar
wu-sheng 已提交
20
        <grpc.version>1.4.0</grpc.version>
21

P
pengys5 已提交
22
        <shade.package>org.skywalking.apm.dependencies</shade.package>
23 24 25 26 27 28 29
        <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>
        <shade.org.apache.source>org.apache</shade.org.apache.source>
        <shade.org.apache.target>${shade.package}.${shade.org.apache.source}</shade.org.apache.target>
A
ascrutae 已提交
30 31 32 33
        <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>
wu-sheng's avatar
wu-sheng 已提交
34
    </properties>
35

wu-sheng's avatar
wu-sheng 已提交
36 37
    <dependencies>
        <dependency>
P
pengys5 已提交
38 39
            <groupId>org.skywalking</groupId>
            <artifactId>apm-logging-api</artifactId>
40 41
            <version>${project.version}</version>
        </dependency>
wu-sheng's avatar
wu-sheng 已提交
42 43 44 45 46
        <dependency>
            <groupId>org.skywalking</groupId>
            <artifactId>apm-network</artifactId>
            <version>${project.version}</version>
        </dependency>
47 48 49 50 51
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy</artifactId>
            <version>1.5.7</version>
        </dependency>
A
ascrutae 已提交
52 53 54 55 56 57
        <dependency>
            <groupId>net.bytebuddy</groupId>
            <artifactId>byte-buddy-agent</artifactId>
            <version>1.5.7</version>
            <scope>test</scope>
        </dependency>
wu-sheng's avatar
wu-sheng 已提交
58 59 60 61 62
        <dependency>
            <groupId>com.lmax</groupId>
            <artifactId>disruptor</artifactId>
            <version>3.3.6</version>
        </dependency>
63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.5.3</version>
        </dependency>
        <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>
wu-sheng's avatar
wu-sheng 已提交
80 81
    </dependencies>
    <build>
wu-sheng's avatar
wu-sheng 已提交
82 83 84 85 86 87 88
        <extensions>
            <extension>
                <groupId>kr.motd.maven</groupId>
                <artifactId>os-maven-plugin</artifactId>
                <version>1.4.1.Final</version>
            </extension>
        </extensions>
wu-sheng's avatar
wu-sheng 已提交
89 90 91 92 93 94 95 96 97
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.4.3</version>
                <configuration>
                    <encoding>${project.build.sourceEncoding}</encoding>
                </configuration>
            </plugin>
98 99 100 101 102 103 104 105 106 107 108 109 110 111
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
                <version>2.4.1</version>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
                            <artifactSet>
                                <excludes>
                                    <exclude>net.bytebuddy:byte-buddy:jar:</exclude>
A
ascrutae 已提交
112 113 114
                                    <exclude>com.google.errorprone:error_prone_annotations:jar:</exclude>
                                    <exclude>com.google.code.findbugs:jsr305:jar:</exclude>
                                    <exclude>com.google.instrumentation:instrumentation-api:jar:</exclude>
115 116 117 118 119 120 121 122 123 124 125 126 127 128 129
                                </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>
                                <relocation>
                                    <pattern>${shade.org.apache.source}</pattern>
                                    <shadedPattern>${shade.org.apache.target}</shadedPattern>
                                </relocation>
A
ascrutae 已提交
130 131 132 133 134 135 136 137 138 139 140 141
                                <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>
                                <relocation>
                                    <pattern>${shade.io.netty.source}</pattern>
                                    <shadedPattern>${shade.io.netty.target}</shadedPattern>
                                </relocation>
142 143 144 145 146
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
A
ascrutae 已提交
147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <version>1.8</version>
                <executions>
                    <execution>
                        <id>unpack</id>
                        <phase>package</phase>
                        <configuration>
                            <target>
                                <unzip src="${project.build.directory}/${artifactId}-${version}.jar"
                                       dest="${project.build.directory}/unpacked/"/>
                                <move todir="${project.build.directory}/unpacked/META-INF/services"
                                      includeemptydirs="false">
                                    <fileset dir="${project.build.directory}/unpacked/META-INF/services">
                                        <include name="io.grpc.*"/>
                                    </fileset>
                                    <mapper type="glob" from="*" to="${shade.package}.*"/>
                                </move>
                                <jar destfile="${project.build.directory}/${artifactId}-${version}.jar"
                                     basedir="${project.build.directory}/unpacked"/>
                            </target>
                        </configuration>
                        <goals>
                            <goal>run</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>

wu-sheng's avatar
wu-sheng 已提交
177 178
        </plugins>
    </build>
179
</project>