<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>com.atlassian.jira</groupId>
        <artifactId>jira-plugins</artifactId>
        <version>7.2.0-QR20160331130816</version>
    </parent>
    <artifactId>jira-fileviewer-plugin</artifactId>
    <name>Atlassian JIRA - Plugins - File viewer plugin</name>
    <description>Provides compontents for displaying file previews inside JIRA</description>
    <packaging>atlassian-plugin</packaging>
    <build>
        <plugins>
            <plugin>
                <groupId>org.twdata.maven</groupId>
                <artifactId>maven-cli-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>build-helper-maven-plugin</artifactId>
                <version>1.8</version>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jira-plugin</artifactId>
                <extensions>true</extensions>
                <configuration>
                    <extractDependencies>false</extractDependencies>
                    <instructions>
                        <Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
                        <Spring-Context>*</Spring-Context>
                        <Import-Package>
                            *;resolution:="optional"
                        </Import-Package>
                    </instructions>
                    <skipManifestValidation>true</skipManifestValidation>
                </configuration>
                <executions>
                    <execution>
                        <id>default-compress-resources</id>
                        <phase>none</phase>
                    </execution>
                </executions>
            </plugin>
            <!--Specifics for File Preview-->
            <plugin>
                <!-- Install npm modules first -->
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>exec-maven-plugin</artifactId>
                <version>1.2.1</version>
                <executions>
                    <execution>
                        <id>exec-npm-install</id>
                        <phase>initialize</phase>
                        <configuration>
                            <executable>python3</executable>
                            <arguments>
                                <argument>./jmake_npm_runner.py</argument>
                                <argument>install</argument>
                            </arguments>
                        </configuration>
                        <goals>
                            <goal>exec</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-resources-plugin</artifactId>
                <version>2.6</version>
                <executions>
                    <execution>
                        <id>copy-npm-resources</id>
                        <phase>generate-sources</phase>
                        <goals>
                            <goal>copy-resources</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>target/classes/node_modules</outputDirectory>
                            <resources>
                                <resource>
                                    <directory>node_modules</directory>
                                </resource>
                            </resources>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <groupId>net.sf.alchim</groupId>
                <artifactId>yuicompressor-maven-plugin</artifactId>
                <executions>
                    <execution>
                        <goals>
                            <goal>compress</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <linebreakpos>-1</linebreakpos>
                    <jswarn>false</jswarn>
                    <nomunge>true</nomunge>
                    <excludes>
                        <exclude>**/*.xml</exclude>
                        <exclude>**/*-min*</exclude>
                        <exclude>**/*.min.js</exclude>
                        <exclude>**/compatibility.js</exclude>
                        <exclude>**/pdf.js</exclude>
                        <exclude>**/pdf.worker.js</exclude>
                        <exclude>**/bower_components/**</exclude>
                    </excludes>
                </configuration>
            </plugin>
        </plugins>
        <pluginManagement>
            <plugins>
                <plugin>
                    <artifactId>maven-clean-plugin</artifactId>
                    <version>2.6.1</version>
                    <configuration>
                        <filesets>
                            <fileset>
                                <directory>node_modules</directory>
                                <followSymlinks>false</followSymlinks>
                            </fileset>
                        </filesets>
                    </configuration>
                </plugin>
            </plugins>
        </pluginManagement>
    </build>
    <dependencies>

    </dependencies>
    <properties>
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
    </properties>
</project>
