Atlas-run does not what it is suppose to do

Hello everybody,

I am getting insane about an issue with atlas-run and hope somebody can help me with it. For a few days now atlas-run does not what it is suppose to do. Instead of starting a development instance and installing the plugin, it starts a normal evaluation instance. This happend with different plugins no matter if it is for JIRA or Confluence.

So far I tried to following, without solving the issue:

  • Cleaning the project with atlas-clean
  • Removing the target directory manually
  • Deleting all maven dependencies and reloading them
  • Reinstalling the atlassian SDK

The plugins are build correctly both locally and over Bitbucket Pipeline.

here are the atlassian SDK informations:

ATLAS Version:    6.2.14
ATLAS Home:       /Applications/Atlassian/atlassian-plugin-sdk-6.2.14
ATLAS Scripts:    /Applications/Atlassian/atlassian-plugin-sdk-6.2.14/bin
ATLAS Maven Home: /Applications/Atlassian/atlassian-plugin-sdk-6.2.14/apache-maven-3.2.1
AMPS Version:     6.2.11
--------
Executing: /Applications/Atlassian/atlassian-plugin-sdk-6.2.14/apache-maven-3.2.1/bin/mvn --version -gs /Applications/Atlassian/atlassian-plugin-sdk-6.2.14/apache-maven-3.2.1/conf/settings.xml
Java HotSpot(TM) 64-Bit Server VM warning: ignoring option MaxPermSize=256M; support was removed in 8.0
Apache Maven 3.2.1 (ea8b2b07643dbb1b84b6d16e1f08391b666bc1e9; 2014-02-14T18:37:52+01:00)
Maven home: /Applications/Atlassian/atlassian-plugin-sdk-6.2.14/apache-maven-3.2.1
Java version: 1.8.0, vendor: Oracle Corporation
Java home: /Library/Java/JavaVirtualMachines/jdk1.8.0.jdk/Contents/Home/jre
Default locale: de_DE, platform encoding: UTF-8
OS name: "mac os x", version: "10.11.6", arch: "x86_64", family: "mac"

One thing, that is odd: this morning I made another try and used atlas-clean to clean up the target and started JIRA with atlas-run. It showed the dialog to create a new empty project or an example project after logging in. Creating the example projekt with the same name as I did yesterday, resulted in an error message, because the project already existed, which couldn’t be normally, as I cleaned the target and the instance was not running against a real database.

In addition, here is the POM of the project:

