184 lines
7.2 KiB
XML
184 lines
7.2 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>
|
|
<artifactId>mica-mqtt-example</artifactId>
|
|
<name>${project.artifactId}</name>
|
|
|
|
<parent>
|
|
<groupId>org.dromara.mica-mqtt</groupId>
|
|
<artifactId>example</artifactId>
|
|
<version>${revision}</version>
|
|
</parent>
|
|
|
|
<properties>
|
|
<graalvm.version>25.0.1</graalvm.version>
|
|
<mainClass.server>org.dromara.mica.mqtt.server.MqttServerTest</mainClass.server>
|
|
<mainClass.client>org.dromara.mica.mqtt.client.MqttClientTest</mainClass.client>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<dependency>
|
|
<groupId>org.dromara.mica-mqtt</groupId>
|
|
<artifactId>mica-mqtt-client</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.dromara.mica-mqtt</groupId>
|
|
<artifactId>mica-mqtt-server</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>com.google.code.gson</groupId>
|
|
<artifactId>gson</artifactId>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<finalName>${project.artifactId}</finalName>
|
|
</build>
|
|
|
|
<profiles>
|
|
<profile>
|
|
<id>jar</id>
|
|
<activation>
|
|
<activeByDefault>true</activeByDefault>
|
|
</activation>
|
|
<dependencies>
|
|
<!-- 非 GraalVM 环境用 tinylog -->
|
|
<dependency>
|
|
<groupId>org.tinylog</groupId>
|
|
<artifactId>slf4j-tinylog</artifactId>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.tinylog</groupId>
|
|
<artifactId>tinylog-impl</artifactId>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-jar-plugin</artifactId>
|
|
</plugin>
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-assembly-plugin</artifactId>
|
|
<version>3.8.0</version>
|
|
<configuration>
|
|
<archive>
|
|
<manifest>
|
|
<mainClass>${mainClass.server}</mainClass>
|
|
</manifest>
|
|
</archive>
|
|
<descriptorRefs>
|
|
<descriptorRef>jar-with-dependencies</descriptorRef>
|
|
</descriptorRefs>
|
|
<appendAssemblyId>false</appendAssemblyId>
|
|
</configuration>
|
|
<executions>
|
|
<execution>
|
|
<id>make-assembly</id>
|
|
<phase>package</phase>
|
|
<goals>
|
|
<goal>single</goal>
|
|
</goals>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>mqtt-server-graal</id>
|
|
<dependencies>
|
|
<!-- GraalVM 环境使用 jdk log -->
|
|
<dependency>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-jdk14</artifactId>
|
|
</dependency>
|
|
<!-- GraalVM -->
|
|
<dependency>
|
|
<groupId>org.graalvm.sdk</groupId>
|
|
<artifactId>graal-sdk</artifactId>
|
|
<version>${graalvm.version}</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<finalName>mqtt-server-graal</finalName>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.graalvm.nativeimage</groupId>
|
|
<artifactId>native-image-maven-plugin</artifactId>
|
|
<version>21.2.0</version>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>native-image</goal>
|
|
</goals>
|
|
<phase>package</phase>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<skip>false</skip>
|
|
<imageName>mqtt-server-graalvm</imageName>
|
|
<mainClass>${mainClass.server}</mainClass>
|
|
<buildArgs>
|
|
-H:+RemoveSaturatedTypeFlows
|
|
--allow-incomplete-classpath
|
|
--no-fallback
|
|
</buildArgs>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
<profile>
|
|
<id>mqtt-client-graal</id>
|
|
<dependencies>
|
|
<!-- GraalVM 环境使用 jdk log -->
|
|
<dependency>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-jdk14</artifactId>
|
|
</dependency>
|
|
<!-- GraalVM -->
|
|
<dependency>
|
|
<groupId>org.graalvm.sdk</groupId>
|
|
<artifactId>graal-sdk</artifactId>
|
|
<version>${graalvm.version}</version>
|
|
<scope>provided</scope>
|
|
</dependency>
|
|
</dependencies>
|
|
<build>
|
|
<finalName>mqtt-client-graal</finalName>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.graalvm.nativeimage</groupId>
|
|
<artifactId>native-image-maven-plugin</artifactId>
|
|
<version>21.2.0</version>
|
|
<executions>
|
|
<execution>
|
|
<goals>
|
|
<goal>native-image</goal>
|
|
</goals>
|
|
<phase>package</phase>
|
|
</execution>
|
|
</executions>
|
|
<configuration>
|
|
<skip>false</skip>
|
|
<imageName>mqtt-client-graalvm</imageName>
|
|
<mainClass>${mainClass.client}</mainClass>
|
|
<buildArgs>
|
|
-H:+RemoveSaturatedTypeFlows
|
|
--allow-incomplete-classpath
|
|
--no-fallback
|
|
</buildArgs>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
|
|
</project>
|