<?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>
  <groupId>org.zanata</groupId>
  <artifactId>zanata-assets</artifactId>
  <version>9.0</version>
  <name>Zanata assets modules</name>
  <description>Zanata style guide and css</description>
  <url>http://zanata.org/</url>
  <packaging>jar</packaging>

  <scm>
    <connection>scm:git:git://github.com/zanata/zanata-assets.git</connection>
    <developerConnection>scm:git:git@github.com:zanata/zanata-assets.git</developerConnection>
    <url>https://github.com/zanata/zanata-assets</url>
    <tag>zanata-assets-9.0</tag>
  </scm>

  <properties>
    <antrun-plugin.version>1.8</antrun-plugin.version>
    <resources.dir>META-INF/resources</resources.dir>
  </properties>

  <licenses>
    <license>
      <name>GNU Lesser General Public License v2.1</name>
      <url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
      <distribution>repo</distribution>
    </license>
  </licenses>

  <organization>
    <name>Zanata Project</name>
    <url>http://zanata.org/</url>
  </organization>

  <developers>
    <!-- in alphabetical order (by id field) -->
    <developer>
      <id>aeng@redhat.com</id>
      <name>Alex Eng</name>
      <email>aeng@redhat.com</email>
      <organization>Red Hat</organization>
      <organizationUrl>http://www.redhat.com/</organizationUrl>
      <timezone>10</timezone>
    </developer>
    <developer>
      <id>camunoz@redhat.com</id>
      <name>Carlos Munoz</name>
      <email>camunoz@redhat.com</email>
      <organization>Red Hat</organization>
      <organizationUrl>http://www.redhat.com/</organizationUrl>
      <timezone>10</timezone>
    </developer>
    <developer>
      <id>damason@redhat.com</id>
      <name>David Mason</name>
      <email>damason@redhat.com</email>
      <organization>Red Hat</organization>
      <organizationUrl>http://www.redhat.com/</organizationUrl>
      <timezone>10</timezone>
    </developer>
    <developer>
      <id>lbrooker@redhat.com</id>
      <name>Luke Brooker</name>
      <email>lbrooker@redhat.com</email>
      <timezone>10</timezone>
    </developer>
    <developer>
      <id>pahuang@redhat.com</id>
      <name>Patrick Huang</name>
      <email>pahuang@redhat.com</email>
      <organization>Red Hat</organization>
      <organizationUrl>http://www.redhat.com/</organizationUrl>
      <timezone>10</timezone>
    </developer>
    <developer>
      <id>sflaniga@redhat.com</id>
      <name>Sean Flanigan</name>
      <email>sflaniga@redhat.com</email>
      <organization>Red Hat</organization>
      <organizationUrl>http://www.redhat.com/</organizationUrl>
      <timezone>10</timezone>
    </developer>
  </developers>

  <contributors>
    <!-- in alphabetical order (by email field) -->
    <contributor>
      <name>Ding-Yi Chen</name>
      <email>dchen@redhat.com</email>
      <organization>Red Hat</organization>
      <organizationUrl>http://www.redhat.com/</organizationUrl>
      <roles>
        <role>tester</role>
        <role>packager</role>
      </roles>
      <timezone>10</timezone>
    </contributor>
  </contributors>

  <build>
    <extensions>
      <extension>
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav</artifactId>
        <version>1.0-beta-2</version>
      </extension>
      <extension>
        <!--  enables dav: protocol for distributionManagement in Maven 3+  -->
        <groupId>org.apache.maven.wagon</groupId>
        <artifactId>wagon-webdav-jackrabbit</artifactId>
        <version>1.0-beta-7</version>
      </extension>
    </extensions>
    <plugins>
      <plugin>
        <artifactId>maven-antrun-plugin</artifactId>
        <version>${antrun-plugin.version}</version>
        <executions>
          <execution>
            <phase>compile</phase>
            <configuration>
              <exportAntProperties>true</exportAntProperties>
	      <target name="grunt.build">
		<echo message="Run npm install" />
		<exec executable="npm" failonerror="true">
		  <arg line="install" />
	        </exec>
                <echo message="Run grunt build from source to version:${project.version}" />
                <exec executable="grunt" failonerror="true">
                  <arg line="build --rel ${project.version}" />
                </exec>
              </target>
            </configuration>
            <goals>
              <goal>run</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
      <plugin>
        <artifactId>maven-resources-plugin</artifactId>
        <version>2.7</version>
        <executions>
          <execution>
            <id>default-resources</id>
            <phase>test</phase>
            <goals>
              <goal>resources</goal>
            </goals>
          </execution>
        </executions>
      </plugin>
    </plugins>
    <resources>
      <resource>
        <directory>${basedir}/php/${project.version}/assets</directory>
        <targetPath>${resources.dir}/jars/assets</targetPath>
        <excludes>
          <exclude>sass/**</exclude>
          <exclude>js/components/**</exclude>
          <exclude>js/vendors/**</exclude>
          <exclude>fonts/source/**</exclude>
        </excludes>
      </resource>
    </resources>
  </build>

  <profiles>
    <profile>
      <id>release</id>
      <build>
        <plugins>
          <plugin>
            <groupId>org.sonatype.plugins</groupId>
            <artifactId>nexus-staging-maven-plugin</artifactId>
            <version>1.6.5</version>
            <extensions>true</extensions>
            <configuration>
              <serverId>sonatype-nexus-staging</serverId>
              <nexusUrl>https://oss.sonatype.org/</nexusUrl>
            </configuration>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-source-plugin</artifactId>
            <version>2.4</version>
            <executions>
              <execution>
                <id>attach-sources</id>
                <goals>
                  <goal>jar-no-fork</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9.1</version>
            <executions>
              <execution>
                <id>attach-javadocs</id>
                <goals>
                  <goal>jar</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
          <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-gpg-plugin</artifactId>
            <version>1.6</version>
            <configuration>
              <useAgent>true</useAgent>
            </configuration>
            <executions>
              <execution>
                <id>sign-artifacts</id>
                <phase>verify</phase>
                <goals>
                  <goal>sign</goal>
                </goals>
              </execution>
            </executions>
          </plugin>
        </plugins>
      </build>
    </profile>

    <profile>
      <!-- Used for MEAD builds -->
      <id>mead</id>
      <activation>
        <property>
          <name>mead</name>
        </property>
      </activation>
      <properties>
        <allow.deploy.skip>false</allow.deploy.skip>
        <checkstyle.skip>true</checkstyle.skip>
        <enforcer.skip>true</enforcer.skip>
        <findbugs.skip>true</findbugs.skip>
        <mavensign.expand.skip>*</mavensign.expand.skip>
        <mavensign.sign.skip>*</mavensign.sign.skip>
        <skipTests>true</skipTests>
      </properties>
    </profile>
  </profiles>

  <distributionManagement>
    <!-- <repository>
      <uniqueVersion>false</uniqueVersion>
      <id>cloudbees-private-release-repository</id>
      <name>cloudbees-private-release-repository</name>
      <url>dav:https://repository-zanata.forge.cloudbees.com/release/</url>
      <layout>default</layout>
    </repository>
    <snapshotRepository>
      <uniqueVersion>false</uniqueVersion>
      <id>cloudbees-private-snapshot-repository</id>
      <name>cloudbees-private-snapshot-repository</name>
      <url>dav:https://repository-zanata.forge.cloudbees.com/snapshot/</url>
      <layout>default</layout>
    </snapshotRepository> -->
    <repository>
      <id>sonatype-nexus-staging</id>
      <url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
    </repository>
    <snapshotRepository>
      <id>sonatype-nexus-staging</id>
      <url>https://oss.sonatype.org/content/repositories/snapshots</url>
    </snapshotRepository>
  </distributionManagement>

</project>
