How to disable Collaborative Editing via AMPS when developing

Hi there,

since Confluence 6 release I always have to disable collaborative editing manually if I want my development experience somewhat bearable. I was wondering if there is any configuration setting inside my pom.xml to tell the maven-confluence-plugin to start the Confluence instance with collaborative editing disabled by default.

Thanks,

3 Likes

I’m looking for an answer to the same question in Disable Synchrony with System Property in Confluence Plugin SDK. There is some information that didn’t help me to fix it, but maybe it is clue enough for your configuration …

1 Like

I’ll check it out. Ta

Hi,
you can set the following system properties when starting your Confluence with the SDK:

<atlassian.darkfeature.site-wide.synchrony.opt-in.disable>true</atlassian.darkfeature.site-wide.synchrony.opt-in.disable>
<atlassian.darkfeature.site-wide.shared-drafts.disable>true</atlassian.darkfeature.site-wide.shared-drafts.disable>

Put that into systemPropertyVariables or pass it with -D and collab editing is inactive after startup.
Cheers, Christoffer

6 Likes

Thanks Christoffer!!

I’ll give it a go first thing on Monday!

Cheers,
Angel

Hi Christoffer,

It worked like a charm. I wonder how did you find out about it.

This is what I added in my pom.xml:


    ...
    <build>
        <plugins>
            <plugin> 
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-confluence-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <jvmArgs>${jvm.args}</jvmArgs>
                    <productVersion>${product.version}</productVersion>
                    <productDataVersion>${product.version}</productDataVersion>
                    <systemPropertyVariables>
                        ...
                        <atlassian.darkfeature.site-wide.synchrony.opt-in.disable>true</atlassian.darkfeature.site-wide.synchrony.opt-in.disable>
                        <atlassian.darkfeature.site-wide.shared-drafts.disable>true</atlassian.darkfeature.site-wide.shared-drafts.disable>
                    </systemPropertyVariables>
                ...
2 Likes

Glad it helped - we use this to start a set of acceptance tests without collab editing (and another set with collab editing). I read the code of SharedDraftsDarkFeatureHelper to find out (and having a look at

<baseUrl>/admin/darkfeatures.action 

is also helpful).
Cheers, Chris

2 Likes

I’m wondering if there’s a way to make Synchrony just work in development, instead of having to disable it every time, since testing your add-on with collaborative editing is also important, and is currently a big pain.

I don’t understand what you want to achieve -
when you use the above approach you can start a server without collab editing. If you leave those configurations out you will start it with collab editing. This can be used with a SDK server (confluence:debug) as well as with a standlone server.
Use different servers to test with and without … you can use Maven profiles to have the different configurations ready.

Hi!
Looks like this does not work with Confluence 6.4 anymore. Does it happen to you too?
Cheers

Hi, angel - it still works for me. I just started a fresh Confluence 6.4 with this configuration using the SDK and it worked. Collaborative editing is “off” and Syncrony is shown as “Not required”. Quickly checking the editor confirmed that (no Synchrony to be seen).
Cheers

1 Like

You are correct. It still works. Not sure what happened ¯_(ツ)_/¯
Thanks Chris!