<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>8.21.1</version>
    </parent>
    <artifactId>jira-view-issue-plugin</artifactId>
    <name>Atlassian Jira - Plugins - View Issue Panels</name>
    <description>Provides WebPanels for the View Issue Page</description>
    <packaging>atlassian-plugin</packaging>
    <build>
        <plugins>
            <plugin>
                <groupId>org.twdata.maven</groupId>
                <artifactId>maven-cli-plugin</artifactId>
            </plugin>
            <plugin>
                <groupId>org.apache.felix</groupId>
                <artifactId>maven-bundle-plugin</artifactId>
                <extensions>true</extensions>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>jira-maven-plugin</artifactId>
                <configuration>
                    <extractDependencies>false</extractDependencies>
                    <skipManifestValidation>true</skipManifestValidation>
                    <instructions>
                        <Export-Package>
                            com.atlassian.jira.plugin.viewissue,
                            com.atlassian.jira.plugin.viewissue.conditions,
                            com.atlassian.jira.plugin.viewissue.issuelink,
                            com.atlassian.jira.plugin.viewissue.issuelink.rest
                        </Export-Package>
                        <Spring-Context>*</Spring-Context>
                        <Import-Package>
                            *;resolution:=optional
                        </Import-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.github.eirslett</groupId>
                <artifactId>frontend-maven-plugin</artifactId>
            </plugin>
        </plugins>
    </build>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <scope>provided</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.slf4j</groupId>
                    <artifactId>slf4j-log4j12</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-rest-api</artifactId>
            <version>${project.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.ozymandias</groupId>
            <artifactId>atlassian-plugin-point-safety</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.guava</groupId>
            <artifactId>guava</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>log4j</groupId>
            <artifactId>log4j</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-tests</artifactId>
            <version>${project.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
          <groupId>javax.ws.rs</groupId>
          <artifactId>jsr311-api</artifactId>
          <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>
    <properties>
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <generated.locale.dir>${project.build.directory}/generated-sources/pseudo-loc</generated.locale.dir>
    </properties>
    <profiles>
        <profile>
            <id>pseudo-loc</id>
            <build>
                <resources>
                    <resource>
                        <directory>${generated.locale.dir}</directory>
                    </resource>
                    <resource>
                        <directory>src/main/resources</directory>
                        <filtering>true</filtering>
                        <includes>
                            <include>**/atlassian-plugin.xml</include>
                        </includes>
                    </resource>
                    <resource>
                        <directory>src/main/resources</directory>
                        <filtering>false</filtering>
                        <excludes>
                            <exclude>**/atlassian-plugin.xml</exclude>
                            <!--
                                FRONTEND COMPILATION CONFIGURATION
                                This configuration is made in conjunction with Gulp via the frontend-maven-plugin.

                                Whatever files are ultimately processed via the frontend-maven-plugin (e.g., they are compiled
                                via Gulp) should be ignored here, otherwise they will be destroyed by Maven's default behaviours.

                                For what frontend files are compiled, see `gulpfile.js`.
                            -->
                            <exclude>**/*.js</exclude>
                            <!-- END FRONTEND COMPILATION CONFIGURATION -->
                        </excludes>
                    </resource>
                </resources>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>pseudo-loc-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <id>pseudo-loc</id>
                                <phase>generate-sources</phase>
                                <goals>
                                    <goal>pseudo-loc</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <sourceLocale>en_UK</sourceLocale>
                            <targetLocale>en_AQ</targetLocale>
                            <pseudoLocaliseActions>
                                <pseudoLocaliseAction>
                                    <source>src/main/resources/jira-view-issue-plugin.properties</source>
                                    <target>${generated.locale.dir}/jira-view-issue-plugin_{loc}.properties</target>
                                </pseudoLocaliseAction>
                            </pseudoLocaliseActions>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>
    </profiles>
</project>
