<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/maven-v4_0_0.xsd">

  <modelVersion>4.0.0</modelVersion>

  <parent>
    <groupId>io.confluent</groupId>
    <artifactId>cc-role-definitions-parent</artifactId>
    <version>8.4.0</version>
  </parent>

  <artifactId>cc-role-definitions</artifactId>
  <name>cc-role-definitions</name>
  <version>8.4.0</version>

  <packaging>jar</packaging>

  <profiles>
    <profile>
      <id>generate-typescript</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.codehaus.mojo</groupId>
            <artifactId>exec-maven-plugin</artifactId>
            <executions>
              <execution>
                <id>generate-typescript-types</id>
                <phase>process-classes</phase>
                <goals>
                  <goal>java</goal>
                </goals>
                <configuration>
                  <mainClass>io.confluent.security.roledefinitions.codegen.TypescriptGenerator</mainClass>
                  <arguments>
                    <argument>${project.build.directory}/generated-types/index.d.ts</argument>
                  </arguments>
                  <classpathScope>compile</classpathScope>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>

</project>