Atlassian SDK 9.0.2 Error when using atlas-mvn install

With the new SDK Version 9.0.2, I get the following Error when trying to install the dependencies:

[ERROR] Failed to read artifact descriptor for jndi:jndi:jar:1.2.1
[ERROR]         Caused by: The following artifacts could not be resolved: jndi:jndi:pom:1.2.1 (present, but unavailable): Could not transfer artifact jndi:jndi:pom:1.2.1 from/to tmatesoft (https://maven.tmatesoft.com/content/repositories/releases/): status code: 403, reason phrase: Forbidden (403)
[ERROR] Failed to read artifact descriptor for jta:jta:jar:1.0.1
[ERROR]         Caused by: The following artifacts could not be resolved: jta:jta:pom:1.0.1 (present, but unavailable): Could not transfer artifact jta:jta:pom:1.0.1 from/to tmatesoft (https://maven.tmatesoft.com/content/repositories/releases/): status code: 403, reason phrase: Forbidden (403)

As a result I’m currently not able to work on the DC Environment. It may be related to this issue:
https://jira.atlassian.com/browse/JRASERVER-43031
The workaround mentioned there seems not to work for me and I would need to downgrade the SDK Version

2 Likes

I had the same issue in my pipelines and I have a dirty trick that worked for me, it’s not very elegant but maybe it’s good enough.
If you open the Atlassian SDK tar.gz, you’ll find a repository directory. If you copy its content in your ~/.m2/repository, or at least the jndi and jta directories, it should work.

2 Likes

Hi @m.herrmann,

You can find the dependencies in jira-core Index of maven-external/com/atlassian/jira/jira-core/9.12.0

<dependency>
    <groupId>com.atlassian.jira</groupId>
    <artifactId>jira-core</artifactId>
    <version>9.12.0</version>
    <scope>provided</scope>
</dependency>

We don’t use this dependency only for this lib but the advantage is that like this, the dependency will always be available.

Fabien

The approach to copy jndi, did not work as I got this error message

[INFO] Artifact jndi:jndi:pom:1.2.1 is present in the local repository, but cached from a remote repository ID that is unavailable in current build context, verifying that is downloadable from

Maven seems to detect that while jndi is in my local repository, it’s no longer possible to download it and as a result abort with the initial error message. This can be reproduces by creating a new plugin using “atlas-create-jira-plugin” and adding jira-core as a dependency.

As there is still no fix from atlassian, I created a support ticket and modified my maven settings.xml as a workaround.
Replace the <profile> Part from your 9.0.2 maven settings.xml with the downloadable 8.2.10 version

1 Like

If you copy its content in your ~/.m2/repository , or at least the jndi and jta directories, it should work.

This does not work.

The root cause is that https://maven.tmatesoft.com/content/repositories/releases/ is not publicly available any longer. It requires login and password to be provided.

So you should open the Maven config file atlassian-plugin-sdk-9.0.2/apache-maven-3.9.8/conf/settings.xml and comment out the private Tmatesoft repository:

<settings...>
  ...
  <profiles>
    ...
    <profile>
      <id>defaultProfile</id>
      ...
      <repositories>
      ...
      <!-- See details at: https://community.developer.atlassian.com/t/atlassian-sdk-9-0-2-error-when-using-atlas-mvn-install/82804
      <repository>
        <id>tmatesoft</id>
        <name>Tmatesoft</name>
        <url>https://maven.tmatesoft.com/content/repositories/releases/</url>
      </repository>
      -->
      ...
      </repositories>
      ...
     </profile>
    ...
  </profiles>
  ...
</settings>

I don’t know what would be affected by commenting this out. But I can tell for sure that now the building process works without errors for my plugins.

3 Likes

Hey,

Thanks for reporting this, I’ll make the team aware this is a problem in the SDK 9.0.2 installer.

The SDK installer adds a bunch of repos to the Maven settings to make things easy, unfortunately it lead to this bug. The reason why was to smooth over this change: https://developer.atlassian.com/server/framework/atlassian-sdk/maven-package-mirrors/

In the linked document, watch out for the settings.xml example and the localrepo>:

<localRepository>localrepo></localRepository>

1 Like

Thanks, a fixed version should be published shortly

1 Like