pom.xml 6.1 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18
<!--
  ~ Copyright 2017, OpenSkywalking Organization All rights reserved.
  ~
  ~ Licensed 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
  ~
  ~     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.
  ~
  ~ Project repository: https://github.com/OpenSkywalking/skywalking
  -->

A
ascrutae 已提交
19 20 21 22
<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">
    <modelVersion>4.0.0</modelVersion>

A
ascrutae 已提交
23
    <parent>
P
pengys5 已提交
24 25
        <groupId>org.skywalking</groupId>
        <artifactId>apm-sniffer</artifactId>
26
        <version>3.2.6-2017</version>
A
ascrutae 已提交
27 28
    </parent>

P
pengys5 已提交
29
    <artifactId>apm-agent</artifactId>
A
ascrutae 已提交
30 31
    <packaging>jar</packaging>

P
pengys5 已提交
32
    <name>apm-agent</name>
A
ascrutae 已提交
33 34 35 36
    <url>http://maven.apache.org</url>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
P
pengys5 已提交
37
        <premain.class>org.skywalking.apm.agent.SkyWalkingAgent</premain.class>
38 39
        <shade.net.bytebuddy.source>net.bytebuddy</shade.net.bytebuddy.source>
        <shade.net.bytebuddy.target>${shade.package}.${shade.net.bytebuddy.source}</shade.net.bytebuddy.target>
A
ascrutae 已提交
40 41 42
    </properties>

    <dependencies>
43
        <!-- plugin -->
A
ascrutae 已提交
44
        <dependency>
P
pengys5 已提交
45
            <groupId>org.skywalking</groupId>
wu-sheng's avatar
wu-sheng 已提交
46
            <artifactId>apm-agent-core</artifactId>
A
ascrutae 已提交
47 48 49
            <version>${project.version}</version>
        </dependency>

A
ascrutae 已提交
50 51
    </dependencies>
    <build>
wu-sheng's avatar
wu-sheng 已提交
52
        <finalName>skywalking-agent</finalName>
A
ascrutae 已提交
53 54 55 56
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-shade-plugin</artifactId>
57
                <version>2.4.1</version>
A
ascrutae 已提交
58 59 60 61 62 63 64
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
65 66 67 68
                            <shadedArtifactAttached>false</shadedArtifactAttached>
                            <createDependencyReducedPom>true</createDependencyReducedPom>
                            <createSourcesJar>true</createSourcesJar>
                            <shadeSourcesContent>true</shadeSourcesContent>
A
ascrutae 已提交
69
                            <transformers>
70
                                <transformer
A
ascrutae 已提交
71
                                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
A
ascrutae 已提交
72
                                    <manifestEntries>
73
                                        <Premain-Class>${premain.class}</Premain-Class>
A
ascrutae 已提交
74 75 76
                                    </manifestEntries>
                                </transformer>
                            </transformers>
77 78 79 80 81 82 83
                            <artifactSet>
                                <excludes>
                                    <exclude>com.lmax:*</exclude>
                                    <exclude>org.apache.httpcomponents:*</exclude>
                                    <exclude>commons-logging:*</exclude>
                                    <exclude>commons-codec:*</exclude>
                                    <exclude>*:gson</exclude>
A
ascrutae 已提交
84 85
                                    <exclude>io.grpc:*</exclude>
                                    <exclude>io.netty:*</exclude>
86
                                    <exclude>com.google.*:*</exclude>
A
ascrutae 已提交
87
                                    <exclude>com.google.guava:guava</exclude>
88 89
                                </excludes>
                            </artifactSet>
90
                            <relocations>
A
ascrutae 已提交
91 92 93 94
                                <relocation>
                                    <pattern>${shade.net.bytebuddy.source}</pattern>
                                    <shadedPattern>${shade.net.bytebuddy.target}</shadedPattern>
                                </relocation>
95
                            </relocations>
A
ascrutae 已提交
96 97 98 99
                        </configuration>
                    </execution>
                </executions>
            </plugin>
A
ascrutae 已提交
100 101 102 103 104 105 106 107 108 109 110
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
wu-sheng's avatar
wu-sheng 已提交
111
                                <mkdir dir="${project.basedir}/../../packages/skywalking-agent"/>
A
ascrutae 已提交
112
                                <copy file="${project.build.directory}/skywalking-agent.jar"
wu-sheng's avatar
wu-sheng 已提交
113
                                      tofile="${project.basedir}/../../packages/skywalking-agent/skywalking-agent.jar" overwrite="true"/>
wu-sheng's avatar
wu-sheng 已提交
114
                                <mkdir dir="${project.basedir}/../../packages/skywalking-agent/config"/>
wu-sheng's avatar
wu-sheng 已提交
115
                                <mkdir dir="${project.basedir}/../../packages/skywalking-agent/logs"/>
wu-sheng's avatar
wu-sheng 已提交
116 117
                                <copydir src="${project.basedir}/../config"
                                         dest="${project.basedir}/../../packages/skywalking-agent/config" forceoverwrite="true"/>
A
ascrutae 已提交
118 119 120 121 122
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
A
ascrutae 已提交
123 124
        </plugins>
    </build>
125 126 127 128 129

    <distributionManagement>
        <repository>
            <id>bintray-wu-sheng-sky-walking-repository</id>
            <name>wu-sheng-sky-walking-repository</name>
P
pengys5 已提交
130
            <url>https://api.bintray.com/maven/wu-sheng/skywalking/org.skywalking.apm-agent/;publish=1</url>
131 132
        </repository>
    </distributionManagement>
A
ascrutae 已提交
133
</project>