Platform 7 upgrade in progress: Learn about the first highlights and changes

:one: :orange_square: Could you please answer my Plattform 7 question regarding OSGI Imports for Log4J+HttpClient+CommonsLogging+Slf4j, thanks:



:two: :white_check_mark: I followed the REST V2 notes and got it working

  • Tested in official Docker image Confluence 9.0.0-m8
  • BUT I get this error in my unit tests:
java.lang.RuntimeException: java.lang.ClassNotFoundException: org.glassfish.jersey.internal.RuntimeDelegateImpl
  • Should I go with these dependencies (below) to make it work?
  • What is the correct sope for all these dependencies?
  • Should jersey-common be scope=test?
  • Should the javax.servlet:javax.servlet-api pulled in by atlassian-rest-v2-api be excluded, because the enforcer plugin complained?
  • How can I even “see/test” that my REST API is now V2?
  • Why did my v1 REST App (before I made these changes) work in Confluence 9.0.0-m8?
  • I get errors for @JsonProperty and @JsonAutoDetect, what is the replacement?
    • Can I safely use: org.codehaus.jackson:jackson-core-asl:1.9.13 to make it work?
        <!-- CONFLUENCE 9 REST V2 ADD -->
        <dependency>
            <groupId>jakarta.ws.rs</groupId>
            <artifactId>jakarta.ws.rs-api</artifactId>
            <version>2.1.6</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-v2-api</artifactId>
            <version>7.2.0</version>
            <scope>compile</scope>
            <exclusions>
                <exclusion>
                    <groupId>javax.servlet</groupId>
                    <artifactId>javax.servlet-api</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>org.glassfish.jersey.core</groupId>
            <artifactId>jersey-common</artifactId>
            <version>2.22.2</version>
            <scope>test</scope>
        </dependency>
        <!-- CONFLUENCE 9 REST V2 REMOVE
            <dependency>
                <groupId>javax.ws.rs</groupId>
                <artifactId>jsr311-api</artifactId>
                <version>1.1.1</version>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>javax.xml.bind</groupId>
                <artifactId>jaxb-api</artifactId>
                <scope>provided</scope>
            </dependency>
            <dependency>
                <groupId>com.atlassian.plugins.rest</groupId>
                <artifactId>atlassian-rest-common</artifactId>
                <scope>provided</scope>
            </dependency>
        -->
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-annotations</artifactId>
            <version>2.16.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-core</artifactId>
            <version>2.16.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <!-- For @JsonAutodetect and @JsonProperty -->
            <groupId>org.codehaus.jackson</groupId>
            <artifactId>jackson-core-asl</artifactId>
            <version>1.9.13</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.core</groupId>
            <artifactId>jackson-databind</artifactId>
            <version>2.16.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-xml</artifactId>
            <version>2.16.1</version>
            <scope>compile</scope>
        </dependency>
        <dependency>
            <groupId>com.fasterxml.jackson.dataformat</groupId>
            <artifactId>jackson-dataformat-yaml</artifactId>
            <version>2.16.1</version>
            <scope>compile</scope>
        </dependency>


:three: :orange_square: Please clarify if this is correct, regarding the boms:

Confluence 9:

...
<confluence.version>9.0.0-m08</confluence.version>
<platform.version>7.0.0-m14</platform.version>
..
        <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>

Confluence 8.8

...
<confluence.version>8.8.0-beta1</confluence.version>
<platform.version>6.5.5</platform.version>
..
        <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>

Is this correct?


Thanks a lot :slight_smile:

2 Likes