Source

atlassian-scala-example-plugin / pom.xml

Full commit
<?xml version="1.0" encoding="UTF-8"?>

<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>
    <groupId>com.atlassian.plugins.polyglot.scala</groupId>
    <artifactId>scala-example-plugin</artifactId>
    <version>1.0-SNAPSHOT</version>

    <organization>
        <name>Atlassian</name>
        <url>http://www.atlassian.com/</url>
    </organization>

    <name>scala-example-plugin</name>
    <description>This is an example Confluence plugin written in Scala</description>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <!-- Bundled dependencies -->


        <!--
        If you are using the Scala Provider plugin or the Scala library OSGi bundle,
        change the <scope> to "provided"
        -->
        <dependency>
            <groupId>org.scala-lang</groupId>
            <artifactId>scala-library</artifactId>
            <version>${scala.version}</version>
            <!--<scope>provided</scope>-->
            <!-- Add pluginDep for provided scope -->
        </dependency>

        <!--<dependency>-->
            <!--<groupId>com.fasterxml</groupId>-->
            <!--<artifactId>jackson-module-scala</artifactId>-->
            <!--<version>${jackson.version}</version>-->
            <!--<exclusions>-->
                <!--<exclusion>-->
                    <!--<groupId>com.google.guava</groupId>-->
                    <!--<artifactId>guava</artifactId>-->
                <!--</exclusion>-->
            <!--</exclusions>-->
        <!--</dependency>-->

        <!-- Provided dependencies -->
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <version>${confluence.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <version>${template.renderer.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.5</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-jaxrs</artifactId>
            <version>${jackson.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-mapper-asl</artifactId>
            <version>${jackson.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <version>${sal-api.version}</version>
            <scope>provided</scope>
        </dependency>

        <!-- Test dependencies -->
        <dependency>
            <groupId>org.scalatest</groupId>
            <artifactId>scalatest_${scala.version}</artifactId>
            <version>1.7.1</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.8.2</version>
            <scope>test</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.confluence.plugin</groupId>
            <artifactId>func-test</artifactId>
            <version>2.3</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.jwebunit</groupId>
            <artifactId>jwebunit-htmlunit-plugin</artifactId>
            <version>2.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>net.sourceforge.nekohtml</groupId>
            <artifactId>nekohtml</artifactId>
            <version>1.9.12</version>
            <scope>test</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-surefire-plugin</artifactId>
                <version>2.4.3</version>
                <configuration>
                    <useSystemClassLoader>false</useSystemClassLoader>
                    <argLine>-Xmx512m</argLine>
                    <includes>
                        <include>**/*Unit.java</include>
                        <include>**/*Test.java</include>
                        <include>**/*Spec.java</include>
                    </includes>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-confluence-plugin</artifactId>
                <version>3.8</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${confluence.version}</productVersion>
                    <productDataVersion>${confluence.data.version}</productDataVersion>
                    <extractDependencies>true</extractDependencies>
                    <enableFastdev>false</enableFastdev>
                    <!-- Reloading velocity templates requires (CMD+Shift+Reload) which triggers fastDev
                    https://developer.atlassian.com/display/DOCS/Automatic+Plugin+Reinstallation+with+FastDev -->
                    <instructions>
                        <Import-Package>
                            scala*;version="${scala.version}",
                            sun.misc;resolution:=optional,
                            *
                        </Import-Package>
                        <Export-Package>
                            scala.*;version="${scala.version}"
                        </Export-Package>
                    </instructions>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.twdata.maven</groupId>
                <artifactId>maven-cli-plugin</artifactId>
                <version>0.7</version>
                <configuration>
                    <userAliases>
                        <pi>resources com.atlassian.maven.plugins:maven-confluence-plugin:filter-plugin-descriptor compile org.scala-tools:maven-scala-plugin:2.13.1:compile com.atlassian.maven.plugins:maven-confluence-plugin:copy-bundled-dependencies com.atlassian.maven.plugins:maven-confluence-plugin:compress-resources com.atlassian.maven.plugins:maven-confluence-plugin:generate-manifest com.atlassian.maven.plugins:maven-confluence-plugin:validate-manifest com.atlassian.maven.plugins:maven-confluence-plugin:jar com.atlassian.maven.plugins:maven-confluence-plugin:install</pi>
                    </userAliases>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.scala-tools</groupId>
                <artifactId>maven-scala-plugin</artifactId>
                <version>2.13.1</version> <!-- Latest version for Maven 2.1.0 (required by Atlassian) -->
                <configuration>
                    <jvmArgs>
                        <jvmArg>-Xms64m</jvmArg>
                        <jvmArg>-Xmx1024m</jvmArg>
                    </jvmArgs>
                    <scalaVersion>${scala.version}</scalaVersion>
                </configuration>
                <executions>
                    <execution>
                        <id>scala-compile</id>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                            <goal>testCompile</goal>
                        </goals>
                    </execution>
                </executions>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <executions>
                    <execution>
                        <phase>compile</phase>
                        <goals>
                            <goal>compile</goal>
                        </goals>
                    </execution>
                </executions>
                <configuration>
                    <source>1.6</source>
                    <target>1.6</target>
                </configuration>
            </plugin>


        </plugins>
    </build>

    <scm>
        <connection>scm:git:git@bitbucket.org:ssaasen/atlassian-scala-example-plugin.git</connection>
        <developerConnection>scm:git:ssh://git@bitbucket.org:ssaasen/atlassian-scala-example-plugin.git
        </developerConnection>
        <url>https://bitbucket.org/ssaasen/atlassian-scala-example-plugin</url>
    </scm>

    <issueManagement>
        <system>Bitbucket</system>
        <url>https://bitbucket.org/ssaasen/atlassian-scala-example-plugin/issues</url>
    </issueManagement>

    <properties>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <confluence.version>4.2-m8</confluence.version>
        <confluence.data.version>3.5</confluence.data.version>
        <amps.version>3.8</amps.version>
        <scala.version>2.9.1</scala.version>
        <template.renderer.version>1.3.1</template.renderer.version>
        <sal-api.version>2.7.0</sal-api.version>
        <jackson.version>1.9.1</jackson.version>
    </properties>

    <profiles>
        <profile>
            <id>production</id>
            <build>
                <plugins>
                    <plugin>
                        <groupId>org.apache.maven.plugins</groupId>
                        <artifactId>maven-jar-plugin</artifactId>
                        <version>2.2</version>
                        <configuration>
                            <finalName>${project.build.finalName}-complete</finalName>
                        </configuration>
                    </plugin>
                    <plugin>
                        <groupId>com.pyx4me</groupId>
                        <artifactId>proguard-maven-plugin</artifactId>
                        <executions>
                            <execution>
                                <phase>package</phase>
                                <goals>
                                    <goal>proguard</goal>
                                </goals>
                            </execution>
                        </executions>
                        <configuration>
                            <libs>
                                <lib>/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/classes.jar
                                </lib>
                                <lib>/System/Library/Java/JavaVirtualMachines/1.6.0.jdk/Contents/Classes/jsse.jar</lib>
                            </libs>
                            <includeDependency>false</includeDependency>
                            <injar>${project.build.finalName}-complete.jar</injar>
                            <outjar>${project.build.finalName}.jar</outjar>
                            <proguardInclude>${basedir}/proguard.conf</proguardInclude>
                            <maxMemory>1024m</maxMemory>
                            <skip>false</skip>
                        </configuration>
                        <dependencies>
                            <dependency>
                                <groupId>net.sf.proguard</groupId>
                                <artifactId>proguard</artifactId>
                                <version>4.7</version>
                                <scope>system</scope>
                                <systemPath>./vendor/proguard/4.7/proguard.jar</systemPath>
                            </dependency>
                        </dependencies>
                    </plugin>
                    <plugin>
                        <groupId>com.atlassian.maven.plugins</groupId>
                        <artifactId>maven-confluence-plugin</artifactId>
                        <version>3.8</version>
                        <extensions>true</extensions>
                        <configuration>
                            <productVersion>${confluence.version}</productVersion>
                            <productDataVersion>${confluence.data.version}</productDataVersion>
                            <extractDependencies>true</extractDependencies>
                        </configuration>
                    </plugin>
                </plugins>
            </build>
        </profile>

        <profile>
            <id>dev</id>
            <dependencies>
                <dependency>
                    <groupId>org.scala-lang</groupId>
                    <artifactId>jline</artifactId>
                    <version>${scala.version}</version>
                </dependency>
            </dependencies>
        </profile>
    </profiles>

    <!--
                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.confluence.plugins</groupId>
                            <artifactId>scala-2.9-provider-plugin</artifactId>
                            <version>0.2</version>
                        </pluginArtifact>

                    </pluginArtifacts>
    -->
</project>