Hi I’ve got a jira plugin that I’ve been using atlas-integration-test to execute my wired integration tests on for years. I just upgraded the plugin to version 8 of Jira, AMPS, and 2.0.1 of plugin testrunner. Now whenever I run atlas-integration-test it loads the refapp instead of what is configured in the pom, ie:
[INFO] --- amps-maven-plugin:8.0.0:integration-test (default-cli) @ myplugin ---
[INFO] artifact com.atlassian.refapp:atlassian-refapp: checking for updates from atlassian-public
[INFO] artifact com.atlassian.refapp:atlassian-refapp: checking for updates from atlassian-plugin-sdk
[INFO] artifact com.atlassian.refapp:atlassian-refapp: checking for updates from central
[INFO] determining latest stable product version...
[INFO] using latest stable product version: 5.0.0
[INFO] Configured Artifact: com.atlassian.refapp:atlassian-refapp:5.0.0:war
I can force it to use jira via the product flag, and even the version via the corresponding flag to atlas-integration-test, but even then it isn’t picking up my prepackaged configuration/state of the application contained in the productDataPath in my pom.
Here is an example of my pom:
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>mygroup</groupId>
<artifactId>myplugin</artifactId>
<version>1.0.0</version>
<name>myplugin</name>
<packaging>atlassian-plugin</packaging>
<dependencies>
<dependency>
<groupId>com.atlassian.jira</groupId>
<artifactId>jira-api</artifactId>
<version>${jira.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-annotation</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>javax.inject</groupId>
<artifactId>javax.inject</artifactId>
<version>1</version>
<scope>provided</scope>
</dependency>
<!-- The following 2 deps are for marketplace licensing -->
<dependency>
<groupId>com.atlassian.upm</groupId>
<artifactId>licensing-api</artifactId>
<version>2.0.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.atlassian.upm</groupId>
<artifactId>upm-api</artifactId>
<version>2.0.1</version>
<scope>provided</scope>
</dependency>
<!-- WIRED TEST RUNNER DEPENDENCIES -->
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>4.10</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.atlassian.plugins</groupId>
<artifactId>atlassian-plugins-osgi-testrunner</artifactId>
<version>${plugin.testrunner.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>javax.ws.rs</groupId>
<artifactId>jsr311-api</artifactId>
<version>1.1.1</version>
<scope>provided</scope>
</dependency>
<dependency>
<groupId>com.google.code.gson</groupId>
<artifactId>gson</artifactId>
<version>2.2.2-atlassian-1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.apache.httpcomponents</groupId>
<artifactId>httpclient</artifactId>
<version>4.3.3</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-core</artifactId>
<version>2.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.fasterxml.jackson.core</groupId>
<artifactId>jackson-databind</artifactId>
<version>2.4.0</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.javatuples</groupId>
<artifactId>javatuples</artifactId>
<version>1.2</version>
<scope>test</scope>
</dependency>
</dependencies>
<build>
<plugins>
<plugin>
<groupId>com.atlassian.maven.plugins</groupId>
<artifactId>jira-maven-plugin</artifactId>
<version>${amps.version}</version>
<extensions>true</extensions>
<configuration>
<productVersion>${jira.version}</productVersion>
<productDataVersion>${jira.version}</productDataVersion>
<productDataPath>${basedir}/src/test/resources/generated-test-resources-${jira.version}.zip</productDataPath>
<log4jProperties>src/log/log4j.properties</log4jProperties>
<jvmArgs>-Xms384m -Xmx768m</jvmArgs>
<products>
<product>
<id>jira</id>
<instanceId>jiraExpected</instanceId>
<productDataVersion>${jira.version}</productDataVersion>
</product>
</products>
<enableQuickReload>true</enableQuickReload>
<instructions>
<Atlassian-Plugin-Key>${atlassian.plugin.key}</Atlassian-Plugin-Key>
<!-- Add package to export here -->
<Export-Package>
</Export-Package>
<!-- Add package import here -->
<Import-Package>
!org.springframework.osgi.service.exporter.support.*,
org.springframework.osgi.*;resolution:=optional,
org.eclipse.gemini.blueprint.*,
*
</Import-Package>
<!-- Ensure plugin is spring powered -->
<Spring-Context>*</Spring-Context>
</instructions>
<testGroups>
<testGroup>
<id>it</id>
<productIds>
<productId>jira</productId>
</productIds>
<includes>
<include>it/**/*.java</include>
</includes>
</testGroup>
</testGroups>
<!-- The following fixes the "no runnable methods" JUNIT error see:
https://answers.atlassian.com/questions/187410/not-able-to-run-tests-in-plugin-test-console -->
<testBundleExcludes>
<testBundleExclude>
<groupId>atlassian</groupId>
</testBundleExclude>
<testBundleExclude>
<groupId>junit</groupId>
<artifactId>junit-dep</artifactId>
</testBundleExclude>
</testBundleExcludes>
</configuration>
</plugin>
<plugin>
<groupId>com.atlassian.plugin</groupId>
<artifactId>atlassian-spring-scanner-maven-plugin</artifactId>
<version>${atlassian.spring.scanner.version}</version>
<executions>
<execution>
<goals>
<goal>atlassian-spring-scanner</goal>
</goals>
<!-- process-classes seems to be skipped if you are using scala
so perhaps use prepare-package -->
<phase>process-classes</phase>
</execution>
</executions>
<configuration>
<!-- Enable this to get build-time logging of annotations atlassian-spring-scanner-maven-plugin has noticed -->
<verbose>true</verbose>
</configuration>
</plugin>
<plugin>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.3</version>
<configuration>
<source>1.6</source>
<target>1.6</target>
</configuration>
</plugin>
</plugins>
</build>
<properties>
<jira.version>8.0.1</jira.version>
<amps.version>8.0.0</amps.version>
<plugin.testrunner.version>2.0.1</plugin.testrunner.version>
<atlassian.spring.scanner.version>2.1.7</atlassian.spring.scanner.version>
<atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
</properties>
</project>
Greatly appreciate any help/guidance on this.