<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>org.evomaster</groupId>
        <artifactId>evomaster</artifactId>
        <version>2.0.0</version>
    </parent>

    <groupId>org.evomaster</groupId>
    <artifactId>evomaster-client-java</artifactId>
    <packaging>pom</packaging>

    <modules>
        <module>controller</module>
        <module>controller-api</module>
        <module>instrumentation</module>
        <module>instrumentation-shared</module>
        <module>client-util</module>
        <module>ci-utils</module>
        <module>dependencies</module>
    </modules>

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>org.evomaster</groupId>
                <artifactId>evomaster-client-java-util</artifactId>
                <version>${project.version}</version>
            </dependency>
            <dependency>
                <groupId>javax.servlet</groupId>
                <artifactId>javax.servlet-api</artifactId>
                <version>3.1.0</version>
            </dependency>
        </dependencies>
    </dependencyManagement>

    <build>
        <!--
            When we make a release, the client-java must be published on Maven Central.
            This requires to create jars for sources and javadocs.
            As the javadocs build might fail, we force its creation at each build,
            so that any issue can be fixed as soon as it is introduced.
        -->
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>3.2.0</version>
                <executions>
                    <execution>
                        <id>create-sources</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-javadoc-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <source>8</source>
                </configuration>
                <executions>
                    <execution>
                        <id>create-javadocs</id>
                        <phase>verify</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>