<?xml version="1.0" encoding="UTF-8"?>
<project xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd" xmlns="http://maven.apache.org/POM/4.0.0"
    xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
  <modelVersion>4.0.0</modelVersion>
  <parent>
    <groupId>com.vaadin</groupId>
    <artifactId>flow-project</artifactId>
    <version>25.3.vaadin-dev-SNAPSHOT</version>
  </parent>
  <groupId>com.vaadin</groupId>
  <artifactId>flow-devloop-daemon</artifactId>
  <version>25.3.vaadin-dev-SNAPSHOT</version>
  <name>Flow Dev Loop Daemon</name>
  <description>JDK-only daemon that runs the vaadin-dev dev loop.</description>
  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>http://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <properties>
    <flow.apicmp.skip>true</flow.apicmp.skip>
    <bnd.skip>true</bnd.skip>
  </properties>
  <build>
    <plugins>
      <plugin>
        <artifactId>maven-enforcer-plugin</artifactId>
        <executions>
          <execution>
            <id>check-daemon-is-dependency-free</id>
            <phase>process-sources</phase>
            <goals>
              <goal>enforce</goal>
            </goals>
            <configuration>
              <rules>
                <RestrictImports>
                  <reason>The dev-loop daemon must depend on the JDK only, so that it starts fast and can never drag the application's classpath into the daemon JVM</reason>
                  <bannedImports>
                    <bannedImport>com.vaadin.**</bannedImport>
                    <bannedImport>org.slf4j.**</bannedImport>
                    <bannedImport>jakarta.**</bannedImport>
                    <bannedImport>org.springframework.**</bannedImport>
                  </bannedImports>
                </RestrictImports>
              </rules>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>com.vaadin.flow.devloop.daemon.Daemon</mainClass>
            </manifest>
            <manifestEntries>
              <Premain-Class>com.vaadin.flow.devloop.agent.DevLoopAgent</Premain-Class>
              <Agent-Class>com.vaadin.flow.devloop.agent.DevLoopAgent</Agent-Class>
              <Can-Redefine-Classes>true</Can-Redefine-Classes>
              <Can-Retransform-Classes>true</Can-Retransform-Classes>
            </manifestEntries>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
