<?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>io.github.magwas</groupId>
        <artifactId>konveyor</artifactId>
        <version>0.5.7</version>
        <relativePath>../pom.xml</relativePath>
    </parent>
    <artifactId>konveyor.tooling</artifactId>
    <packaging>jar</packaging>
    <name>${project.artifactId}-${project.version}</name>
    <description>Base packages and tooling for konveyor coding style.</description>
    <url>https://repo.kdea.hu/${project.artifactId}/${project.version}</url>
    <licenses>
        <license>
            <name>GPL affero</name>
            <url>https://www.gnu.org/licenses/agpl-3.0.en.html</url>
            <comments>GNU Affero General Public License</comments>
        </license>
    </licenses>
    <developers>
        <developer>
            <name>Árpád Magosányi</name>
            <email>m4gw4s@gmail.com</email>
        </developer>
    </developers>
    <scm>
        <url>https://github.com/edemo/konveyor.git</url>
    </scm>
    <dependencies>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-api</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.jupiter</groupId>
            <artifactId>junit-jupiter-engine</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.junit.platform</groupId>
            <artifactId>junit-platform-launcher</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring-test</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-core</artifactId>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.annotation</groupId>
            <artifactId>javax.annotation-api</artifactId>
        </dependency>
        <dependency>
            <groupId>io.github.magwas</groupId>
            <artifactId>konveyor.runtime</artifactId>
            <version>${project.version}</version>
        </dependency>
        <dependency>
            <groupId>io.github.magwas</groupId>
            <artifactId>konveyor.testing</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>io.github.magwas</groupId>
            <artifactId>konveyor.testing</artifactId>
            <version>${project.version}</version>
            <type>test-jar</type>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>org.pcollections</groupId>
            <artifactId>pcollections</artifactId>
            <version>4.0.2</version>
        </dependency>
    </dependencies>
    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <id>validate-hook</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>validate</phase>
                        <configuration>
                            <workingDirectory>${basedir}</workingDirectory>
                            <executable>/bin/sh</executable>
                            <arguments>
                                <argument>${basedir}/hooks/validate</argument>
                            </arguments>
                        </configuration>
                    </execution>
                    <execution>
                        <id>process-resources-hook</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>process-resources</phase>
                        <configuration>
                            <workingDirectory>${basedir}</workingDirectory>
                            <executable>${basedir}/hooks/process-resources</executable>
                        </configuration>
                    </execution>
                    <execution>
                        <id>install-hook</id>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                        <phase>install</phase>
                        <configuration>
                            <workingDirectory>${basedir}</workingDirectory>
                            <executable>${basedir}/hooks/install</executable>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>3.3.0</version>
                <executions>
                    <execution>
                        <id>default-jar</id>
                        <phase>none</phase>
                        <!-- Disable default JAR -->
                    </execution>
                </executions>
            </plugin>
            <!-- Then use assembly plugin to create the main JAR -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-assembly-plugin</artifactId>
                <version>3.6.0</version>
                <executions>
                    <execution>
                        <id>make-assembly</id>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <phase>package</phase>
                        <configuration>
                            <archive>
                                <manifest>
                                    <mainClass>io.github.magwas.konveyor.tooling.GenerateAST</mainClass>
                                </manifest>
                            </archive>
                            <descriptorRefs>
                                <descriptorRef>jar-with-dependencies</descriptorRef>
                            </descriptorRefs>
                            <finalName>${project.artifactId}-${project.version}</finalName>
                            <appendAssemblyId>false</appendAssemblyId>
                            <attach>true</attach>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
            </plugin>
            <plugin>
                <artifactId>maven-source-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
</project>
