Skip to content

lucapino/confluence-maven-plugin

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

44 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Maven Confluence Plugin


Maven plugin for accessing Atlassian Confluence

Plugin documentation can be found at https://lucapino.github.io/confluence-maven-plugin

Available goals:

  • add-page - adds new page (with attachments) and optionally exports it
  • add-blog-entry - adds new blog entry
  • add-comment - adds comment to existing page
  • add-attachment - adds attachment to existing page
  • export-page - exports existing page to several supported formats (pdf, doc)
  • update-page - updates existing page and optionally exports it

Example plugin definition:

<plugin>
    <groupId>it.peng.maven.plugin</groupId>
    <artifactId>confluence-maven-plugin</artifactId>
    <version>2.0.1</version>
    <configuration>
        <serverId>confluence-server</serverId>
        <url>https://confluence.example.org/confluence/ </url>
    </configuration>
</plugin>

Example add-page goal configuration:

<configuration>
    <parent>
        <space>Example Space</space>
        <title>Parent page name</title>
    </parent>
    <pageTitle>Hello world</pageTitle>
    <inputFile>${basedir}/pagetemplate.txt</inputFile>
    <outputFile>${basedir}/HelloWorld.pdf</outputFile>
    <attachments>
        <value>${basedir}/image.gif</value>
        <value>${basedir}/document.doc</value>
    </attachments>
</configuration>

Example add-blog-entry goal configuration:

<configuration>
    <space>Example space</space>
    <entryTitle>My First Post</entryTitle>
    <entryFile>${basedir}/blogentry.txt</entryFile>
</configuration>

Example add-comment goal configuration:

<configuration>
    <page>
        <space>Example space</space>
        <title>My comments</title>
    </page>
    <commentBody>${basedir}/comment.txt</commentBody>
</configuration>

Example add-attachment goal configuration:

<configuration>
    <page>
        <space>Example space</space>
        <title>My attachments</title>
    </page>
    <comment>Add attachment example</comment>
    <attachments>
        <value>${basedir}/document.pdf</value>
        <value>${basedir}/picture.png</value>
    </attachments>
</configuration>

Example export-page goal configuration:

<configuration>
    <page>
        <space>Example space</space>
        <title>My page</title>
    </page>
    <outputFile>${basedir}/MyPage.pdf</outputFile>
</configuration>

Example update-page goal configuration:

<configuration>
    <parent>
        <space>Example Space</space>
        <title>Parent page name</title>
    </parent>
    <pageTitle>Hello world</pageTitle>
    <inputFile>${basedir}/pagetemplate.txt</inputFile>
    <outputFile>${basedir}/HelloWorld.pdf</outputFile>
</configuration>

About

Maven plugin for accessing Atlassian Confluence

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages

  • Java 100.0%