<?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">

    <parent>
        <groupId>tk.okou</groupId>
        <artifactId>vertx-lang-php-parent</artifactId>
        <version>3.6.0</version>
    </parent>

    <modelVersion>4.0.0</modelVersion>
    <artifactId>vertx-lang-jphp-codegen</artifactId>

    <dependencies>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-codegen</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-docgen</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-codetrans</artifactId>
            <optional>true</optional>
        </dependency>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-codegen</artifactId>
            <classifier>tck-sources</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.vertx</groupId>
            <artifactId>vertx-codegen</artifactId>
            <classifier>tck</classifier>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.sun</groupId>
            <artifactId>tools</artifactId>
            <version>1.6</version>
            <scope>system</scope>
            <optional>true</optional>
            <systemPath>${java.home}/../lib/tools.jar</systemPath>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <!-- Unpack codegen source code to sources/test/java -->
                    <execution>
                        <id>unpack-tck</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>unpack-dependencies</goal>
                        </goals>
                        <configuration>
                            <includeGroupIds>io.vertx</includeGroupIds>
                            <includeArtifactIds>vertx-codegen</includeArtifactIds>
                            <includeTypes>jar</includeTypes>
                            <includeClassifiers>tck-sources</includeClassifiers>
                            <outputDirectory>${project.build.directory}/sources/vertx-codegen</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
            </plugin>

            <plugin>
                <groupId>org.bsc.maven</groupId>
                <artifactId>maven-processor-plugin</artifactId>
                <version>3.2.0</version>
                <configuration>
                    <systemProperties>
                        <java.util.logging.SimpleFormatter.format>%4$s: %3$s - %5$s %6$s%n</java.util.logging.SimpleFormatter.format>
                    </systemProperties>
                </configuration>
                <!--<executions>-->
                    <!--&lt;!&ndash; Run the annotation processor on vertx-codegen TCK and generate the Kotlin API &ndash;&gt;-->
                    <!--<execution>-->
                        <!--<id>generate-tck</id>-->
                        <!--<goals>-->
                            <!--<goal>process-test</goal>-->
                        <!--</goals>-->
                        <!--<phase>generate-test-sources</phase>-->
                        <!--<configuration>-->
                            <!--<processors>-->
                                <!--<processor>io.vertx.codegen.CodeGenProcessor</processor>-->
                            <!--</processors>-->
                            <!--<optionMap>-->
                                <!--<codegen.output>${project.build.directory}/generated-sources</codegen.output>-->
                                <!--<codegen.generators>Php</codegen.generators>-->
                            <!--</optionMap>-->
                            <!--<sourceDirectory>${project.build.directory}/sources/vertx-codegen</sourceDirectory>-->
                            <!--<defaultOutputDirectory>${project.build.directory}/generated-test-sources/apt</defaultOutputDirectory>-->
                        <!--</configuration>-->
                    <!--</execution>-->
                <!--</executions>-->
                <dependencies>
                    <dependency>
                        <groupId>junit</groupId>
                        <artifactId>junit</artifactId>
                        <version>${junit.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <!-- Use -Pdocs -->
        <profile>
            <id>docs</id>
            <build>
                <plugins>
                    <plugin>
                        <artifactId>maven-javadoc-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>javadoc</goal>
                                    <goal>jar</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>