Versions Compared
compared with
Key
- This line was added.
- This line was removed.
- Formatting was changed.
Add Metadata to your app
Info |
---|
If you have already written your own Confluence app, follow steps 1 to 4 to set up your local repository in such a way that you'll be able to implement a backend integration with Metadata. Alternatively, if you have not written your own app yet, perform steps 1 and 2 and move to the step Quick Start at the bottom to start with an example. |
1. Download the following files
Java API: metadata-api-2.11.0.jar
Java API documentation: metadata-api-2.11.0-javadoc.jar
2. Add the files to your Maven repository
There are two possibilities to install the library files. Either install them in a local Maven repository or deploy them to a hosted Maven repository.
Install in the local Maven repository
Code Block | ||
---|---|---|
| ||
mvn install:install-file -Dfile=metadata-api-2.11.0.jar -DgroupId=de.communardo.confluence.plugins -DartifactId=metadata-api -Dversion=2.11.0 -Dpackaging=jar -Djavadoc=metadata-api-2.11.0-javadoc.jar |
Deploy to a hosted Maven repository
Code Block |
---|
mvn deploy:deploy-file -Dfile=metadata-api-2.11.0.jar -DgroupId=de.communardo.confluence.plugins -DartifactId=metadata-api -Dversion=2.11.0 -Dpackaging=jar -Djavadoc=metadata-api-2.11.0-javadoc.jar -DrepositoryId=<id-to-map-on-server-section-of-settings.xml> -Durl=<url-of-the-repository-to-deploy> |
3. Include the Metadata API in your Add-On pom.xml
Code Block | ||
---|---|---|
| ||
<dependency> <groupId>de.communardo.confluence.plugins</groupId> <artifactId>metadata-api</artifactId> <version>2.11.0</version> <scope>provided</scope> </dependency> |
4. Import metadata components to your atlassian-plugin.xml
Code Block | ||
---|---|---|
| ||
<component-import key="metadataManager" interface="com.communardo.confluence.metadata.service.MetadataManager" /> |
5. Make sure the Metadata for Confluence app is already installed on your Confluence system.
Anchor | ||||
---|---|---|---|---|
|
Quick start
You can also use the attached example integration app code to have a quick start
Include Page | ||||
---|---|---|---|---|
|