Skip to end of metadata
Go to start of metadata

These days, I find it sometimes easier to start Confluence in Maven rather than in IDEA when I want to reproduce test failures. It has a more standard classpath, for example, and matches the behaviour of Bamboo more closely.

Starting Confluence in Maven

Here's how:

# put the latest version into the local repo
mvn clean install -Dmaven.test.skip

# run the setup acceptance test to create the home directory in conf-webapp/target/confluence-home
mvn -o clean verify -Dtest=SetupAcceptanceTest -DfailIfNoTests=false

# start cargo with the Confluence installation created by the setup acceptance test
mvn -o verify -Pdebug -Dcargo.wait -Dmaven.test.skip -Dhttp.port=9000

Now you can run any acceptance test or tests in IDEA, pointed at this Confluence instance.

Configuring the tests in IDEA

If you're using port 9000 like in the example above, you'll need to change to set the port appropriately. The default is whatever some sloppy developer accidentally committed last – usually 8080.

When running the first acceptance test since you set up the instance, it needs to know what version of the functest plugin to install. Set the confluence.version system property in the VM settings of your test's run configuration to upload the right one:


The exception you'll get if you don't set this system property is: Could not find plugin file Confluence Functional Test Remote API (confluence-functestrpc-plugin:com.atlassian.confluence.plugins:null:jar) to upload
at com.atlassian.confluence.AbstractConfluenceAcceptanceTest.setUp(
at com.atlassian.confluence.AbstractConfluenceAcceptanceTest.setUp(
at com.atlassian.confluence.NotificationContentsAcceptanceTest.setUp(
at net.sourceforge.jwebunit.junit.WebTestCase.runBare(
at com.intellij.rt.execution.junit.JUnitStarter.main(
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(
at sun.reflect.DelegatingMethodAccessorImpl.invoke(
at com.intellij.rt.execution.application.AppMain.main(

The 'null' at the end of confluence-functestrpc-plugin:com.atlassian.confluence.plugins means you haven't specified the version number with the system property.


You can attach the debugger to Confluence on the port configured in the webapp POM, if you need to. I think it's 5005.

Warning: Sample Content
This is sample content that comes included with Confluence for the purposes of demonstrating how the product can be used.


demo demo Delete
example example Delete
build build Delete
confluence confluence Delete
maven maven Delete
development development Delete
Enter labels to add to this page:
Please wait 
Looking for a label? Just start typing.