Page tree

Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

Document Properties Marker
overridefalse


Short DescriptionShows how to add the Apptools Maven Plugin to your Confluence add-on project.
Doctypetopichide
NameConfigure Use in App Project
Short Name
Parent
Parent Property
property-nameName
hide
Audience
Name List
doctyperole
render-no-hits-as-blanktrue
propertyAudience
empty-as-nonetrue

Subject
Name List
doctypesubject
propertySubject

Categories
Name List
doctypecategory
propertyCategories

Tags
Tag List
propertyTags

Flagshide
Iteration

Iteration
valuefinished

hide
Type
Name List
doctypetopic-type
render-no-hits-as-blanktrue
propertyType

Level of Experience
Name List
doctypeexperience-level
render-no-hits-as-blanktrue
propertyLevel of Experience

Expected Duration
Sponsors
Name List
doctypestakeholder
render-no-hits-as-blanktrue
propertySponsors

Sort KeyBASIC-0010-0010hide



Section
show-titlefalse
titleDescription

The following shows a configuration where the different target environments are configured with the POM file. This makes the different environments immediately accessible to users of the project.

Unfortunately this configuration lacks flexibility in case you administrate more than one project. In this case you may want to check the alternative configuration we show at the end of this tutorial.


Section
titleSummary


Section
titlePrerequisites

...

Section
titleBasic Configuration

Simply add the configuration to the POM file of your project.

projectdoc-content-marker
idbasic-config-xml


projectdoc-code-block-placeholder-macro
code-languageHTML and XML
code-titlepluginManagement in pom.xml
<build>
  ...
  <pluginManagement>
    <plugins>
      ...
      <plugin>
        <groupId>de.smartics.maven.plugin</groupId>
        <artifactId>apptools-maven-plugin</artifactId>
        <version>${project.version}</version>
        <configuration>
          <sourceFolder>\${basedir}/target</sourceFolder>
          <includes>
            <include>\${project.artifactId}$</include>
          </includes>
          <acceptedFilenameExtensions>
            <extension>obr</extension>
          </acceptedFilenameExtensions>
        </configuration>
      </plugin>
    </plugins>
  </pluginManagement>
  ...
</build>
Section
titleConfigure local Server

Then add profiles to configure the Confluence servers you want to deploy to.

The following shows the deployment to the locally started Confluence on a developer machine (with default password and user admin).

Code Block
languagexml
titleprofile in pom.xml
<profiles>
  <profile>
    <id>LOCAL</id>
    <activation>
      <activeByDefault />
    </activation>
    <build>
      <pluginManagement>
        <plugins>
          <plugin>
            <groupId>de.smartics.maven.plugin</groupId>
            <artifactId>apptools-maven-plugin</artifactId>
            <configuration>
              <username>admin</username>
              <password>admin</password>
              <serverUrl>http://localhost:1990/confluence</serverUrl>
            </configuration>
          </plugin>
        </plugins>
      </pluginManagement>
    </build>
  </profile>
  ...
</profiles>

Then deploy the OBR artifact to the local server by specifying the profile.

Code Block
mvn apptools:deploy -PLOCAL


Use the extension jar, if your app is not bundled in an OBR.


In case you want to deploy to a remote test server, add a profile like this:

Transclusion
render-document-name-as-headingtrue
taget-heading-level*
documentConfigure Servers
ids*,!p_for_build_profiles,!Resources,!References
tags!additional_help
Section
titleConfigure remote Server
Code Block
languagexml
titleprofile in pom.xml
    <profile>
      <id>TEST</id>
      <build>
        <pluginManagement>
          <plugins>
            <plugin>
              <groupId>de.smartics.maven.plugin</groupId>
              <artifactId>apptools-maven-plugin</artifactId>
              <configuration>
                <serverId>confluence-test</serverId>
                <serverUrl>${my.server.url.TEST}</serverUrl>
              </configuration>
            </plugin>
          </plugins>
        </pluginManagement>
      </build>
    </profile>

Provide the credentials and the URL to access the TEST server in your settings.xml.

Code Block
languagexml
title~/.m2/settings.xml
<settings> ... <servers> ... <server> <id>confluence-test</id> <username>jane.doe</username> <password>{HllO1A....}</password> </server> </servers> ... <profiles> <profile> <my.server.url.TEST>https://www.mycorp.example.com/confluence</my.server.url.TEST> </properties> </profile> ... </profiles> </settings>


Section
titleSubordinate Topics
Display Table
doctypetopic
render-no-hits-as-blanktrue
render-modedefinition
selectName, Short Description
restrict-to-immediate-childrentrue
sort-bySort Key, Name

...

Section
titleResources


Tour
render-no-hits-as-blanktrue
render-as-definition-listtrue
marker-column-property-nameTitle
replace-title-with-nametrue


TitleShort Description
Usage
Use in POM Project