<?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>de.syracom.jira.plugins</groupId>
    <artifactId>securelogin</artifactId>
    <version>1.4.1-BETA</version>
    <organization>
        <name>Syracom Consulting AG</name>
        <url>http://www.syracom.de/</url>
    </organization>
    <name>Secure Login</name>
    <description>Secure Login - the 2-factor authentication solution for Atlassian JIRA.</description>
    <packaging>atlassian-plugin</packaging>

    <repositories>
        <repository>
            <id>central</id>
            <name>Maven Repository Switchboard</name>
            <layout>default</layout>
            <url>http://repo1.maven.org/maven2</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>
    
    <pluginRepositories>
        <pluginRepository>
            <id>central</id>
            <name>Maven Plugin Repository</name>
            <url>http://repo1.maven.org/maven2</url>
            <layout>default</layout>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <updatePolicy>never</updatePolicy>
            </releases>
        </pluginRepository>
    </pluginRepositories>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-core</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.slf4j</groupId>
            <artifactId>slf4j-api</artifactId>
            <version>1.6.6</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.ws.rs</groupId>
            <artifactId>jsr311-api</artifactId>
            <version>1.1.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.templaterenderer</groupId>
            <artifactId>atlassian-template-renderer-api</artifactId>
            <version>3.0.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>licensing-api</artifactId>
            <version>2.4.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.upm</groupId>
            <artifactId>upm-api</artifactId>
            <version>2.4.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-codec</groupId>
            <artifactId>commons-codec</artifactId>
            <version>1.10</version>
        </dependency>
        <dependency>
            <groupId>net.glxn</groupId>
            <artifactId>qrgen</artifactId>
            <version>1.3</version>
        </dependency>
        <dependency>
            <groupId>com.atlassian.activeobjects</groupId>
            <artifactId>activeobjects-plugin</artifactId>
            <version>${ao.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.sal</groupId>
            <artifactId>sal-api</artifactId>
            <version>2.10.22</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.google.collections</groupId>
            <artifactId>google-collections</artifactId>
            <version>1.0</version>
            <scope>provided</scope>
        </dependency>
        <!-- MAIL Libraries -->
        <!-- Add dependency on jira-core if you want access to JIRA implementation
            classes as well as the sanctioned API. -->
        <!-- This is not normally recommended, but may be required eg when migrating
            a plugin originally developed against JIRA 4.x -->
        <!-- <dependency> <groupId>com.atlassian.jira</groupId> <artifactId>jira-core</artifactId>
            <version>${jira.version}</version> <scope>provided</scope> </dependency> -->
        <!-- to use groovy behaviour driven testing -->
        <dependency>
            <groupId>cglib</groupId>
            <artifactId>cglib-nodep</artifactId>
            <version>2.2</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.jsonpath</groupId>
            <artifactId>json-path</artifactId>
            <version>0.8.1</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.restassured</groupId>
            <artifactId>json-schema-validator</artifactId>
            <version>2.4.0</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.jayway.restassured</groupId>
            <artifactId>rest-assured</artifactId>
            <version>2.4.0</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.httpcomponents</groupId>
            <artifactId>httpclient</artifactId>
            <version>4.3.6</version>
        </dependency>
        <dependency>
            <groupId>org.spockframework</groupId>
            <artifactId>spock-core</artifactId>
            <version>0.7-groovy-2.0</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.codehaus.groovy</groupId>
                    <artifactId>groovy-all</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>net.java.dev.activeobjects</groupId>
            <artifactId>activeobjects-test</artifactId>
            <version>${ao.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.11</version>
            <scope>test</scope>
            <exclusions>
                <exclusion>
                    <groupId>org.hamcrest</groupId>
                    <artifactId>hamcrest-core</artifactId>
                </exclusion>
            </exclusions>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>atlassian-jira-pageobjects</artifactId>
            <version>6.2.3</version>
            <scope>test</scope>
        </dependency>
        <!-- WIRED TEST RUNNER DEPENDENCIES -->
        <dependency>
            <groupId>com.atlassian.plugins</groupId>
            <artifactId>atlassian-plugins-osgi-testrunner</artifactId>
            <version>${plugin.testrunner.version}</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.google.code.gson</groupId>
            <artifactId>gson</artifactId>
            <version>2.2.2-atlassian-1</version>
            <scope>test</scope>
        </dependency>
        <!-- Uncomment to use TestKit in your project. Details at https://bitbucket.org/atlassian/jira-testkit -->
        <!-- You can read more about TestKit at https://developer.atlassian.com/display/JIRADEV/Plugin+Tutorial+-+Smarter+integration+testing+with+TestKit -->
        <!-- <dependency> <groupId>com.atlassian.jira.tests</groupId> <artifactId>jira-testkit-client</artifactId>
            <version>${testkit.version}</version> <scope>test</scope> </dependency> -->
        <dependency>
            <groupId>org.mockito</groupId>
            <artifactId>mockito-all</artifactId>
            <version>1.8.5</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>javax.servlet</groupId>
            <artifactId>servlet-api</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>javax.xml.bind</groupId>
            <artifactId>jaxb-api</artifactId>
            <version>2.1</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.plugins.rest</groupId>
            <artifactId>atlassian-rest-common</artifactId>
            <version>1.0.2</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.apache.wink</groupId>
            <artifactId>wink-client</artifactId>
            <version>1.1.3-incubating</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-tests</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-lang</groupId>
            <artifactId>commons-lang</artifactId>
            <version>2.4</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>org.springframework.osgi</groupId>
            <artifactId>spring-osgi-core</artifactId>
            <version>1.1.3</version>
            <scope>provided</scope>
        </dependency>
        <dependency>
            <groupId>commons-validator</groupId>
            <artifactId>commons-validator</artifactId>
            <version>1.5.1</version>
        </dependency>

        <dependency>
            <groupId>org.postgresql</groupId>
            <artifactId>postgresql</artifactId>
            <version>${postgresql.jdbc.version}</version>
            <scope>runtime</scope>
        </dependency>
    </dependencies>
    <build>
        <plugins>

            <!-- Findbugs -->
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>findbugs-maven-plugin</artifactId>
                <version>${findbugs.maven.plugin.version}</version>
                <configuration>
                    <failOnError>false</failOnError>
                    <findbugsXmlOutput>true</findbugsXmlOutput>
                    <xmlOutput>true</xmlOutput>
                    <excludeFilterFile>findbugs-exclude.xml</excludeFilterFile>
                    <includeFilterFile>settings/findbugs-settings.xml</includeFilterFile>
                </configuration>
            </plugin>

            <!-- PMD -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-pmd-plugin</artifactId>
                <version>${maven.pmd.plugin.version}</version>
                <configuration>
                    <targetJdk>${java.targetVersion}</targetJdk>
                    <rulesets>
                        <ruleset>settings/pmd-settings.xml</ruleset>
                    </rulesets>
                    <verbose>true</verbose>
                    <failOnViolation>${qa.fail.on.error}</failOnViolation>
                    <failurePriority>2</failurePriority>
                    <excludes>
                        <exclude>**/generated/**/*.java</exclude>
                    </excludes>
                </configuration>
            </plugin>

            <!--  Checkstyle -->
            <plugin>
                <groupId>org.apache.maven.plugins</groupId>
                <artifactId>maven-checkstyle-plugin</artifactId>
                <version>${maven.checkstyle.plugin.version}</version>
                <configuration>
                    <configLocation>${basedir}/settings/checkstyle-settings.xml</configLocation>
                    <propertiesLocation>${basedir}/settings/checkstyle.properties</propertiesLocation>
                    <consoleOutput>false</consoleOutput>
                    <includeTestSourceDirectory>true</includeTestSourceDirectory>
                    <failsOnError>${qa.fail.on.error}</failsOnError>
                </configuration>
            </plugin>
            <plugin>
                <groupId>org.codehaus.mojo</groupId>
                <artifactId>cobertura-maven-plugin</artifactId>
                <version>${cobertura.plugin.version}</version>
                <configuration>
                    <formats>
                        <format>html</format>
                        <format>xml</format>
                    </formats>
                    <check/>
                </configuration>
            </plugin>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jira-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <jvmArgs>-Xms1g -Xmx2g -XX:MaxPermSize=1g -XX:-UseGCOverheadLimit -server</jvmArgs>
                    <productVersion>${jira.version}</productVersion>
                    <productDataVersion>${jira.version}</productDataVersion>
                    <allowGoogleTracking>false</allowGoogleTracking>
                    <enableFastdev>false</enableFastdev>
                    <enableDevToolbox>false</enableDevToolbox>
                    <enablePde>false</enablePde>
                    <skipRestDocGeneration>true</skipRestDocGeneration>
                    <skipManifestValidation>true</skipManifestValidation>
                    <extractDependencies>false</extractDependencies>
                    <skipManifestValidation>true</skipManifestValidation>
                    <enableQuickReload>true</enableQuickReload>

                    <output>${project.build.directory}/atlassian-jira.log</output>

                    <pluginArtifacts>
                        <pluginArtifact>
                            <groupId>com.atlassian.activeobjects</groupId>
                            <artifactId>activeobjects-plugin</artifactId>
                            <version>${ao.version}</version>
                        </pluginArtifact>

                        <pluginArtifact>
                            <groupId>com.atlassian.labs.plugins</groupId>
                            <artifactId>quickreload</artifactId>
                            <version>${quick.reload.version}</version>
                        </pluginArtifact>
                    </pluginArtifacts>
                    <!-- Uncomment to install TestKit backdoor in JIRA. -->
                    <!-- <pluginArtifacts> <pluginArtifact> <groupId>com.atlassian.jira.tests</groupId> 
						<artifactId>jira-testkit-plugin</artifactId> <version>${testkit.version}</version> 
						</pluginArtifact> </pluginArtifacts> -->
                    <applications>
                        <application>
                            <applicationKey>jira-servicedesk</applicationKey>
                            <version>${jira.servicedesk.application.version}</version>
                        </application>
                    </applications>

                    <products>
                        <product>
                            <id>jira</id>
                            <instanceId>instance-postgres</instanceId>
                            <version>${jira.version}</version>
                            <!-- <dataVersion>${jira.version}</dataVersion> -->
                            <!--<dataPath>${project.basedir}/backup/last_instance-postgres/generated-test-resources.zip</dataPath>-->
                            <dataSources>
                                <dataSource>
                                    <jndi>jdbc/DefaultDS</jndi>
                                    <url>jdbc:postgresql://localhost:5432/securelogin</url>
                                    <driver>org.postgresql.Driver</driver>
                                    <username>jira</username>
                                    <password>jira</password>
                                    <schema>public</schema>
                                    <libArtifacts>
                                        <libArtifact>
                                            <groupId>org.postgresql</groupId>
                                            <artifactId>postgresql</artifactId>
                                            <version>${postgresql.jdbc.version}</version>
                                        </libArtifact>
                                    </libArtifacts>
                                </dataSource>
                            </dataSources>
                        </product>
                    </products>
                </configuration>
            </plugin>
            <plugin>
                <artifactId>maven-compiler-plugin</artifactId>
                <configuration>
                    <source>${java.targetVersion}</source>
                    <target>${java.targetVersion}</target>
                </configuration>
                <version>3.1</version>
            </plugin>
            <plugin>
                <artifactId>maven-dependency-plugin</artifactId>
                <executions>
                    <execution>
                        <id>copy-storage-plugin</id>
                        <phase>process-resources</phase>
                        <goals>
                            <goal>copy-dependencies</goal>
                        </goals>
                        <configuration>
                            <outputDirectory>${project.build.outputDirectory}</outputDirectory>
                            <includeArtifactIds>plugin-license-storage-plugin</includeArtifactIds>
                            <stripVersion>true</stripVersion>
                        </configuration>
                    </execution>
                </executions>
            </plugin>
        </plugins>
    </build>

    <properties>
        <jira.version>7.2.4</jira.version>
        <amps.version>6.2.11</amps.version>
        <jira.servicedesk.application.version>3.2.4</jira.servicedesk.application.version>

        <atlassian.spring.scanner.version>1.2.6</atlassian.spring.scanner.version>
        <plugin.testrunner.version>1.2.3</plugin.testrunner.version>
        <ao.version>1.1.3</ao.version>
        <!-- TestKit version 5.x for JIRA 5.x, 6.x for JIRA 6.x -->
        <testkit.version>6.3.11</testkit.version>
        <upm.license.compatibility.version>2.4.1</upm.license.compatibility.version>
        <quick.reload.version>1.30.3</quick.reload.version>

        <cobertura.maxmem>2048M</cobertura.maxmem>
        <cobertura.plugin.version>2.6</cobertura.plugin.version>
        <cobertura.version>2.0.3</cobertura.version>
        <findbugs.maven.plugin.version>3.0.1</findbugs.maven.plugin.version>
        <maven.checkstyle.plugin.version>2.16</maven.checkstyle.plugin.version>
        <maven.pmd.plugin.version>3.5</maven.pmd.plugin.version>
        <qa.fail.on.error>false</qa.fail.on.error>
        <sonar.jdbc.url>jdbc:h2:tcp://localhost:9092/sonar</sonar.jdbc.url>
        <sonar.jdbc.username>sonar</sonar.jdbc.username>
        <sonar.jdbc.password>sonar</sonar.jdbc.password>
        <!-- Optional URL to server. Default value is http://localhost:9000 -->
        <sonar.host.url>http://localhost:9000</sonar.host.url>
        <postgresql.jdbc.version>9.4.1208</postgresql.jdbc.version>

        <java.targetVersion>1.7</java.targetVersion>
    </properties>
</project>

Every help, idea or suggestion is highly appreciated!

Regards,
Alexander

Hi Alexander,

Looking at your POM it looks like you’ve created some repository tags.

<repositories>
    <repository>
        <id>central</id>
        <name>Maven Repository Switchboard</name>
        <layout>default</layout>
        <url>http://repo1.maven.org/maven2</url>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
    </repository>
</repositories>

<pluginRepositories>
    <pluginRepository>
        <id>central</id>
        <name>Maven Plugin Repository</name>
        <url>http://repo1.maven.org/maven2</url>
        <layout>default</layout>
        <snapshots>
            <enabled>false</enabled>
        </snapshots>
        <releases>
            <updatePolicy>never</updatePolicy>
        </releases>
    </pluginRepository>
</pluginRepositories>

Is there a reason behind this?

I’m wondering if this could somehow be causing your atlas-run to be grabbing artefacts there rather than from the atlassian maven repository.

Hi Melissa,

Thank you for your feedback. I have no idea why some of my colleagues added the repository tags. But sadly it is not the reason for the problem. The other plugin I have the same problem with didn’t have this entry. Additional I tried to run it with a different user on the same machine, without an existing local m2 directory, forcing to download to dependencies again. And first I removed the repository entries in the POM.

Regards,
Alexander

I am not sure what finally lead to it, but I made a little progress on this topic. atlas-run still starts JIRA and Confluence with a trial instead of a development license, but at least the plugin gets installed and activated now.

And I am still missing the usual “[INFO] [talledLocalContainer]” messages on the console. And there is no development toolbar available.

I checked the state of QuickReload, by calling the servlet, which shows an interesting fact:

Perhaps that is the problem…