pom.xml 6.6 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.
  ~
  -->

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

A
ascrutae 已提交
23
    <parent>
24
        <groupId>org.apache.skywalking</groupId>
P
pengys5 已提交
25
        <artifactId>apm-sniffer</artifactId>
wu-sheng's avatar
wu-sheng 已提交
26
        <version>6.3.0-SNAPSHOT</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>
37
        <premain.class>org.apache.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>
45
            <groupId>org.apache.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 57 58 59 60 61 62
        <plugins>
            <plugin>
                <artifactId>maven-shade-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>package</phase>
                        <goals>
                            <goal>shade</goal>
                        </goals>
                        <configuration>
63 64 65 66
                            <shadedArtifactAttached>false</shadedArtifactAttached>
                            <createDependencyReducedPom>true</createDependencyReducedPom>
                            <createSourcesJar>true</createSourcesJar>
                            <shadeSourcesContent>true</shadeSourcesContent>
A
ascrutae 已提交
67
                            <transformers>
68 69
                                <transformer
                                    implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
A
ascrutae 已提交
70
                                    <manifestEntries>
71
                                        <Premain-Class>${premain.class}</Premain-Class>
A
ascrutae 已提交
72 73 74
                                    </manifestEntries>
                                </transformer>
                            </transformers>
75 76 77 78
                            <artifactSet>
                                <excludes>
                                    <exclude>com.lmax:*</exclude>
                                    <exclude>*:gson</exclude>
A
ascrutae 已提交
79 80
                                    <exclude>io.grpc:*</exclude>
                                    <exclude>io.netty:*</exclude>
wu-sheng's avatar
wu-sheng 已提交
81
                                    <exclude>io.opencensus:*</exclude>
82
                                    <exclude>com.google.*:*</exclude>
A
ascrutae 已提交
83
                                    <exclude>com.google.guava:guava</exclude>
84 85
                                </excludes>
                            </artifactSet>
86
                            <relocations>
A
ascrutae 已提交
87 88 89 90
                                <relocation>
                                    <pattern>${shade.net.bytebuddy.source}</pattern>
                                    <shadedPattern>${shade.net.bytebuddy.target}</shadedPattern>
                                </relocation>
91
                            </relocations>
L
li.can 已提交
92 93 94 95 96 97 98 99
                            <filters>
                                <filter>
                                    <artifact>net.bytebuddy:byte-buddy</artifact>
                                    <excludes>
                                        <exclude>META-INF/versions/9/module-info.class</exclude>
                                    </excludes>
                                </filter>
                            </filters>
A
ascrutae 已提交
100 101 102 103
                        </configuration>
                    </execution>
                </executions>
            </plugin>
A
ascrutae 已提交
104 105 106 107
            <plugin>
                <artifactId>maven-antrun-plugin</artifactId>
                <executions>
                    <execution>
108 109
                        <id>clean</id>
                        <phase>clean</phase>
A
ascrutae 已提交
110 111 112 113 114
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
115
                                <delete dir="${project.basedir}/../../skywalking-agent"/>
116 117 118 119 120 121 122 123 124 125 126
                            </tasks>
                        </configuration>
                    </execution>
                    <execution>
                        <id>package</id>
                        <phase>package</phase>
                        <goals>
                            <goal>run</goal>
                        </goals>
                        <configuration>
                            <tasks>
127 128 129 130 131 132 133 134 135
                                <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"/>
                                <mkdir dir="${project.basedir}/../../skywalking-agent/bootstrapJarTmp"/>
A
ascrutae 已提交
136 137 138 139 140
                            </tasks>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
A
ascrutae 已提交
141 142
        </plugins>
    </build>
143

144

A
ascrutae 已提交
145
</project>