Last updated Apr 19, 2024

Configure AMPS to run Jira Core with additional applications installed

Available:

Atlassian AMPS 8.0.0 and later.

Overview

Add-ons that integrate with functionality provided by applications, such as Jira Software or Jira Service Desk, need to run their tests against a Jira instance with those applications installed. This document describes how it can be done using AMPS's new configuration tag: applications. You'll also find some advanced examples that illustrate how this feature can be used to test add-ons with complicated dependencies and complex AMPS configurations.

Configuring applications

Atlassian AMPS 8.0.0 and above supports a new element: applications. This element defines a list of additional applications that should be installed on another tested product. For example, the following configuration will install Jira Software and Jira Service Desk on top of Jira Core:

1
2
<plugin>
    <groupId>com.atlassian.maven.plugins</groupId>
    <artifactId>jira-maven-plugin</artifactId>
    <configuration>
        <applications>
            <application>
                <applicationKey>jira-software</applicationKey>
                <version>${jira.software.application.version}</version>
            </application>
            <application>
                <applicationKey>jira-servicedesk</applicationKey>
                <version>${jira.servicedesk.application.version}</version>
            </application>
        </applications>
    </configuration>
</plugin>

For each application that should be installed, you must define an application element that has the following two child elements:

  • applicationKey -- identifies the application to be installed
  • version -- defines the version of the application to be installed

If more than one application is defined, the product will run with all defined applications installed. Applications are installed into the product's home directory, so changing application versions or removing an application from the applications list may require you to run mvn clean.

Advanced configurations

There are three important characteristics of the applications element that makes this feature quite flexible:

  • The <applications> element can be applied on both the global configuration level and the per product element. For example, you could configure it like this:

    1
    2
    <plugin>
        <groupId>com.atlassian.maven.plugins</groupId>
        <artifactId>amps-maven-plugin</artifactId>
        <configuration>
            <products>
                <product>
                    <id>jira</id>
                    <instanceId>jira</instanceId>
                    <version>${jira.version}</version>
                    <applications>
                        <application>
                            <applicationKey>jira-software</applicationKey>
                            <version>${jira.software.application.version}</version>
                        </application>
                    </applications>
                </product>
                <product>
                     <id>confluence</id>
                     <instanceId>confluence</instanceId>
                     <version>${confluence.version}</version>
                </product>
            </products>
        </configuration>
    </plugin>
    
  • Application keys are defined per product Id. This means that, for example, jira-software is defined for the product jira and will be ignored by confluence. As a result, the following example config will work the same as the previous one:

    1
    2
    <plugin>
        <groupId>com.atlassian.maven.plugins</groupId>
        <artifactId>amps-maven-plugin</artifactId>
        <configuration>
            <applications>
                <application>
                    <applicationKey>jira-software</applicationKey>
                    <version>${jira.software.application.version}</version>
                </application>
            </applications>
            <products>
                <product>
                    <id>jira</id>
                    <instanceId>jira</instanceId>
                    <version>${jira.version}</version>
                </product>
                <product>
                     <id>confluence</id>
                     <instanceId>confluence</instanceId>
                     <version>${confluence.version}</version>
                </product>
            </products>
        </configuration>
    </plugin>
    
  • Applications can be added to products that have already been defined, by using a Maven profile. See the example below.
    Note, this only applies to the configuration level, not the product level. At the product level, you must repeat the entire <products> element.

    1
    2
    <plugins>
        <plugin>
            <groupId>com.atlassian.maven.plugins</groupId>
            <artifactId>amps-maven-plugin</artifactId>
            <configuration>
                <products>
                    <product>
                        <id>jira</id>
                        <instanceId>jira</instanceId>
                        <version>${jira.version}</version>
                    </product>
                    <product>
                         <id>confluence</id>
                         <instanceId>confluence</instanceId>
                         <version>${confluence.version}</version>
                    </product>
                </products>
            </configuration>
        </plugin>
    </plugins>
    <profiles>
        <profile>
            <id>jira7</id>
            <plugins>
                <plugin>
                    <groupId>com.atlassian.maven.plugins</groupId>
                    <artifactId>amps-maven-plugin</artifactId>
                    <configuration>
                        <applications>
                                <application>
                                    <applicationKey>jira-software</applicationKey>
                                    <version>${jira.software.application.version}</version>
                                </application>
                            </applications>
                    </configuration>
                </plugin>
            </plugins>
        </profile>
    </profiles>
    

Rate this page: