<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.jvnet.poormans-installer</groupId>
    <artifactId>pom</artifactId>
    <version>1.1</version>
    <relativePath>..</relativePath>
  </parent>

  <artifactId>installer-builder</artifactId>
  <name>Installer Builder</name>
  <packaging>maven-plugin</packaging>

  <build>
    <sourceDirectory>src</sourceDirectory>

    <plugins>
      <plugin>
        <artifactId>maven-dependency-plugin</artifactId>
        <version>2.0-alpha-4</version>
        <executions>
          <execution>
            <id>copy-installer</id>
            <phase>process-classes</phase>
            <goals>
              <goal>copy</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>${groupId}</groupId>
                  <artifactId>installer</artifactId>
                  <version>${version}</version>
                  <outputDirectory>target/classes</outputDirectory>
                  <destFileName>raw-installer.jar</destFileName>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
          <execution>
            <id>unpack-sfx4j</id>
            <phase>process-classes</phase>
            <goals>
              <goal>unpack</goal>
            </goals>
            <configuration>
              <artifactItems>
                <artifactItem>
                  <groupId>org.kohsuke.sfx4j</groupId>
                  <artifactId>sfx4j</artifactId>
                  <version>1.1</version>
                  <outputDirectory>target/classes</outputDirectory>
                </artifactItem>
              </artifactItems>
            </configuration>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-jar-plugin</artifactId>
        <configuration>
          <archive>
            <manifest>
              <mainClass>org.jvnet.poormans_installer.builder.Main</mainClass>
              <addClasspath>true</addClasspath>
            </manifest>
          </archive>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <dependencies>
    <dependency>
      <groupId>${groupId}</groupId>
      <artifactId>installer</artifactId>
      <version>${version}</version>
    </dependency>
    <dependency>
      <groupId>org.kohsuke.sfx4j</groupId>
      <artifactId>sfx4j</artifactId>
      <version>1.1</version>
    </dependency>
    <dependency>
      <groupId>ant</groupId>
      <artifactId>ant</artifactId>
      <version>1.6</version>
    </dependency>
    <dependency>
      <groupId>org.apache.maven</groupId>
      <artifactId>maven-plugin-api</artifactId>
      <version>2.0</version>
    </dependency>
    <dependency>
        <groupId>org.apache.maven</groupId>
        <artifactId>maven-project</artifactId>
        <version>2.0</version>
    </dependency>
  </dependencies>
</project>
