Migrating SpaceBlueprint to Confluence 9

Hi, I’m trying to migrate the Keysight plugins to Confluence 9 (yeah, I’m quite late and many of the users have let me know.)

I’m currently stuck with a space blueprint. I have an event listener which is throwing an error:

java.lang.NoClassDefFoundError: com/atlassian/confluence/plugins/createcontent/api/blueprint/SpaceBlueprint

I believe that class is provided by the com.atlassian.confluence.plugins.confluence-create-content-plugin declared in my plugin’s pom

        <dependency>
            <groupId>com.atlassian.confluence.plugins</groupId>
            <artifactId>confluence-create-content-plugin</artifactId>
            <scope>provided</scope>
        </dependency>

I’m not sure if that should be provided or compiled. When I try provided, I can get the plugin to wake up and create a space, but there is an error thrown. For compiled, I get lost in a missing dependency maze.

In order to get the plugin to load, I’ve declared the following optional resolution in the pom:

When the plugin loads, I do see the following warning:

[INFO] [talledLocalContainer] 08:12:35,085 WARN [QuickReload - Plugin Installer] [hook.dmz.DmzResolverHook] filterMatches Package com.atlassian.confluence.plugins.createcontent.api.blueprint is internal and is not available for export to plugin com.keysight.test-ecosystem

The code that is generating the error in the event listener is this:

        if (!BLUEPRINT_KEY.getCompleteKey().equals(event.getSpaceBlueprint().getModuleCompleteKey())) {
            return;
        }
'''

Is specifically the "event.getSpaceBlueprint().getModuleCompleteKey()" as the object returned from "event.getSpaceBlueprint()" should be a SpaceBluerprint object, but the definition of that class is not being resolved.
Any suggestions on the right way to navigate this?

Hi Scott,

Have you checked the Preparing for Confluence 9.0 - EAP out now post? There is a comment by rr1(Preparing for Confluence 9.0 - EAP out now - #568 by rr1) who seems to have had the similar problem…

The solution was to add this snippet here:

<dependency>
      <groupId>com.atlassian.confluence.plugins</groupId>
      <artifactId>confluence-create-content-api</artifactId>
    </dependency>

But I suggest you read the comments yourself to get the full background of the solution.

Regards,
Christian