How to set up staging environment for Confluence 6.x

Anders Lantz June 26, 2017

I´ve been following this guide: https://scriptrunner.adaptavist.com/latest/confluence/DevEnvironment.html#_customise_product_versions 

And I am able to get confluence up and running with the Scriptrunner version defined in pom.xml (<scriptrunner.version>4.3.13</scriptrunner.version>) but I am unable to get it to respect the confluence version I pick. I´ve tried with 

<confluence.version>6.0.7</confluence.version>
<confluence.data.version>6.0.7</confluence.data.version>

Because I fount that specific version here:

https://maven.atlassian.com/repository/public/com/atlassian/confluence/confluence-webapp/

After running sudo atlas-mvn confluence:debug in the same directory as pom.xml it starts setting up the environent and among many things this is logged:

Downloading: https://maven.atlassian.com/repository/public/com/atlassian/confluence/confluence/6.0.7/confluence-6.0.7.jar
.....
Downloaded: https://maven.atlassian.com/repository/public/com/atlassian/confluence/confluence-webapp/6.0.7/confluence-webapp-6.0.7.war (557770 KB at 2605.8 KB/sec)
[INFO] Copying confluence-webapp-6.0.7.war to /Users/anders/Documents/Scriptrunner for confluence/Adaptavist-scriptrunner-samples/confluence/test-plugin/target/confluence/confluence-original.war

But once Confluence is up and running it´s allways 5.10.4.

I am running on Mac OS  10.12.5 and atlassian-plugin-sdk-6.2.14

1 answer

0 votes
Anders Lantz June 26, 2017

My pom.xml file: 

 

?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>
    <parent>
        <groupId>com.adaptavist</groupId>
        <artifactId>scriptrunner-parent</artifactId>
        <version>7</version>
    </parent>

    <groupId>com.onresolve.scriptrunner.assets</groupId>
    <artifactId>sr-sample-plugin-confluence</artifactId>
    <version>1.0.4-SNAPSHOT</version>

    <organization>
        <name>Example Company</name>
        <url>http://www.example.com/</url>
    </organization>

    <name>Confluence Sample Plugin for ScriptRunner</name>
    <description>Sample plugin for ScriptRunner, has macros, script jobs etc</description>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <dependency>
            <groupId>com.onresolve.confluence.groovy</groupId>
            <artifactId>groovyrunner</artifactId>
            <version>${scriptrunner.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.10</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence</artifactId>
            <version>${confluence.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <version>1.1.3</version>
            <scope>provided</scope>
        </dependency>
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>org.codehaus.gmavenplus</groupId>
                <artifactId>gmavenplus-plugin</artifactId>
            </plugin>

            <plugin>
                  <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-confluence-plugin</artifactId>
                                <configuration>
                                        <!-- not sure why 8x is breaking confluence now -->
                    <containerId>tomcat7x</containerId>

                    <systemPropertyVariables>
                        <atlassian.dev.mode>${dev.mode}</atlassian.dev.mode>
                        <plugin.script.test.packages>com.onresolve.confluence.properties</plugin.script.test.packages>
                        <plugin.script.roots>
                            ${project.basedir}/src/main/resources,${project.basedir}/src/main/groovy,${project.basedir}/src/test/groovy
                        </plugin.script.roots>
                    </systemPropertyVariables>
                                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <dev.mode>false</dev.mode>
        <scriptrunner.version>4.3.13</scriptrunner.version>
        <confluence.version>6.0.7</confluence.version>
        <confluence.data.version>6.0.7</confluence.data.version>
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
    </properties>
</project>

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events