<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>com.atlassian.springjdk8</groupId>
        <artifactId>atlassian-spring-jdk8</artifactId>
        <version>2.5.6.SEC03-atlassian-CONFDEV-32398-5</version>
    </parent>

    <groupId>org.springframework</groupId>
    <artifactId>spring</artifactId>
    <version>2.5.6.SEC03-atlassian-CONFDEV-32398-5</version>
    <packaging>jar</packaging>

    <description>Patched spring 2.5.6 bundle with JDK8 support</description>

    <!--
         This artifact presents as a version of org.springframework:spring-core, and is therefore distributed in the
         3rd-party repository and not the (parent pom inherited) public repository.
     -->
    <distributionManagement>
        <repository>
            <id>atlassian-3rdparty</id>
            <name>Atlassian 3rd-party Repository</name>
            <url>https://maven.atlassian.com/3rdparty</url>
        </repository>
    </distributionManagement>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-dependency-plugin</artifactId>
                <version>2.8</version>
                <executions>
                    <execution>
                        <id>unpack-spring</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                            <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>org.springframework</groupId>
                                    <artifactId>spring</artifactId>
                                    <version>${spring.version}</version>
                                </artifactItem>
                            </artifactItems>
                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                        </configuration>
                    </execution>
                    <execution>
                        <id>unpack-jdk-version</id>
                        <phase>generate-resources</phase>
                        <goals>
                            <goal>unpack</goal>
                        </goals>
                            <configuration>
                            <artifactItems>
                                <artifactItem>
                                    <groupId>com.atlassian.springjdk8</groupId>
                                    <artifactId>jdk-version</artifactId>
                                    <version>${project.version}</version>
                                </artifactItem>
                            </artifactItems>
                            <excludes>META-INF/**</excludes>
                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                        </configuration>
                    </execution>
                </executions>
                <dependencies>
                    <dependency>
                        <groupId>com.atlassian.springjdk8</groupId>
                        <artifactId>jdk-version</artifactId>
                        <version>${project.version}</version>
                    </dependency>
                </dependencies>
            </plugin>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-jar-plugin</artifactId>
                <configuration>
                    <archive>
                        <manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
                    </archive>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
