<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>9.8.1</version>
  </parent>
  <artifactId>jira-reference-plugin</artifactId>
  <name>Atlassian Jira - Plugins - Development Only - Reference Plugin</name>
  <description>Jira plugin that contains reference implementations of the extension points in Jira</description>
  <packaging>bundle</packaging>
  <build>
    <resources>
      <!-- It looks weird to have one command to include only atlassian-plugin.xml and another to include everything
           but this single file. We're doing that, because
           * only the first command is able to substitute Maven properties,
             e.g. "${atlassian.plugin.key}" with "com.atlassian.jira.dev.func-test-plugin",
           * only the second command is able to include everything, as "<include>*</include>" doesn't work -->
      <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>
          </excludes>
      </resource>
    </resources>
     <pluginManagement>
         <plugins>
              <plugin>
                <artifactId>maven-source-plugin</artifactId>
                <version>2.2.1</version>
                <executions>
                    <execution>
                        <id>attach-sources-for-reference-plugin</id>
                        <goals>
                            <goal>jar-no-fork</goal>
                        </goals>
                        <configuration>
                            <attach>true</attach>
                        </configuration>
                        <phase>generate-sources</phase>
                    </execution>
                </executions>
              </plugin>
         </plugins>
    </pluginManagement>
    <plugins>
      <plugin>
        <groupId>org.apache.felix</groupId>
        <artifactId>maven-bundle-plugin</artifactId>
        <configuration>
          <instructions>
            <Bundle-SymbolicName>${atlassian.plugin.key}</Bundle-SymbolicName>
              <Bundle-Version>${reference.plugin.version}</Bundle-Version>
              <Export-Package>com.atlassian.jira.dev.reference.plugin.components.*</Export-Package>
              <Spring-Context>*;timeout:=60</Spring-Context>
          </instructions>
        </configuration>
      </plugin>
      <plugin>
        <groupId>org.twdata.maven</groupId>
        <artifactId>maven-cli-plugin</artifactId>
      </plugin>
        <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>jira-maven-plugin</artifactId>
            <configuration>
                <jvmArgs>-Dplugin.webresource.batching.off=false ${jira.functest.jvmargs.memory}</jvmArgs>
                <skipManifestValidation>true</skipManifestValidation>
                <productVersion>${project.version}</productVersion>
                <productDataVersion>${jira.data.version}</productDataVersion>
                <instructions>
                    <atlassian-plugin-key>${atlassian.plugin.key}</atlassian-plugin-key>
                    <Spring-Context>*</Spring-Context>
                    <Export-Package />
                    <Import-Package>
                        *;resolution:=optional
                    </Import-Package>
                </instructions>
            </configuration>
        </plugin>
        <plugin>
            <groupId>org.apache.maven.plugins</groupId>
            <artifactId>maven-resources-plugin</artifactId>
            <configuration>
                <escapeString>\</escapeString>
            </configuration>
        </plugin>
        <!-- FRONTEND COMPILATION CONFIGURATION
             We're not using the frontend-maven-plugin here.
             See the explanation in jira-func-test-plugin/pom.xml.
         -->
    </plugins>
  </build>
    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>javax.servlet-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.logging.log4j</groupId>
            <artifactId>log4j-1.2-api</artifactId>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <scope>provided</scope>
        </dependency>
    </dependencies>

  <properties>
    <jira.data.version>4.3</jira.data.version>
    <atlassian.plugin.key>com.atlassian.jira.dev.reference-plugin</atlassian.plugin.key>
    <reference.plugin.version>1.0.0</reference.plugin.version>
    <license.scope>test</license.scope>
  </properties>
</project>
