<?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/maven-v4_0_0.xsd">
  <modelVersion>4.0.0</modelVersion>

  <groupId>org.wixtoolset</groupId>
  <artifactId>wix-toolset-parent</artifactId>
  <version>3.9.2</version>
  <packaging>pom</packaging>

  <name>WiX Toolset Maven parent/aggregate</name>
  <url>http://wixtoolset.org/</url>
  <description>
The WiX toolset builds Windows installation packages from XML source code. 
The toolset integrates seamlessly into build processes.
This is a binary artifact capture.</description>
  <inceptionYear>2004</inceptionYear>

  <organization>
    <url>http://www.outercurve.org/</url>
    <name>Outercurve Foundation</name>
  </organization>

  <licenses>
    <license>
      <name>Microsoft Reciprocal License (Ms-RL)</name>
      <url>http://wix.codeplex.com/license</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <developers>
    <developer>
      <id>robmensching</id>
      <name>Rob Mensching</name>
      <email>rob@robmensching.com</email>
      <roles>
        <role>Project Lead</role>
      </roles>
    </developer>
    <developer>
      <id>zonski</id>
      <name>Daniel Zwolenski</name>
      <email>zonski@gmail.com</email>
      <roles>
        <role>Maven Deployer</role>
      </roles>
    </developer>
    <developer>
      <id>GregDomjan</id>
      <name>Greg Domjan</name>
      <roles>
        <role>Maven Deployer</role>
      </roles>
    </developer>
  </developers>

  <scm>
    <url>https://github.com/zonski/wix-maven</url>
    <connection>scm:git:git://github.com/zonski/wix-maven</connection>
    <developerConnection>scm:git:git@github.com:zonski/wix-maven</developerConnection>
    <tag>wix-toolset-3.9.2</tag>
  </scm>

  <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/zonski/wix-maven/issues</url>
  </issueManagement>
  <!-- Source
    SCM https://github.com/wixtoolset/wix3/tree/wix39r2rtm
    <issueManagement>
    <system>GitHub</system>
    <url>https://github.com/wixtoolset/issues/issues</url>
    </issueManagement>
  -->
  <distributionManagement>
    <snapshotRepository>
      <id>ossrh</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>
  
  <properties> <!-- The &Build value seems to change daily... -->
    <wix.downloadPath>src/download</wix.downloadPath>
    <wix.downloadFile>${wix.downloadPath}/wix-binaries.zip</wix.downloadFile>
    <wix.downloadFile.debug>${wix.downloadPath}/wix-debug.zip</wix.downloadFile.debug>
    <zip.unpack>${basedir}/target/unpack</zip.unpack>
  </properties>

  <modules>
    <module>wix-toolset</module>
    <module>maven/wix-toolset</module>
    <module>maven/wix-bootstrap</module>
    <module>maven/sdk-toolset</module>
  </modules>
  <build>
    <pluginManagement>
      <plugins>
        <plugin>
          <groupId>org.codehaus.mojo</groupId>
          <artifactId>build-helper-maven-plugin</artifactId>
          <version>1.9.1</version>
        </plugin>
        <plugin>
          <artifactId>maven-antrun-plugin</artifactId>
          <version>1.8</version>
        </plugin>
        <plugin>
          <artifactId>maven-resources-plugin</artifactId>
          <version>2.7</version>
        </plugin>
        <plugin>
            <artifactId>maven-invoker-plugin</artifactId>
            <version>1.9</version>
        </plugin>
        <plugin>
          <artifactId>maven-deploy-plugin</artifactId>
          <version>2.8.2</version>
        </plugin>
        <plugin>
          <artifactId>maven-release-plugin</artifactId>
          <version>2.5.2</version>
        </plugin>
      </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.sonatype.plugins</groupId>
        <artifactId>nexus-staging-maven-plugin</artifactId>
        <version>1.6.3</version>
        <extensions>true</extensions>
        <configuration>
          <serverId>ossrh</serverId>
          <nexusUrl>https://oss.sonatype.org/</nexusUrl>
          <autoReleaseAfterClose>true</autoReleaseAfterClose>
        </configuration>
      </plugin>
    </plugins>
  </build>

  <profiles>
    <profile>
      <id>nar</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>nar/dutil</module>
        <module>nar/dutil-vc9</module>
        <module>nar/dutil-vc10</module>
        <module>nar/dutil-vc11</module>
        <module>nar/dutil-vc12</module>
        <module>nar/balutil</module>
        <module>nar/balutil-vc9</module>
        <module>nar/balutil-vc10</module>
        <module>nar/balutil-vc11</module>
        <module>nar/balutil-vc12</module>
        <module>nar/deputil</module>
        <module>nar/deputil-vc9</module>
        <module>nar/deputil-vc10</module>
        <module>nar/deputil-vc11</module>
        <module>nar/deputil-vc12</module>
        <module>nar/wcautil</module>
        <module>nar/wcautil-vc9</module>
        <module>nar/wcautil-vc10</module>
        <module>nar/wcautil-vc11</module>
        <module>nar/wcautil-vc12</module>
      </modules>
      <properties>
        <nar.test.version>3.0.0</nar.test.version>
        <nar.src>${project.build.directory}\nar\${project.artifactId}-${project.version}</nar.src>
        <nar.src.noarch>${nar.src}-noarch\include</nar.src.noarch>
        <nar.src.x86>${nar.src}-x86-Windows-msvc-static\lib\x86-Windows-msvc\static</nar.src.x86>
        <nar.src.x64>${nar.src}-amd64-Windows-msvc-static\lib\amd64-Windows-msvc\static</nar.src.x64>
      </properties>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>com.github.maven-nar</groupId>
              <artifactId>nar-maven-plugin</artifactId>
              <version>3.0.0</version>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>
    <profile>
      <id>npanday</id>
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <modules>
        <module>npanday/wix</module>
        <module>npanday/Microsoft.Deployment.Compression</module>
        <module>npanday/Microsoft.Deployment.Compression.Cab</module>
        <module>npanday/Microsoft.Deployment.Compression.Zip</module>
        <module>npanday/Microsoft.Deployment.Resources</module>
        <module>npanday/Microsoft.Deployment.WindowsInstaller</module>
        <module>npanday/Microsoft.Deployment.WindowsInstaller.Linq</module>
        <module>npanday/Microsoft.Deployment.WindowsInstaller.Package</module>
      </modules>
      <properties>
        <npanday.test.version>1.4.0-incubating</npanday.test.version>
      </properties>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>org.apache.npanday.plugins</groupId>
              <artifactId>custom-lifecycle-maven-plugin</artifactId>
              <version>1.4.0-incubating</version>
            </plugin>
            <plugin>
              <artifactId>maven-antrun-plugin</artifactId>
              <executions>
                <execution>
                  <id>prepare-npanday-sdk</id>
                  <phase>generate-sources</phase>
                  <goals>
                    <goal>run</goal>
                  </goals>
                  <configuration>
                    <target name="prepare modules">
                      <echo>../../${wix.downloadFile}</echo>
                      <unzip dest="${project.build.directory}" overwrite="false" src="../../${wix.downloadFile}">
                        <patternset>
                          <include name="sdk/${project.artifactId}.dll" />
                          <include name="sdk/${project.artifactId}.xml" />
                        </patternset>
                        <mapper>
                          <mapper type="regexp" from="sdk/(.*)" to="\1" />
                        </mapper>
                      </unzip>
                    </target>
                  </configuration>
                </execution>
              </executions>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>

    </profile>
    <profile>
      <id>download</id>
      <!-- To update the source
      Update the download URL property by finding it on the download page at  http://wixtoolset.org/releases/v3.7/stable
      mvn -N generate-sources -Pdownload -->
      <activation>
        <activeByDefault>false</activeByDefault>
      </activation>
      <properties>
	  <!-- d:releaseid="610859" -->
        <wix.downloadURL>http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=wix&amp;DownloadId=1421697&amp;FileTime=130661188723230000&amp;Build=20999</wix.downloadURL>
        <wix.downloadURL.debug>http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=wix&amp;DownloadId=1421698&amp;FileTime=130661188723230000&amp;Build=20999</wix.downloadURL.debug>
      </properties>
      <build>
        <plugins>
          <plugin>
            <artifactId>maven-antrun-plugin</artifactId>
            <executions>
              <execution>
                <id>download and prepare</id>
                <phase>generate-sources</phase>
                <goals>
                  <goal>run</goal>
                </goals>
                <configuration>
                  <target name="download">
                <!--
                  need a method of getting the download, first to get download 
                  at all, then more dynamic based on version

                  ie. https://wix.codeplex.com/downloads/get/582220 URL for 3.7
                  time based page update to POST http://wix.codeplex.com/releases/captureDownload
                  then redirect to actual download like  http://download-codeplex.sec.s-msft.com/Download/Release?ProjectName=wix&DownloadId=534607&FileTime=129979520837900000&Build=19727
                  <taskdef resource="net/sf/antcontrib/antlib.xml" classpathref="maven.plugin.classpath" />
                  <post to="http://wix.codeplex.com/releases/captureDownload" property="wix.downloadURL" failonerror="true">
                    <prop name="fileid" value="534607" />
                    <prop name="clickoncepath" value="" />
                    <prop name="redirectToAds" value="false" />
                  </post>
                  <dependencies>
                    <dependency>
                      <groupId>ant-contrib</groupId>
                      <artifactId>ant-contrib</artifactId>
                      <version>1.0b3</version>
                      <exclusions>
                        <exclusion>
                          <groupId>ant</groupId>
                          <artifactId>ant</artifactId>
                        </exclusion>
                      </exclusions>
                    </dependency>
                  </dependencies>
                  ${wix.downloadURL} -->
                    <mkdir dir="${wix.downloadPath}" />
                    <get src="${wix.downloadURL}" dest="${wix.downloadFile}" usetimestamp="true" /> <!-- timestamp check doesn't seem to work, downlaods every time -->
                    <get src="${wix.downloadURL.debug}" dest="${wix.downloadFile.debug}" usetimestamp="true" /> <!-- timestamp check doesn't seem to work, downlaods every time -->
                  </target>
                </configuration>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
    <profile>
      <id>sonatype-oss-release</id>
      <activation>
        <property>
          <name>performRelease</name>
          <value>true</value>
        </property>
      </activation>
      <build>
        <plugins>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.1</version>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>
  </profiles>
</project>