<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.amps</groupId>
        <artifactId>atlassian-amps-parent</artifactId>
        <version>5.0.18</version>
    </parent>

    <artifactId>atlassian-amps-product-plugins</artifactId>
    <packaging>pom</packaging>

    <name>Atlassian Maven Plugin Suite (product plugins parent pom)</name>

    <modules>
        <module>maven-bamboo-plugin</module>
        <module>maven-confluence-plugin</module>
        <module>maven-jira-plugin</module>
        <module>maven-refapp-plugin</module>
        <module>maven-fecru-plugin</module>
        <module>maven-crowd-plugin</module>
        <module>maven-stash-plugin</module>
    </modules>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>maven-amps-plugin</artifactId>
            <version>${project.version}</version>
        </dependency>
    </dependencies>

    <profiles>
        <profile>
            <id>shitty</id>
            <dependencies>
                <dependency>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>maven-amps-plugin</artifactId>
                    <version>${project.version}</version>
                    <classifier>integration-tests</classifier>
                    <type>zip</type>
                    <scope>test</scope>
                </dependency>
            </dependencies>
            <build>
                <pluginManagement>
                    <plugins>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-dependency-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>unpack-dependencies</id>
                                    <phase>pre-integration-test</phase>
                                    <goals>
                                        <goal>unpack-dependencies</goal>
                                    </goals>
                                    <configuration>
                                        <includeTypes>zip</includeTypes>
                                        <outputDirectory>${project.build.directory}/it-unfiltered</outputDirectory>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.apache.maven.plugins</groupId>
                            <artifactId>maven-resources-plugin</artifactId>
                            <executions>
                                <execution>
                                    <id>copy-integration-tests-with-filtering</id>
                                    <phase>pre-integration-test</phase>
                                    <goals>
                                        <goal>copy-resources</goal>
                                    </goals>
                                    <configuration>
                                        <outputDirectory>${project.build.directory}/it</outputDirectory>
                                        <resources>
                                            <resource>
                                                <directory>${project.build.directory}/it-unfiltered</directory>
                                                <filtering>true</filtering>
                                                <includes>
                                                    <include>**/pom.xml</include>
                                                    <include>**/goals.txt</include>
                                                    <include>**/flags.txt</include>
                                                    <include>settings.xml</include>
                                                </includes>
                                            </resource>
                                        </resources>
                                    </configuration>
                                </execution>
                                <execution>
                                    <id>copy-integration-tests-without-filtering</id>
                                    <phase>pre-integration-test</phase>
                                    <goals>
                                        <goal>copy-resources</goal>
                                    </goals>
                                    <configuration>
                                        <outputDirectory>${project.build.directory}/it</outputDirectory>
                                        <resources>
                                            <resource>
                                                <directory>${project.build.directory}/it-unfiltered</directory>
                                                <filtering>false</filtering>
                                                <excludes>
                                                    <exclude>**/pom.xml</exclude>
                                                    <exclude>**/goals.txt</exclude>
                                                    <exclude>**/flags.txt</exclude>
                                                    <exclude>settings.xml</exclude>
                                                </excludes>
                                            </resource>
                                        </resources>
                                    </configuration>
                                </execution>
                            </executions>
                        </plugin>
                        <plugin>
                            <groupId>org.codehaus.mojo</groupId>
                            <artifactId>shitty-maven-plugin</artifactId>
                        </plugin>
                    </plugins>
                </pluginManagement>
                <plugins>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-repository-bundle-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>bundle</goal>
                                </goals>
                            </execution>
                        </executions>
                    <configuration>
                        <artifacts>
                            <!-- restricted artifacts -->
                            <artifact>javax.servlet:servlet-api:2.3</artifact>
                            <artifact>javax.mail:mail:1.4</artifact>
                            <artifact>javax.mail:mail:1.3.3</artifact>
                            <artifact>javax.transaction:jta:1.0.1b</artifact>
                            <artifact>javax.transaction:jta:1.0.1B</artifact>
                            <artifact>jndi:jndi:1.2.1</artifact>
                            <artifact>jta:jta:1.0.1B</artifact>
                            <artifact>jta:jta:1.0.1</artifact>
                            <artifact>javax.jms:jms:1.1</artifact>
                        </artifacts>
                    </configuration>
                    </plugin>
                </plugins>
            </build>
         </profile>
     </profiles>

</project>
