Unable to download JIRA 8.1+ with ATLAS

I am not able to run ATLAS tools (atlas-package or atlas-run) using Jira 8.1 or higher.

I get a message saying I cannot download the jar files:

 Failed to collect dependencies at com.atlassian.jira:jira-api:jar:8.1.1: 
 Failed to read artifact descriptor for com.atlassian.jira:jira-api:jar:8.1.1: 
 Could not transfer artifact com.atlassian.jira:jira-api:pom:8.1.1 from/to atlassian-public (https://maven.atlassian.com/repository/public): 

As soon as I change my pom.xml to use Jira 8.0.0 it works again.
I am actually able to reach [the repository|https://packages.atlassian.com/maven-external/com/atlassian/jira/jira-api/8.1.1/] manually and download the jar from there.

Here is my pom.xml, it is a dummy project I am using to test multiple Jira versions:

<?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>com.okapya.fakeplugin</groupId>
    <artifactId>fakeplugin</artifactId>
    <version>0.0.1</version>

    <organization>
        <name>Example Company</name>
        <url>http://www.example.com/</url>
    </organization>

    <name>fakeplugin</name>
    <description>This is the com.okapya.fakeplugin:fakeplugin plugin for Atlassian JIRA.</description>
    <packaging>atlassian-plugin</packaging>

    <dependencies>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-api</artifactId>
            <version>${jira.version}</version>
            <scope>provided</scope>
        </dependency>
        <!-- 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>
        <dependency>
            <groupId>junit</groupId>
            <artifactId>junit</artifactId>
            <version>4.12</version>
            <scope>test</scope>
        </dependency>
        <dependency>
            <groupId>com.atlassian.jira</groupId>
            <artifactId>jira-tests</artifactId>
            <version>${jira.version}</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>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>
        </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>
        -->
    </dependencies>

    <build>
        <plugins>
            <plugin>
                <groupId>com.atlassian.maven.plugins</groupId>
                <artifactId>maven-jira-plugin</artifactId>
                <version>${amps.version}</version>
                <extensions>true</extensions>
                <configuration>
                    <productVersion>${jira.version}</productVersion>
                    <productDataVersion>${jira.version}</productDataVersion>
					<jvmArgs>-Xms4g -Xmx4g -XX:MaxPermSize=4g -XX:-UseGCOverheadLimit -server -Datlassian.mail.senddisabled=false</jvmArgs>
					<applications>
					<application>
                            <applicationKey>jira-software</applicationKey>
                            <version>${jira.version}</version>
                        </application>
                        <!--<application>
                            <applicationKey>jira-servicedesk</applicationKey>
                            <version>${jsd.version}</version>
                        </application>-->
                    </applications>
                    <enableQuickReload>false</enableQuickReload>
                    <enableFastdev>true</enableFastdev>
                </configuration>
            </plugin>
        </plugins>
    </build>

    <properties>
        <jira.version>8.1.0</jira.version>
		<jsd.version>4.0.0</jsd.version>
        <amps.version>6.3.10</amps.version>
        <plugin.testrunner.version>1.2.3</plugin.testrunner.version>
        <atlassian.spring.scanner.version>1.2.13</atlassian.spring.scanner.version>
        <!-- This key is used to keep the consistency between the key in atlassian-plugin.xml and the key to generate bundle. -->
        <atlassian.plugin.key>${project.groupId}.${project.artifactId}</atlassian.plugin.key>
        <!-- TestKit version 6.x for JIRA 6.x -->
        <testkit.version>6.3.11</testkit.version>
        <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
        <maven.compiler.source>1.8</maven.compiler.source>
        <maven.compiler.target>1.8</maven.compiler.target>
    </properties>

</project>

Maybe I am missing something very simple, but I can’t find it!

Thanks

I haven’t had any problems with Jira >= 8.1.0 with a configuration just like yours except for the fact that I’m running AMPS 8.0.0. I don’t really know why that would stop maven from downloading dependencies though. It is possible that there is something wrong with your maven config and the only reason Jira 8.0.0 works is because it’s already cached to your local repository?

For Jira 8 and later, you’ll need to use a later version of AMPS (and the Atlassian Plugin SDK if you use the atlas- commands).
There were several changes that were needed to make AMPS compatible with Jira 8.
Please check out Announcing AMPS 8.0.0 for more information.
Cheers,
Melissa

Correct me if I’m wrong @mpaisley, but doesn’t that only apply to the atlas- commands which launch Jira instances, i.e. not atlas-package?

It is possible that there is something wrong with your maven config and the only reason Jira 8.0.0 works is because it’s already cached to your local repository?

This seems to be the case, if I delete my .m2\repository\com\atlassian\jira\jira-api\8.0.0 folder, I get the same error with 8.0.0. (I also tried with 7.2.0 to see if it’s v.8 only, and it has the same error).

I will look into my Windows Firewall exceptions and keep you updated.

For Jira 8 and later, you’ll need to use a later version of AMPS

Unfortunately, you seem to be right :stuck_out_tongue:
It wasn’t my firewall, disabling it changed nothing.
After re-installing AMPS 8, I was able to download maven repo again.

I had already installed AMPS 8 previously but didn’t use it because it is not able to run Jira 7.2 (our plugin’s oldest supported version), because of the new Tomcat version. I guess we will end up changing our PATH variable when we need another AMPS version.

Thanks for your help @lorenzo.babbage & @mpaisley

With the Atlassian Plugin SDK 8 you should be able to use older versions of AMPS with your older plugins.

You can specify the version of AMPS to use in your plugin POM, or on the command line (using -u <AMPS_VERSION>.

The thing to keep in mind is that the maven plugin names within AMPS changed so if you’re running against an older version of Jira then you’ll need to use the older AMPS plugin names with the older AMPS version. Usually the easiest thing is to do a find and replace using the table I supplied in that earlier link.