<?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>vaadin-platform-parent</artifactId>
    <version>25.4.0-alpha3</version>
  </parent>
  <groupId>com.vaadin</groupId>
  <artifactId>vaadin-jandex</artifactId>
  <version>25.4.0-alpha3</version>
  <name>Vaadin Jandex index</name>
  <description>Jandex index for all Vaadin packages</description>
  <licenses>
    <license>
      <name>Apache License Version 2.0</name>
      <url>https://www.apache.org/licenses/LICENSE-2.0</url>
      <distribution>repo</distribution>
    </license>
  </licenses>
  <dependencies>
    <dependency>
      <groupId>com.vaadin</groupId>
      <artifactId>vaadin-internal</artifactId>
      <version>25.4.0-alpha3</version>
      <scope>provided</scope>
      <exclusions>
        <exclusion>
          <groupId>com.vaadin</groupId>
          <artifactId>flow-react</artifactId>
        </exclusion>
      </exclusions>
    </dependency>
  </dependencies>
  <build>
    <plugins>
      <plugin>
        <groupId>org.codehaus.mojo</groupId>
        <artifactId>exec-maven-plugin</artifactId>
        <version>3.5.1</version>
        <executions>
          <execution>
            <id>unpack-non-indexed-dependencies</id>
            <phase>generate-resources</phase>
            <goals>
              <goal>exec</goal>
            </goals>
            <configuration>
              <executable>${env.JAVA_HOME}/bin/java</executable>
              <classpathScope>compile</classpathScope>
              <arguments>
                <argument>${project.basedir}/../scripts/jandex/UnpackNonIndexedJars.java</argument>
                <argument>${project.build.directory}/jandex-classes</argument>
                <classpath />
              </arguments>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <groupId>io.smallrye</groupId>
        <artifactId>jandex-maven-plugin</artifactId>
        <version>3.6.0</version>
        <executions>
          <execution>
            <id>make-index</id>
            <goals>
              <goal>jandex</goal>
            </goals>
            <configuration>
              <processDefaultFileSet>false</processDefaultFileSet>
              <fileSets>
                <fileSet>
                  <directory>${project.build.directory}/jandex-classes</directory>
                </fileSet>
              </fileSets>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <version>3.2.0</version>
        <configuration>
          <excludes>
            <exclude>com</exclude>
            <exclude>com/**/*</exclude>
            <exclude>OSGI-INF</exclude>
            <exclude>OSGI-INF/*</exclude>
          </excludes>
        </configuration>
      </plugin>
    </plugins>
  </build>
</project>
