Can't resolve dependency jira-servicedesk-automation-api

I am upgrading from Service Desk 3.9 over 4 higher.
I redefined this fully functional dependency as
from

        <dependency>
            <groupId>com.atlassian.servicedesk.plugins.automation</groupId>
            <artifactId>servicedesk-automation-api</artifactId>
            <version>${jira.sd.automation.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.servicedesk.plugins.automation</groupId>
            <artifactId>servicedesk-automation-spi</artifactId>
            <version>${jira.sd.automation.version}</version>
            <scope>provided</scope>
        </dependency>

to

    <dependency>
            <groupId>com.atlassian.servicedesk</groupId>
            <artifactId>jira-servicedesk-automation-api</artifactId>
            <version>${jira.sd.automation.version}</version>
            <scope>provided</scope>
        </dependency>

        <dependency>
            <groupId>com.atlassian.servicedesk</groupId>
            <artifactId>jira</artifactId>
            <version>${jira.sd.automation.version}</version>
            <scope>provided</scope>
        </dependency>

I don’t understand why its fetching from valiantys:

com.atlassian.servicedesk:jira:jar:2.6.5: Could not find artifact com.atlassian.s
ervicedesk:jira-servicedesk-automation-api:jar:2.6.5 in valiantys (https://repository.valia
ntys.com/artifactory/valiantys-public) 

These are my repo besides PARENT POM.

<repositories>
        <repository>
            <id>valiantys</id>
            <name>valiantys-public</name>
            <url>https://repository.valiantys.com/artifactory/valiantys-public</url>
        </repository>
        <repository>
            <!-- for arquillian remote test runner -->
            <id>adaptavist</id>
            <url>https://nexus.adaptavist.com/content/repositories/external/</url>
        </repository>
        <repository>
            <id>jira-importers</id>
            <url>https://packages.atlassian.com/repository/public/com/atlassian/jira/plugins/</url>
        </repository>

        <repository>
            <id>project.local</id>
            <name>project</name>
            <url>file:${project.basedir}/repo</url>
        </repository>
  </repositories>

I added just to make sure this repo

        <repository>
            <id>atlassian-public</id>
            <url>https://packages.atlassian.com/mvn/maven-external/</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>never</updatePolicy>
                <checksumPolicy>warn</checksumPolicy>
            </snapshots>
            <releases>
                <enabled>true</enabled>
                <checksumPolicy>warn</checksumPolicy>
            </releases>
        </repository>

Didn’t help. Can’t resolve either.

Hi,

as far as I know when resolving dependencies maven will iterate all the declared repositories one by one while trying to find the dependency. So when it was searching your artifact jira-servicedesk-automation-api, it iterated all the repositories and the error says “Could not find … in valiantys” because it simply tried the valiantys repository as the last one and failed.

And now to your dependencies: Are you sure that the artifact jira-servicedesk-automation-api has groupId com.atlassian.servicedesk? I’ve tried to find it online and the only location I found is com.atlassian.servicedesk.plugins.automation: Maven Repository: com.atlassian.servicedesk.plugins.automation » servicedesk-automation-api. The same is with the servicedesk-automation-spi artifact.

Cheers
Vojtěch Schlemmer [MoroSystems, s.r.o., Czech Republic]