1. Setup the development environment
1.1. Clone the repository
First of all clone the Git repository to a local directory.
git clone https://github.com/nomisp/confluence-publisher-plugin.git
1.2. Import into IntelliJ
To import the project into IntelliJ, just go to: File > New… > Project from Existing Sources…
Choose the location of the local directory and continue importing from the Gradle model.
1.3. Local build
The project makes use of a Gradle wrapper. To build the project just make use of the standard tasks. e.g.
gradlew clean build
To run the tests (unit and functional tests) execute:
gradlew check
| In order run the functional tests, Confluence cloud can be used (see Confluence-Cloud) |
| For the functional tests don’t use the Confluence-API token in plain text. Therefore the credentials-plugin can be used to add the token into the encrypted properties file and retrieve it afterwards from there. The description of the credentials plugin can be found here. |
gradlew addCredentials --key confluenceToken --value <tokenValue>
2. Publish the documentation to GitHub-Pages
To publish the project documentation to GitHub pages just run:
gradlew asciidoctor gitPublishPush
| The GitHub token used to publish the documentation to GitHub has to be encrypted using the credentials-plugin. The description of the credentials plugin can be found here. |
gradlew addCredentials --key githubToken --value <tokenValue>
3. Locally try out the plugins
To try out the plugin in another project, the plugin can be published to the local maven repository.
gradlew publishToMavenLocal
In the console output the version will be printed out and can be used in the projects where they should be tried out.