<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.confluence</groupId>
        <artifactId>confluence-project</artifactId>
        <version>4.0-m9</version>
    </parent>
    
    <groupId>com.atlassian.confluence.tinymceplugin</groupId>
    <artifactId>confluence-tinymce-plugin</artifactId>

    <name>TinyMCE Editor Plugin</name>
    <description>TinyMCE Editor Plugin for Confluence</description>
    <url>http://confluence.atlassian.com/display/CONFEXT/TinyMCE+Plugin</url>

    <dependencies>
	    <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <version>${project.version}</version>
            <scope>compile</scope>
        </dependency>
        
        <!-- REST dependencies -->
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <version>${rest.version}</version>
            <scope>provided</scope>
        </dependency>    
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>com.atlassian.jersey-library</artifactId>
            <version>${rest.version}</version>
            <type>pom</type>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <version>${sal.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- Needed for Qualifier annotations -->
        <dependency>
            <groupId>org.springframework</groupId>
            <artifactId>spring</artifactId>
            <version>2.5.6</version>
            <scope>provided</scope>
        </dependency>        
        <!-- End of REST dependencies -->
                
        <dependency>
            <groupId>jmock</groupId>
            <artifactId>jmock</artifactId>
            <version>1.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>jmock</groupId>
            <artifactId>jmock-cglib</artifactId>
            <version>1.2.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>2.1_3</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <properties>
        <atlassian.plugin.key>com.atlassian.confluence.tinymceplugin</atlassian.plugin.key>
        <confluence.version>${project.version}</confluence.version>
        <atlassian.product.version>${project.version}</atlassian.product.version>
    </properties>

    <build>
        <resources>
            <!-- This filtering strategy is intentionally weird to trick the IDEA plugin into including the directory in the classpath -->
            <resource>
                <directory>src/main/resources</directory>
                <excludes>
                    <exclude>atlassian-plugin.xml</exclude>
                </excludes>
            </resource>
            <resource>
                <directory>src/main/resources</directory>
                <filtering>true</filtering>
                <includes>
                    <include>atlassian-plugin.xml</include>
                </includes>
            </resource>
        </resources>
        <plugins>
            <plugin>
                <groupId>org.twdata.maven</groupId>
                <artifactId>maven-cli-plugin</artifactId>
                <version>1.0.3</version>
                <configuration>
                    <commands>
                        <pi>resources compile jar com.atlassian.maven.plugins:atlassian-pdk:install</pi>
                        <pu>com.atlassian.maven.plugins:atlassian-pdk:uninstall</pu>
                    </commands>
                </configuration>
            </plugin>
        </plugins>
    </build>
</project>
