<?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>org.jboss.windup.maven</groupId>
        <artifactId>nexus-indexer-parent</artifactId>
        <version>2</version>
    </parent>

    <artifactId>nexus-indexer-data</artifactId>
    <packaging>pom</packaging>

    <name>Windup: Nexus Indexer - Data</name>

    <dependencies>
        <dependency>
            <groupId>org.jboss.windup.maven</groupId>
            <artifactId>nexus-indexer</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <artifactId>maven-assembly-plugin</artifactId>
                <executions>
                    <execution>
                        <id>bundle-mappings</id>
                        <phase>prepare-package</phase>
                        <goals>
                            <goal>single</goal>
                        </goals>
                        <configuration>
                            <descriptor>src/main/assembly/bundle-metadata.xml</descriptor>
                            <appendAssemblyId>false</appendAssemblyId>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>java</goal>
                        </goals>
                        <configuration>
                            <mainClass>org.jboss.windup.rules.apps.java.archives.GenerateMetadataFile</mainClass>
                            <arguments>
                                <argument>central</argument>
                                <argument>http://repo1.maven.org/maven2</argument>
                                <argument>${project.build.directory}</argument>
                                <argument>${user.home}/.windup/cache/nexus-indexes</argument>
                            </arguments>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>


</project>
