<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.upm</groupId>
        <artifactId>atlassian-universal-plugin-manager-test-resources</artifactId>
        <version>2.9.1</version>
    </parent>

    <artifactId>atlassian-universal-plugin-manager-test-plugin-v2-plugin-license-storage-test-old</artifactId>
    <name>Universal Plugin Manager - Test Plugin v2 (Plugin License Storage test - old version)</name>
    <packaging>atlassian-plugin</packaging>
    <description>
        Identical to atlassian-universal-plugin-manager-test-plugin-v2-plugin-license-storage-test, except it
        has a lower version number and imports an old version of the UPM licensing framework.  This is used
        to test upgrading of licensing-enabled plugins (PluginLicenseStoragePluginMutableIntegrationTest).
    </description>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-amps-plugin</artifactId>
                <configuration>
                    <instructions>
                        <Import-Package>
                            com.atlassian.plugin*;version="0.0",
                            com.atlassian.sal*;version="0.0",
                            com.atlassian.templaterenderer*;version="0.0",
                            com.google.common*;version="1.0",
                            javax.servlet*;version="0.0",
                            org.apache.commons.io*;version="0.0",
                            org.apache.commons.lang*;version="0.0",
                            org.joda.time*;version="0.0",
                            org.osgi.framework*;version="0.0",
                            org.osgi.util*;version="0.0",
                            org.slf4j*;version="1.5",
                            org.springframework.beans*;version="0.0",
                            org.springframework.context*;version="0.0",
                            org.springframework.osgi*;version="0.0"
                        </Import-Package>
                        <Private-Package>
                            com.atlassian.upm.license.storage.lib*
                        </Private-Package>
                        <DynamicImport-Package>
                            com.atlassian.upm.api.license;version="2.0.1",
                            com.atlassian.upm.api.license.entity;version="2.0.1",
                            com.atlassian.upm.api.util;version="2.0.1",
                            com.atlassian.upm.license.storage.plugin;version="2.3"
                        </DynamicImport-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <!-- Include the Plugin License Storage artifact such that it can be found on the classpath when we need to install it -->
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-storage-plugin</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                            <includeArtifactIds>plugin-license-storage-plugin</includeArtifactIds>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>plugin-license-storage-lib</artifactId>
            <version>2.3</version>
            <scope>compile</scope> <!-- intentionally compile scoped -->
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>plugin-license-storage-plugin</artifactId>
            <version>2.3</version>
            <scope>provided</scope>
            <type>atlassian-plugin</type>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>licensing-api</artifactId>
            <version>2.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>upm-api</artifactId>
            <version>2.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-core</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.bundles</groupId>
            <artifactId>google-collections</artifactId>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>ide</id>
            <!-- UPM-1268 : Duplicate dependency declarations are here to make idea / eclipse happy; otherwise they
              don't handle dependencies of type atlassian-plugin well. If you get compilation problems in your
               ide, try activating this profile. These also need to be kept up to date if additional atlassian-plugin type
                dependencies are added to the default profile. -->
            <dependencies>
                <dependency>
                    <groupId>com.atlassian.upm</groupId>
                    <artifactId>plugin-license-storage-plugin</artifactId>
                    <version>2.3</version>
                    <scope>provided</scope>
                </dependency>
            </dependencies>
        </profile>
    </profiles>
</project>