Page tree

Versions Compared

Key

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

...

Section
titleConfigure local Server

Add build 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).

Content Marker
idlocal-server-xml
tagsxml
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>

Deploy the OSGi Bundle Repository (OBR) artifact to the local server by specifying the build profile.

Code Block
languagetext
themeMidnight
mvn apptools:deploy -PLOCAL

...

Section
titleConfigure remote Server

In case you want to deploy to a remote test server, add a build profile.

Content Marker
idremote-server-config-pom-xml
tagsxml
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 uniform resource locator (URL) to access the TEST server in your Maven Settings file.

Content Marker
idremote-server-config-settings-xml
tagsxml
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>

Since the POM is bundled with your artifact, the URL to the test systems is not be revealed, if specified as a property provided with the settings file. This way it is also easier to change the URL for all your projects without the need to update each POM individually.

Section
titleDeploy to remote Server

Deploy the OBR artifact to the remote test server by specifying the build profile.

Code Block
languagetext
themeMidnight
mvn apptools:deploy -PTEST

...