Confluence 8 server helloworld application not working

Arikrishnan October 25, 2023

Hello Guys,

I have a confluence helloworld application macro that is not working fine in Confluence version 8.x 

Now I am going to upgrade my macro to support confluence 8.x (8.5.0), I am facing a few issues while upgrading it.

After updating all the plugins to the latest version, when I run atlas-run I get confluence running but macro not showing.

You can find the pom.xml file below.


<?xml version="1.0" encoding="UTF-8"?>
<modelVersion>4.0.0</modelVersion>
<groupId>com.prolaborate.macros</groupId>
<artifactId>myConfluenceMacro</artifactId>
<version>3.4</version>
<organization>
<name>Prolaborate Pvt Ltd</name>
</organization>
<name>prolaboratemacro</name>
<description>Prolaborate macro for Confluence lets you create dynamic and self-refreshing Sparx Enterprise Architect Model based pages in Confluence.</description>
<packaging>atlassian-plugin</packaging>
<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>
<dependencies>
<dependency>
<groupId>javax.xml.bind</groupId>
<artifactId>jaxb-api</artifactId>
<version>2.3.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.sal</groupId>
<artifactId>sal-api</artifactId>
<version>4.4.4</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.templaterenderer</groupId>
<artifactId>atlassian-template-renderer-api</artifactId>
<version>5.0.0-m03</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.13.2</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.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>compile</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-runtime</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
<artifactId>javax.servlet-api</artifactId>
<version>4.0.1</version>
<scope>provided</scope>
</dependency>
<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.9.1</version>
</dependency>
<dependency>
<groupId>com.atlassian.plugins.rest</groupId>
<artifactId>atlassian-rest-common</artifactId>
<version>7.0.13</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.auth0</groupId>
<artifactId>java-jwt</artifactId>
<version>4.0.0</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.15.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.15.2</version>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-annotations</artifactId>
<version>2.15.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
<artifactId>log4j</artifactId>
<version>1.2.17</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.h2database</groupId>
<artifactId>h2</artifactId>
<scope>runtime</scope>
</dependency>
<dependency>
<groupId>hsqldb</groupId>
<artifactId>hsqldb</artifactId>
<version>1.8.0.10</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>confluence-maven-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${confluence.version}</productVersion>
<productDataVersion>${confluence.data.version}</productDataVersion>
<enableQuickReload>true</enableQuickReload>
<enableFastdev>false</enableFastdev>
<compressJs>false</compressJs>
<compressResources>false</compressResources>
<!-- See here for an explanation of default instructions: -->
<instructions>
<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
<!-- Add package to export here -->
<Export-Package>
com.prolaborate.macros.api,
</Export-Package>
<!-- Add package import here -->
<Import-Package>
org.springframework.osgi.*;resolution:="optional",
org.eclipse.gemini.blueprint.*;resolution:="optional",
*
</Import-Package>
<includeExclude>-com.atlassian.plugin.spring.scanner.annotation.*</includeExclude>
<!-- Ensure plugin is spring powered -->
<Spring-Context>*</Spring-Context>
</instructions>
<containerId>${containerId}</containerId>
<jvmArgs>${jvm.args}</jvmArgs>
<systemPropertyVariables>
<webdriver.browser>${webdriver.browser}</webdriver.browser>
<atlassian.dev.mode>${atlassian.dev.mode}</atlassian.dev.mode>
</systemPropertyVariables>
</configuration>
</plugin>
<plugin>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<executions>
<execution>
<goals>
<goal>atlassian-spring-scanner</goal>
</goals>
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<scannedDependencies>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-external-jar</artifactId>
</dependency>
</scannedDependencies>
<verbose>false</verbose>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<confluence.version>8.6.0</confluence.version>
<confluence.data.version>8.6.0</confluence.data.version>
<amps.version>8.9.2</amps.version>
<plugin.testrunner.version>1.2.3</plugin.testrunner.version>
<atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
<!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.source>11</maven.compiler.source>
<maven.compiler.target>11</maven.compiler.target>
<jvm.args.custom/>
<!-- Allows to specify custom arguments in build scripts -->
<jvm.args.xmx>1024m</jvm.args.xmx>
<jvm.args>-Xmx${jvm.args.xmx} ${jvm.args.custom}</jvm.args>
<containerId>tomcat9x</containerId>
<webdriver.browser>chrome</webdriver.browser>
<atlassian.dev.mode>false</atlassian.dev.mode>
</properties>
</project>

I'm not sure what I'm missing, so if anyone can help, that would be great.

Please let me know if you require any additional details from my end.

Any support you can give would be greatly appreciated.

2 answers

0 votes
Arikrishnan October 25, 2023

  

0 votes
Andrii Maliuta
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2023

Hello @Arikrishnan ,

WHat is the error message in logs ?

As a side note: you use Spring Scanner 1.X that is outdated - you should use 2.X at least for Confluence 8.X.

Arikrishnan October 25, 2023

Hello @Andrii Maliuta 

Thank you for your prompt reply.

As you mentioned, I have updated  Spring Scanner to version 2.1.5.

After updating the Spring Scanner version now i am facing another issue.

image.png

Please let me know if you require any additional details from my end.

I appreciate you taking my request into account.

Like Andrii Maliuta likes this
Andrii Maliuta
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
October 25, 2023

@Arikrishnan ,

Please read the docs of https://bitbucket.org/atlassian/atlassian-spring-scanner/src/master/ - you need to adjust the code acc. to new requirements. E.g. '@Scanned' should not be there, Maven dependency of  'atlassian-spring-scanner-annotation' to be <scope>provided</scope>, etc.

There are some changes to be done for the new versions :) 

Suggest an answer

Log in or Sign up to answer
DEPLOYMENT TYPE
SERVER
VERSION
8.5.0
TAGS
AUG Leaders

Atlassian Community Events