mirror of
https://github.com/kuhyx/WUT_Computer_Science.git
synced 2026-07-04 11:43:02 +02:00
151 lines
6.3 KiB
XML
151 lines
6.3 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>
|
|
|
|
<groupId>org.example</groupId>
|
|
<artifactId>temperature-anomaly-detector</artifactId>
|
|
<version>1.0-SNAPSHOT</version>
|
|
|
|
<properties>
|
|
<maven.compiler.source>11</maven.compiler.source>
|
|
<maven.compiler.target>11</maven.compiler.target>
|
|
<flink.version>1.17.0</flink.version>
|
|
<jackson.version>2.14.2</jackson.version>
|
|
</properties>
|
|
|
|
<dependencies>
|
|
<!-- Flink Core - Remove the 'provided' scope to include in the JAR -->
|
|
<dependency>
|
|
<groupId>org.apache.flink</groupId>
|
|
<artifactId>flink-streaming-java</artifactId>
|
|
<version>${flink.version}</version>
|
|
<!-- Remove the provided scope so it's included in the JAR -->
|
|
</dependency>
|
|
<!-- Flink Kafka Connector -->
|
|
<dependency>
|
|
<groupId>org.apache.flink</groupId>
|
|
<artifactId>flink-connector-kafka</artifactId>
|
|
<version>${flink.version}</version>
|
|
</dependency>
|
|
<!-- Flink Core - Required for execution -->
|
|
<dependency>
|
|
<groupId>org.apache.flink</groupId>
|
|
<artifactId>flink-clients</artifactId>
|
|
<version>${flink.version}</version>
|
|
</dependency>
|
|
<!-- Jackson for JSON -->
|
|
<dependency>
|
|
<groupId>com.fasterxml.jackson.core</groupId>
|
|
<artifactId>jackson-databind</artifactId>
|
|
<version>${jackson.version}</version>
|
|
</dependency>
|
|
<!-- Logging -->
|
|
<dependency>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-api</artifactId>
|
|
<version>2.0.5</version>
|
|
</dependency>
|
|
<dependency>
|
|
<groupId>org.slf4j</groupId>
|
|
<artifactId>slf4j-simple</artifactId>
|
|
<version>2.0.5</version>
|
|
</dependency>
|
|
</dependencies>
|
|
|
|
<build>
|
|
<plugins>
|
|
<!-- Add maven-compiler-plugin to configure JVM arguments -->
|
|
<plugin>
|
|
<groupId>org.apache.maven.plugins</groupId>
|
|
<artifactId>maven-compiler-plugin</artifactId>
|
|
<version>3.8.1</version>
|
|
<configuration>
|
|
<source>${maven.compiler.source}</source>
|
|
<target>${maven.compiler.target}</target>
|
|
<compilerArgs>
|
|
<arg>--add-opens</arg>
|
|
<arg>java.base/java.util=ALL-UNNAMED</arg>
|
|
<arg>--add-opens</arg>
|
|
<arg>java.base/java.lang=ALL-UNNAMED</arg>
|
|
</compilerArgs>
|
|
</configuration>
|
|
</plugin>
|
|
|
|
<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>org.example.TemperatureAnomalyDetector</mainClass>
|
|
</transformer>
|
|
<!-- Include this transformer to handle service files properly -->
|
|
<transformer implementation="org.apache.maven.plugins.shade.resource.ServicesResourceTransformer"/>
|
|
</transformers>
|
|
<filters>
|
|
<filter>
|
|
<artifact>*:*</artifact>
|
|
<excludes>
|
|
<exclude>META-INF/*.SF</exclude>
|
|
<exclude>META-INF/*.DSA</exclude>
|
|
<exclude>META-INF/*.RSA</exclude>
|
|
</excludes>
|
|
</filter>
|
|
</filters>
|
|
</configuration>
|
|
</execution>
|
|
</executions>
|
|
</plugin>
|
|
</plugins>
|
|
|
|
<!-- Configure the same JVM args for runtime execution -->
|
|
<resources>
|
|
<resource>
|
|
<directory>src/main/resources</directory>
|
|
<filtering>true</filtering>
|
|
</resource>
|
|
</resources>
|
|
</build>
|
|
|
|
<!-- Add exec plugin to pass JVM arguments when running with mvn exec -->
|
|
<profiles>
|
|
<profile>
|
|
<id>add-opens</id>
|
|
<activation>
|
|
<activeByDefault>true</activeByDefault>
|
|
</activation>
|
|
<build>
|
|
<plugins>
|
|
<plugin>
|
|
<groupId>org.codehaus.mojo</groupId>
|
|
<artifactId>exec-maven-plugin</artifactId>
|
|
<version>3.1.0</version>
|
|
<configuration>
|
|
<executable>java</executable>
|
|
<arguments>
|
|
<argument>--add-opens</argument>
|
|
<argument>java.base/java.util=ALL-UNNAMED</argument>
|
|
<argument>--add-opens</argument>
|
|
<argument>java.base/java.lang=ALL-UNNAMED</argument>
|
|
<argument>-classpath</argument>
|
|
<classpath/>
|
|
<argument>org.example.TemperatureAnomalyDetector</argument>
|
|
</arguments>
|
|
</configuration>
|
|
</plugin>
|
|
</plugins>
|
|
</build>
|
|
</profile>
|
|
</profiles>
|
|
</project>
|