Confluence Server/Datacenter plugin development on macOS?

I am trying to follow instructions on the Atlassian Developer site for Confluence Server plugins development (I know Confluence server is deprecated, but I need to develop for Confluence Datacenter and that means I need to develop for Confluence Server on macOS).

I installed the right JDK, installed the macOS SDK for Atlassian, adapted my environment so PATH and JAVA-HOME exist and tried to create an initial project:

% atlas-create-confluence-plugin
Cannot find /Applications/Atlassian/atlassian-plugin-sdk-8.2.7/apache-maven-3.5.4/bin/man
This file is needed to run this program

(I had to chmod +x the scripts in the Atlassian SDK bin directory)

I installed maven3 using MacPorts, but that does not change anything.

Trying to find instructions on Atlassian’s Dev site is hard. Most of the time you are somehow rerouted to Jira, even if you are only interested in Confluence.

Can someone tell me what I need to develop a plugin? For one, I do not have a Confluence installation, I’ll need one for testing and I guess it isn’t part of the SDK…

(I started out in Confluence Cloud until I found out that JS plugin will not be usable in Confluence Datacenter). Now I’m back to the start to see how I can get development of a plugin. My project is a ‘spike’ kind of project, I’m looking at feasibility of developing a plugin for what I want — as far as I’ve seen, this is doable, but I need to try it for real). The alternative is to fully develop a Confluence Cloud plugin and then when I succeed do a total rewrite for Confluence Datacenter somehow.

I was able to get this working.

% atlas-create-jira-plugin
  • Fails (not found) because all commands do not have the execute bit set
% chmod +x /Applications/Atlassian/atlassian-plugin-sdk-8.2.7/bin/*
% atlas-create-jira-plugin
Cannot find /Applications/Atlassian/atlassian-plugin-sdk-8.2.7/apache-maven-3.5.4/bin/mvn
This file is needed to run this program
% chmod +x /Applications/Atlassian/atlassian-plugin-sdk-8.2.7/apache-maven-3.5.4/bin/*

Apparently, if you are not an admin user (which is wise not be) the SDK does not install properly (no execute bits) and you have to fix it by hand.

Step 10 from https://developer.atlassian.com/server/framework/atlassian-sdk/create-a-confluence-hello-world-macro/ says:

Monitor the window where confluence was run originally and confirm that QuickReload finished loading. You should see a confirmation message:

This does not show up

When trying to start with JAVA_HOME set to Java 8, it hangs on atlas-run. I removed Java 8 to fall back on the MacPorts installed OpenJDK11. I will be running with Java 11 even if the Confluence environment complains (at least it runs).

With that I was able to compile and install and use the standard Hello World macro plugin.