141 lines
5.6 KiB
XML
141 lines
5.6 KiB
XML
<?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/xsd/maven-4.0.0.xsd">
|
|
<modelVersion>4.0.0</modelVersion>
|
|
|
|
<parent>
|
|
<groupId>io.github.kazusa</groupId>
|
|
<artifactId>press-monster-test</artifactId>
|
|
<version>1.0.0-SNAPSHOT</version>
|
|
<relativePath>../pom.xml</relativePath>
|
|
</parent>
|
|
|
|
<artifactId>demo</artifactId>
|
|
<packaging>jar</packaging>
|
|
|
|
<name>Demo Application</name>
|
|
<description>Demo and sample applications for Press Monster Agent</description>
|
|
|
|
<dependencies>
|
|
<!-- Press Monster Core -->
|
|
<dependency>
|
|
<groupId>io.github.kazusa</groupId>
|
|
<artifactId>press-monster-core</artifactId>
|
|
<version>${project.version}</version>
|
|
</dependency>
|
|
|
|
<!-- Press Monster Common -->
|
|
<dependency>
|
|
<groupId>io.github.kazusa</groupId>
|
|
<artifactId>press-monster-common</artifactId>
|
|
</dependency>
|
|
|
|
<!-- ByteBuddy for Agent Development -->
|
|
<dependency>
|
|
<groupId>net.bytebuddy</groupId>
|
|
<artifactId>byte-buddy</artifactId>
|
|
<version>1.14.9</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>net.bytebuddy</groupId>
|
|
<artifactId>byte-buddy-agent</artifactId>
|
|
<version>1.14.9</version>
|
|
</dependency>
|
|
|
|
<!-- Spring Web for demo controllers -->
|
|
<dependency>
|
|
<groupId>org.springframework</groupId>
|
|
<artifactId>spring-web</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.springframework</groupId>
|
|
<artifactId>spring-webmvc</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Jackson for JSON -->
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-databind</artifactId>
|
|
</dependency>
|
|
|
|
<!-- Logging -->
|
|
<dependency>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-api</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>ch.qos.logback</groupId>
|
|
<artifactId>logback-classic</artifactId>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<!-- Maven Compiler Plugin -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.11.0</version>
|
|
<configuration>
|
|
<source>8</source>
|
|
<target>8</target>
|
|
<encoding>UTF-8</encoding>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- Maven JAR Plugin - 配置Agent的MANIFEST.MF -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
<version>3.3.0</version>
|
|
<configuration>
|
|
<archive>
|
|
<manifest>
|
|
<addClasspath>true</addClasspath>
|
|
<mainClass>io.github.kazusa.pressmonster.demo.DemoApplication</mainClass>
|
|
</manifest>
|
|
<manifestEntries>
|
|
<!-- Java Agent相关配置 -->
|
|
<Premain-Class>io.github.kazusa.pressmonster.demo.agent.SimpleAgent</Premain-Class>
|
|
<Agent-Class>io.github.kazusa.pressmonster.demo.agent.SimpleAgent</Agent-Class>
|
|
<Can-Redefine-Classes>true</Can-Redefine-Classes>
|
|
<Can-Retransform-Classes>true</Can-Retransform-Classes>
|
|
</manifestEntries>
|
|
</archive>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<!-- Maven Shade Plugin - 打包所有依赖到一个Fat JAR -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-shade-plugin</artifactId>
|
|
<version>3.4.1</version>
|
|
<executions>
|
|
<execution>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>shade</goal>
|
|
</goals>
|
|
<configuration>
|
|
<createDependencyReducedPom>false</createDependencyReducedPom>
|
|
<transformers>
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ManifestResourceTransformer">
|
|
<mainClass>io.github.kazusa.pressmonster.demo.DemoApplication</mainClass>
|
|
<manifestEntries>
|
|
<Premain-Class>io.github.kazusa.pressmonster.demo.agent.SimpleAgent</Premain-Class>
|
|
<Agent-Class>io.github.kazusa.pressmonster.demo.agent.SimpleAgent</Agent-Class>
|
|
<Can-Redefine-Classes>true</Can-Redefine-Classes>
|
|
<Can-Retransform-Classes>true</Can-Retransform-Classes>
|
|
</manifestEntries>
|
|
</transformer>
|
|
</transformers>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
|
|
</project> |