<?xml version="1.0" encoding="UTF-8"?>
<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/maven-v4_0_0.xsd">
  <parent>
    <artifactId>joylive-bootstrap</artifactId>
    <groupId>com.jd.live</groupId>
    <version>1.3.2</version>
  </parent>
  <modelVersion>4.0.0</modelVersion>
  <groupId>com.jd.live</groupId>
  <artifactId>joylive-bootstrap-premain</artifactId>
  <version>1.3.2</version>
  <licenses>
    <license>
      <name>Apache License, Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <build>
    <finalName>${final.name}</finalName>
    <plugins>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifestEntries>
              <Premain-Class>com.jd.live.agent.bootstrap.LiveAgent</Premain-Class>
              <Agent-Class>com.jd.live.agent.bootstrap.LiveAgent</Agent-Class>
              <Can-Redefine-Classes>true</Can-Redefine-Classes>
              <Can-Retransform-Classes>true</Can-Retransform-Classes>
              <Pinpoint-Version>${project.version}</Pinpoint-Version>
              <Boot-Class-Path>${project.build.finalName}.jar</Boot-Class-Path>
            </manifestEntries>
            <manifest>
              <addClasspath>true</addClasspath>
              <classpathPrefix>lib/</classpathPrefix>
              <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
              <mainClass>com.jd.live.agent.bootstrap.AgentLoader</mainClass>
            </manifest>
          </archive>
        </configuration>
      </plugin>
      <plugin>
        <artifactId>maven-shade-plugin</artifactId>
        <executions>
          <execution>
            <configuration>
              <artifactSet>
                <includes>
                  <include>com.beust:jcommander</include>
                </includes>
              </artifactSet>
              <transformers>
                <transformer />
                <transformer />
                <transformer />
                <transformer>
                  <addHeader>false</addHeader>
                </transformer>
              </transformers>
              <relocations>
                <relocation>
                  <pattern>com.beust</pattern>
                  <shadedPattern>com.jd.live.agent.shaded.com.beust</shadedPattern>
                </relocation>
              </relocations>
            </configuration>
          </execution>
        </executions>
      </plugin>
    </plugins>
  </build>
  <profiles>
    <profile>
      <id>jdk8</id>
      <dependencies>
        <dependency>
          <groupId>jdk.tools</groupId>
          <artifactId>jdk.tools</artifactId>
          <version>1.8</version>
          <scope>system</scope>
          <systemPath>${java.home}/../lib/tools.jar</systemPath>
        </dependency>
      </dependencies>
    </profile>
  </profiles>
  <dependencies>
    <dependency>
      <groupId>com.jd.live</groupId>
      <artifactId>joylive-bootstrap-api</artifactId>
      <version>1.3.2</version>
      <scope>compile</scope>
    </dependency>
  </dependencies>
  <properties>
    <jcommander.version>1.82</jcommander.version>
    <final.name>live</final.name>
  </properties>
</project>
