<?xml version="1.0" encoding="UTF-8"?>
<!--

    Copyright (c) 2010, 2018 Oracle and/or its affiliates. All rights reserved.

    This program and the accompanying materials are made available under the
    terms of the Eclipse Public License v. 2.0, which is available at
    http://www.eclipse.org/legal/epl-2.0.

    This Source Code may also be made available under the following Secondary
    Licenses when the conditions for such availability set forth in the
    Eclipse Public License v. 2.0 are satisfied: GNU General Public License,
    version 2 with the GNU Classpath Exception, which is available at
    https://www.gnu.org/software/classpath/license.html.

    SPDX-License-Identifier: EPL-2.0 OR GPL-2.0 WITH Classpath-exception-2.0

-->

<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.glassfish.hk2</groupId>
        <artifactId>maven-plugins</artifactId>
        <version>2.6.1</version>
    </parent>
    <artifactId>hk2-inhabitant-generator</artifactId>
    <packaging>maven-plugin</packaging>

    <name>Inhabitant Generator</name>
    <description>${project.name}</description>

    <properties>
        <findbugs.exclude>${project.basedir}/exclude.xml</findbugs.exclude>
    </properties>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <configuration>
                    <argLine>-Dbuild.dir=${project.build.directory} ${surefireArgLineExtra}</argLine>
                    <excludes>
                        <exclude>**/gendir/*</exclude>
                    </excludes>
                </configuration>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-compiler-plugin</artifactId>
                 <executions>
                     <execution>
                         <id>gendir</id>
                         <configuration>
                             <testExcludes>
                                 <exclude>**/negative/*</exclude>
                                 <exclude>**/InhabitantsGeneratorTest.java</exclude>
                             </testExcludes>
                             <outputDirectory>${project.build.testOutputDirectory}/gendir</outputDirectory>
                         </configuration>
                         <goals>
                             <goal>testCompile</goal>
                         </goals>
                     </execution>
                     <execution>
                         <id>negative</id>
                         <configuration>
                             <testExcludes>
                                 <exclude>generator</exclude>
                             </testExcludes>
                             <testIncludes>
                                 <include>**/negative/*</include>
                             </testIncludes>
                             <outputDirectory>${project.build.testOutputDirectory}/negative</outputDirectory>
                         </configuration>
                         <goals>
                             <goal>testCompile</goal>
                         </goals>
                     </execution>
                 </executions>
             </plugin>
             <plugin>
                 <groupId>org.apache.maven.plugins</groupId>
                 <artifactId>maven-jar-plugin</artifactId>
                 <executions>
                     <execution>
                         <id>>gendir-package</id>
                         <goals>
                             <goal>test-jar</goal>
                         </goals>
                         <phase>process-test-classes</phase>
                         <configuration>
                             <excludes>
                                 <exclude>**/negative/*</exclude>
                             </excludes>
                             <finalName>gendir</finalName>
                             <outputDirectory>${project.build.testOutputDirectory}</outputDirectory>
                         </configuration>
                     </execution>
                 </executions>
             </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>org.glassfish.hk2.external</groupId>
            <artifactId>jakarta.inject</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm</artifactId>
            <version>${asm.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm-analysis</artifactId>
            <version>${asm.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm-commons</artifactId>
            <version>${asm.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm-tree</artifactId>
            <version>${asm.version}</version>
        </dependency>
        <dependency>
            <groupId>org.ow2.asm</groupId>
            <artifactId>asm-util</artifactId>
            <version>${asm.version}</version>
        </dependency>
        <dependency>
            <groupId>org.glassfish.hk2</groupId>
            <artifactId>hk2-api</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-plugin-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.ant</groupId>
            <artifactId>ant</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.maven</groupId>
            <artifactId>maven-core</artifactId>
            <version>${mvn.version}</version>
        </dependency>
    </dependencies>
</project>
