atlas-create-home-zip

This page describes the shell script atlas-create-home-zip, part of the Atlassian Plugin SDK.

This command is only available in Atlassian Plugin SDK version 3.1 and later.

Basic usage

 atlas-create-home-zip - Creates a test-resources zip of the current application's home directory. This zip file can then be pointed to in the AMPS productDataPath property to auto-populate application data during startup.

Examples

Don't run the atlas-clean command during this process, until you get to the very end. Running atlas-clean before you have finished this configuration will delete the files that were created during this process!

Let's assume you want to prepopulate Jira with a few projects and issues for testing on every clean startup. First, run the application as you normally would using atlas-run. Next, use the Jira web interface to create your projects and issues. Stop Jira (CTRL+C). Finally, go to the root directory of your plugin and type:

1
2
atlas-create-home-zip

This will create a file called generated-test-resources.zip in the plugins target folder. Copy this file to a known location (such as, src/test/resources). Finally add:

1
2
<productDataPath>${basedir}/src/test/resources/generated-test-resources.zip</productDataPath>

to the <configuration/> of the jira-maven-plugin or confluence-maven-plugin in your pom.xml. The completed configuration should look something like this:

pom.xml

1
2
<plugin>
    <groupId>com.atlassian.maven.plugins</groupId>
    <artifactId>confluence-maven-plugin</artifactId>
    <version>${amps.version}</version>
    <extensions>true</extensions>
    <configuration>
        <productVersion>${confluence.version}</productVersion>
        <productDataVersion>${confluence.data.version}</productDataVersion>
        <!-- Add the productDataPath configuration here -->
        <productDataPath>${project.basedir}/src/test/resources/generated-test-resources.zip</productDataPath>
    </configuration>
</plugin>

Now every time you start Jira or Confluence using atlas-run or atlas-debug, the home directory will be prepopulated using the contents of the generated zip file.

Rate this page: