<?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">
    <modelVersion>4.0.0</modelVersion>

    <parent>
        <groupId>edu.berkeley.cs.jqf</groupId>
        <artifactId>jqf</artifactId>
        <version>3.0</version>
    </parent>

    <artifactId>jqf-fuzz</artifactId>

    <name>jqf-fuzz</name>
    <description>JQF: Feedback-directed Quickcheck for Java - Aggregator of the engine, JUnit 4 runner, and junit-quickcheck generators</description>
    <packaging>jar</packaging>

    <!--
      This module keeps the edu.berkeley.cs.jqf:jqf-fuzz coordinates for backwards compatibility.
      It carries no sources of its own; it re-exports the engine and the JUnit 4 / junit-quickcheck
      adapters so existing users still get JQF, @Fuzz, ZestGuidance, GuidedFuzzing, and the rest
      through a single dependency. The zest-cli assembly is built here because it needs every module
      and SPI provider on one classpath.
    -->
    <dependencies>
        <dependency>
            <groupId>edu.berkeley.cs.jqf</groupId>
            <artifactId>jqf-core</artifactId>
        </dependency>
        <dependency>
            <groupId>edu.berkeley.cs.jqf</groupId>
            <artifactId>jqf-generator-quickcheck</artifactId>
        </dependency>
        <dependency>
            <groupId>edu.berkeley.cs.jqf</groupId>
            <artifactId>jqf-junit4</artifactId>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                    	<manifest>
                    		<addClasspath>true</addClasspath>
                    		<classpathPrefix>dependency/</classpathPrefix>
                    	</manifest>
                    </archive>
                </configuration>
                <!-- jqf-fuzz is a source-less backwards-compat aggregator (see comment
                     above). Maven Central still requires -sources and -javadoc jars for
                     every non-pom artifact, so attach empty ones built from an empty
                     directory. -->
                <executions>
                    <execution>
                        <id>empty-sources-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>sources</classifier>
                            <classesDirectory>${project.build.directory}/empty</classesDirectory>
                            <forceCreation>true</forceCreation>
                        </configuration>
                    </execution>
                    <execution>
                        <id>empty-javadoc-jar</id>
                        <phase>package</phase>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                        <configuration>
                            <classifier>javadoc</classifier>
                            <classesDirectory>${project.build.directory}/empty</classesDirectory>
                            <forceCreation>true</forceCreation>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
		        <groupId>org.apache.maven.plugins</groupId>
		        <artifactId>maven-dependency-plugin</artifactId>
		        <executions>
		                <execution>
		                        <id>copy-dependencies</id>
		                        <phase>package</phase>
		                        <goals>
		                                <goal>copy-dependencies</goal>
		                        </goals>
		                        <configuration>
		                                <includeScope>runtime</includeScope>
		                                <excludeArtifactIds>jqf-instrument,asm</excludeArtifactIds>
		                        </configuration>
		                </execution>
		        </executions>
			</plugin>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.1.1</version>
                <configuration>
                    <descriptors>
                        <descriptor>src/main/assembly/assembly.xml</descriptor>
                    </descriptors>
                </configuration>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <phase>package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>edu.berkeley.cs.jqf.fuzz.ei.ZestCLI</mainClass>
                                </manifest>
                            </archive>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

</project>
