<?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.craftercms</groupId>
        <artifactId>crafter-social-parent</artifactId>
        <version>2.5.2</version>
    </parent>
    <artifactId>crafter-social-sui</artifactId>
    <name>Crafter Social UI</name>
    <description>Crafter Social UI Plugin</description>
    <packaging>jar</packaging>
    <properties>
    </properties>
    <dependencies>
    </dependencies>
    <build>
    <resources>
        <resource>
            <directory>dist</directory>
            <targetPath>META-INF/</targetPath>
            <filtering>false</filtering>
        </resource>
    </resources>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <version>2.5</version>
                <configuration>
                    <forceCreation>true</forceCreation>
                    <archive>
                        <manifest>
                            <addDefaultImplementationEntries>true</addDefaultImplementationEntries>
                        </manifest>
                        <manifestEntries>
                            <Implementation-Build>${buildNumber}</Implementation-Build>
                            <Build-On>${timestamp}</Build-On>
                        </manifestEntries>
                    </archive>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.4</version>
             <configuration>
                 <forceCreation>true</forceCreation>
                 <includes>
                     <include>
                         app
                     </include>
                     <include>
                         bower.json
                     </include>
                     <include>
                         package.json
                     </include>
                     <include>
                         Gruntfile.js
                     </include>
                     <include>
                         README.md
                     </include>
                 </includes>
             </configuration>
                <executions>
                    <execution>
                        <id>attach-sources</id>
                        <goals>
                            <goal>jar</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-javadoc-plugin</artifactId>
            <version>2.9</version>
                <configuration>
                </configuration>
            <executions>
                <execution>
                    <id>attach-javadocs</id>
                    <goals>
                        <goal>jar</goal>
                    </goals>
                </execution>
            </executions>
            </plugin>
            <plugin>
                <groupId>pl.allegro</groupId>
                <artifactId>grunt-maven-plugin</artifactId>
                <version>1.5.0</version>
                <configuration>
                    <!-- relative to src/main/webapp/, default: static -->
                    <jsSourceDirectory>META-INF/resources/</jsSourceDirectory>
                    <showColors>true</showColors>
                    <!-- example options usage to get verbose output in logs -->
                    <gruntOptions>
                        <gruntOption>--force</gruntOption>
                    </gruntOptions>
                </configuration>
                <executions>
                    <execution>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>create-resources</goal>
                            <goal>grunt</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                    <artifactId>maven-resources-plugin</artifactId>
                    <version>2.7</version>
                    <executions>
                      <execution>
                        <id>copy-resources</id>
                        <phase>process-resources</phase>
                        <goals>
                          <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                          <outputDirectory>${basedir}/target/extra-resources</outputDirectory>
                          <resources>          
                            <resource>
                              <directory>src/non-packaged-resources</directory>
                              <filtering>true</filtering>
                            </resource>
                          </resources>              
                        </configuration>            
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>
    <profiles>
        <profile>
            <id>release-sign-artifacts</id>
            <activation>
                <property>
                    <name>performRelease</name>
                    <value>true</value>
                </property>
            </activation>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-deploy-plugin</artifactId>
                        <version>2.7</version>
                    </plugin>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-gpg-plugin</artifactId>
                        <version>1.4</version>
                        <executions>
                            <execution>
                                <id>sign-artifacts</id>
                                <phase>verify</phase>
                                <goals>
                                    <goal>sign</goal>
                                </goals>
                            </execution>
                        </executions>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>

</project>
