How to choose dependencies versions

Hi Community,

My app is compatible (tested) with Confluence versions from 7.13.6 to 9.02. Can you please give me some insights about which versions I should choose for dependencies? For example, ‘com.atlassian.upm.licensing-api’, ‘com.atlassian.upm.upm-api’, and ‘com.atlassian.sal.sal-api’.

Ideally you must use provided scope and no versions at all. Let the parent POM to manage the versions, this way:

    <dependencyManagement>
        <dependencies>
            <dependency>
                <groupId>com.atlassian.confluence</groupId>
                <artifactId>confluence-plugins-platform-pom</artifactId>
                <version>${confluence.version}</version>
                <type>pom</type>
                <scope>import</scope>
            </dependency>
        </dependencies>
    </dependencyManagement>
1 Like

Hi @JackNolddor,

Thank you very much for your suggestion!

As far as I see, ‘com.atlassian.upm.upm-api’ dependency is not included into the scope of ‘confluence-plugins-platform-pom’. But this dependency is required to perform plugin license validation. Do you have any idea how to add this dependency without setting a specific version?

Also, I noticed that ‘platform-public-api’ includes ‘upm-api’, but in this case, we need to set the platform version manually. I can’t find a clear mapping between Confluence versions and platform versions.

I have no concluding answer to your question, but at https://developer.atlassian.com/platform/marketplace/dc-apps-platform-7/ it is listed that Confluence 9 is based on Plattform 7.0 (and I assume that the latest release will work since Atlassian uses Semantic Versioning). It also states that Confluence 8.8 is based on Platform 6.5.

But as far as I can tell, you need to adjust the versions of the platform POMs manually.

This post Platform 7 upgrade in progress: Learn about the first highlights and changes - #4 by clouless (and the whole thread Platform 7 upgrade in progress: Learn about the first highlights and changes) may provide more information on how we are supposed to use dependencies with Confluence 9 / Platform 7.

1 Like

Hi @rr1 ,

Thank you very much for your answer!

As far as I know, we can’t have several artifacts of the same app that cover different Confluence versions. We aim to be compatible with all Confluence versions supported by Atlassian (Atlassian Support End of Life Policy | Atlassian Support | Atlassian Documentation) - from 7.19 to 9.0. I guess that 7.19 is based on Platform 6 (I am trying to figure out how to check it). Confluence 9.0 is Platform 7. Do you know how to set the platform version in this case?

We are currently using this dependency management:

      <dependencyManagement>
        <dependencies>
          <dependency>
            <groupId>com.atlassian.confluence</groupId>
            <artifactId>confluence-plugins-platform-pom</artifactId>
            <version>${confluence.version}</version>
            <type>pom</type>
            <scope>import</scope>
          </dependency>

          <dependency>
            <groupId>com.atlassian.platform.dependencies</groupId>
            <artifactId>platform-public-api</artifactId>
            <version>${platform.version}</version>
            <type>pom</type>
            <scope>import</scope>
          </dependency>
          <dependency>
            <groupId>com.atlassian.platform.dependencies</groupId>
            <artifactId>platform-deprecated-public-api</artifactId>
            <version>${platform.version}</version>
            <type>pom</type>
            <scope>import</scope>
          </dependency>
           ...

        </dependencies>
      </dependencyManagement>

I am not yet sure, if the older versions support platform 6 or if only some of the Version 8 are covered. We are currently working on finding out, what we need to change for V9 and bother whether we can still provide one version for all current Confluence versions later. So it seems you are way ahead of me … :smile:

Since with V9 you are supposed to bundle your dependencies with your app, I assume that this link may help:
https://developer.atlassian.com/server/confluence/get-your-apps-ready-for-gray-api-removal/

On the following threads you may find some hints on how others deal with the various questions on running an app on the different platform versions:

I hope this helps …