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,
jxm894
Community moderators have prevented the ability to post new answers.
Hi,
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.
-- from <https://github.com/neo4j-contrib/neo4j-mobile-android>
I hope Atlssian will brinng a graph database Neo4j (embadded) to confluence as well. Thanks
-jxm894
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi,
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)
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
What are the options if we want to make it compatible with clustered instances?
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.