pom.xml 10.3 KB
Newer Older
1
<?xml version="1.0" encoding="UTF-8"?>
2
<!--
wu-sheng's avatar
wu-sheng 已提交
3 4 5 6 7 8
  ~ 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
9 10 11 12 13 14 15 16 17 18 19
  ~
  ~     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.
  ~
  -->

20
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
21 22
         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>
Z
zhangxin10 已提交
23

24
    <parent>
25
        <groupId>org.apache.skywalking</groupId>
P
pengys5 已提交
26
        <artifactId>apm-sniffer</artifactId>
27
        <version>5.0.0-alpha</version>
28 29
    </parent>

P
pengys5 已提交
30
    <artifactId>apm-sdk-plugin</artifactId>
31 32
    <modules>
        <module>dubbo-plugin</module>
33
        <module>jdbc-commons</module>
34 35 36
        <module>httpClient-4.x-plugin</module>
        <module>jedis-2.x-plugin</module>
        <module>tomcat-7.x-8.x-plugin</module>
A
ascrutae 已提交
37
        <module>motan-plugin</module>
B
baiyang 已提交
38
        <module>mongodb-3.x-plugin</module>
39 40
        <module>feign-default-http-9.x-plugin</module>
        <module>okhttp-3.x-plugin</module>
A
ascrutae 已提交
41
        <module>spring-plugins</module>
A
ascrutae 已提交
42
        <module>struts2-2.x-plugin</module>
43
        <module>nutz-plugins</module>
A
ascrutae 已提交
44
        <module>jetty-plugin</module>
IluckySi's avatar
IluckySi 已提交
45
        <module>spymemcached-2.x-plugin</module>
G
gaohongtao 已提交
46
        <module>sharding-jdbc-1.5.x-plugin</module>
IluckySi's avatar
IluckySi 已提交
47
        <module>xmemcached-2.x-plugin</module>
A
ascrutae 已提交
48
        <module>grpc-1.x-plugin</module>
A
ascrutae 已提交
49
        <module>mysql-5.x-plugin</module>
50 51
        <module>h2-1.x-plugin</module>
        <module>postgresql-8.x-plugin</module>
A
ascrutae 已提交
52
        <module>rocketMQ-4.x-plugin</module>
G
gaohongtao 已提交
53
        <module>elastic-job-2.x-plugin</module>
L
lytscu 已提交
54
        <module>mongodb-2.x-plugin</module>
55
        <module>httpasyncclient-4.x-plugin</module>
L
lytscu 已提交
56
        <module>servicecomb-java-chassis-plugin</module>
A
ascrutae 已提交
57
    </modules>
58
    <packaging>pom</packaging>
Z
zhangxin10 已提交
59

P
pengys5 已提交
60
    <name>apm-sdk-plugin</name>
61
    <url>http://maven.apache.org</url>
Z
zhangxin10 已提交
62

63 64
    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
65
        <sdk.plugin.related.dir></sdk.plugin.related.dir>
66 67
        <shade.net.bytebuddy.source>net.bytebuddy</shade.net.bytebuddy.source>
        <shade.net.bytebuddy.target>${shade.package}.${shade.net.bytebuddy.source}</shade.net.bytebuddy.target>
68
    </properties>
Z
zhangxin10 已提交
69

70 71
    <dependencies>
        <dependency>
72
            <groupId>org.apache.skywalking</groupId>
73
            <artifactId>apm-agent-core</artifactId>
74
            <version>${project.version}</version>
75 76 77
            <scope>provided</scope>
        </dependency>
        <dependency>
78
            <groupId>org.apache.skywalking</groupId>
79 80 81
            <artifactId>apm-util</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
82
        </dependency>
A
ascrutae 已提交
83
        <dependency>
84
            <groupId>org.apache.skywalking</groupId>
A
ascrutae 已提交
85 86 87 88
            <artifactId>apm-test-tools</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
89
    </dependencies>
wu-sheng's avatar
wu-sheng 已提交
90

91 92
    <build>
        <plugins>
93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130
            <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>
                            <shadedArtifactAttached>false</shadedArtifactAttached>
                            <createDependencyReducedPom>true</createDependencyReducedPom>
                            <createSourcesJar>true</createSourcesJar>
                            <shadeSourcesContent>true</shadeSourcesContent>
                            <artifactSet>
                                <excludes>
                                    <exclude>com.lmax:*</exclude>
                                    <exclude>org.apache.httpcomponents:*</exclude>
                                    <exclude>commons-logging:*</exclude>
                                    <exclude>commons-codec:*</exclude>
                                    <exclude>*:gson</exclude>
                                    <exclude>io.grpc:*</exclude>
                                    <exclude>io.netty:*</exclude>
                                    <exclude>com.google.*:*</exclude>
                                    <exclude>com.google.guava:guava</exclude>
                                </excludes>
                            </artifactSet>
                            <relocations>
                                <relocation>
                                    <pattern>${shade.net.bytebuddy.source}</pattern>
                                    <shadedPattern>${shade.net.bytebuddy.target}</shadedPattern>
                                </relocation>
                            </relocations>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146
            <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>
            <plugin>
                <!-- 源码插件 -->
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <!-- 发布时自动将源码同时发布的配置 -->
                <executions>
                    <execution>
                        <id>attach-sources</id>
147
                        <phase>none</phase>
148 149 150 151 152 153
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <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>
170 171 172 173 174 175
                                        <mkdir
                                            dir="${project.build.directory}${sdk.plugin.related.dir}/../../../../packages/skywalking-agent/plugins"/>
                                        <copy
                                            file="${project.build.directory}/${project.artifactId}-${project.version}.jar"
                                            tofile="${project.build.directory}${sdk.plugin.related.dir}/../../../../packages/skywalking-agent/plugins/${project.artifactId}-${project.version}.jar"
                                            overwrite="true"/>
176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201
                                    </then>
                                </if>

                            </tasks>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>ant-contrib</groupId>
                        <artifactId>ant-contrib</artifactId>
                        <version>1.0b3</version>
                        <exclusions>
                            <exclusion>
                                <groupId>ant</groupId>
                                <artifactId>ant</artifactId>
                            </exclusion>
                        </exclusions>
                    </dependency>
                    <dependency>
                        <groupId>org.apache.ant</groupId>
                        <artifactId>ant-nodeps</artifactId>
                        <version>1.8.1</version>
                    </dependency>
                </dependencies>
            </plugin>
202 203
        </plugins>
    </build>
204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242

    <profiles>
        <profile>
            <!-- ojdbc is not Apache license compatible, so it must be manually downloaded first -->
            <id>include-ojdbc</id>
            <activation>
                <file>
                    <exists>${basedir}/../../ci-dependencies/ojdbc14-10.2.0.4.0.jar</exists>
                </file>
            </activation>
            <modules>
                <module>oracle-10.x-plugin</module>
            </modules>
        </profile>
        <profile>
            <!-- resin-3 is not Apache license compatible, so it must be manually downloaded first -->
            <id>include-resin-3</id>
            <activation>
                <file>
                    <exists>${basedir}/../../ci-dependencies/resin-3.0.9.jar</exists>
                </file>
            </activation>
            <modules>
                <module>resin-3.x-plugin</module>
            </modules>
        </profile>
        <profile>
            <!-- resin-4 is not Apache license compatible, so it must be manually downloaded first -->
            <id>include-resin-4</id>
            <activation>
                <file>
                    <exists>${basedir}/../../ci-dependencies/resin-4.0.41.jar</exists>
                </file>
            </activation>
            <modules>
                <module>resin-4.x-plugin</module>
            </modules>
        </profile>
    </profiles>
243
</project>