My plugin needs a tiny graph database (Neo4j) support. May I add some Neo4j jar files in plugin?
"It’s easy to use Neo4j embedded in Java applications". <http://docs.neo4j.org/chunked/stable/tutorials-java-embedded.html>, but how to use Neo4j embedded in Confluence Plugin.
Thanks in advance,
Community moderators have prevented the ability to post new answers.
Embedding a third-party library within your plugin is pretty straight-forward. If you are using Maven to build your plugin, you just need to include the artifact as a dependency in Maven with a "compile" scope (which is the default). You'll have to add something like this to your pom.xml:
<dependency> <groupId>org.neo4j</groupId> <artifactId>neo4j</artifactId> <version>1.9.2</version> </dependency>
From this point you can just start writing code in your plugin that uses Neo4j. One thing you will need to do is pick a location on disk where the database file will be stored. In order to ensure that the contents of the database is backed up and restored by your Confluence administrator, you should store the database in the Confluence Home Directory (this is where Confluence stores attachments and other file system data).
There is a Java API you can use to determine where the administrator has configured the Home directory - https://developer.atlassian.com/pages/viewpage.action?pageId=2031784
The one caveat that I should mention up-front is that using and storing a database in the Confluence Home directory will make your plugin incompatible with Clustered licenses of Confluence, if that's what you are using.
I hope Atlssian will brinng a graph database Neo4j (embadded) to confluence as well. Thanks
How about if my third party lib of interest has transient dependencies on spring with version < or > atlassianContainer.SpringFrameworkVersion (e.g. the lib I am importing has transient dependencies for springframework.beans 3 but the one probvided by JIRA for example is 2.5.6.SEC2)
Hi Atlassian Community! My name is Owen and I work on Atlassian's Media Platform team. The Media Platform team handles the heavy lifting of managing uploads, serving images, attaching files and s...
Connect with like-minded Atlassian users at free events near you!Find an event
Connect with like-minded Atlassian users at free events near you!
Unfortunately there are no Community Events near you at the moment.Host an event
You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events