pom.xml 5.7 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
<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">
A
ascrutae 已提交
20 21
    <modelVersion>4.0.0</modelVersion>

A
ascrutae 已提交
22
    <parent>
23
        <groupId>org.apache.skywalking</groupId>
P
pengys5 已提交
24
        <artifactId>apm-sniffer</artifactId>
25
        <version>6.0.0-alpha</version>
A
ascrutae 已提交
26 27
    </parent>

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

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

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
36
        <premain.class>org.apache.skywalking.apm.agent.SkyWalkingAgent</premain.class>
37 38
        <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 已提交
39 40 41
    </properties>

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

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

121

A
ascrutae 已提交
122
</project>