Change in Ignition SDK Maven Artifact Repo URL

Hi All,

We’ve just finished updating some systems which support module developers. One of those systems is our maven artifact repository, which now has full https support. Unfortunately, the upgrades mean you will need to update your repository settings to use the new urls, otherwise you won’t be able to resolve your Ignition SDK dependencies after we complete the shutdown of the old servers.

Luckily, the fix is simple – All you need to do is simply change your pom.xml and replace the entries in the <repository> urls, so that http://nexus.inductiveautomation.com:8081/content/repositories/<repo name>

becomes

https://nexus.inductiveautomation.com/repository/<repo name>

We’ve updated the sdk example modules on our Github page with the new url if you’d like a reference.

Let us know if you have any questions/concerns/issues!

-Perry

2 Likes

Hi Perry,

I just changed the pom.xml url and I got some new errors. Can you help me with this?

Thanks

[INFO] Downloading: https://nexus.inductiveautomation.com/repository/inductiveautomation-releases/com/inductiveautomation/ignitionsdk/ignition-common/7.9.0-SNAPSHOT/maven-metadata.xml

[INFO] Downloading: https://nexus.inductiveautomation.com/repository/inductiveautomation-snapshots/com/inductiveautomation/ignitionsdk/ignition-common/7.9.0-SNAPSHOT/maven-metadata.xml

[INFO] Downloading: https://nexus.inductiveautomation.com/repository/inductiveautomation-thirdparty/com/inductiveautomation/ignitionsdk/ignition-common/7.9.0-SNAPSHOT/maven-metadata.xml

[INFO] Downloaded: https://nexus.inductiveautomation.com/repository/inductiveautomation-snapshots/com/inductiveautomation/ignitionsdk/ignition-common/7.9.0-SNAPSHOT/maven-metadata.xml (627 B at 0.7 KB/sec)

[WARNING] Could not transfer metadata com.inductiveautomation.ignitionsdk:ignition-common:7.9.0-SNAPSHOT/maven-metadata.xml from/to releases (https://nexus.inductiveautomation.com/repository/inductiveautomation-releases): Failed to transfer https://nexus.inductiveautomation.com/repository/inductiveautomation-releases/com/inductiveautomation/ignitionsdk/ignition-common/7.9.0-SNAPSHOT/maven-metadata.xml. Error code 400, Repository version policy: RELEASE does not allow metadata in path: com/inductiveautomation/ignitionsdk/ignition-common/7.9.0-SNAPSHOT/maven-metadata.xml

[WARNING] Could not transfer metadata com.inductiveautomation.ignitionsdk:ignition-common:7.9.0-SNAPSHOT/maven-metadata.xml from/to thirdparty (https://nexus.inductiveautomation.com/repository/inductiveautomation-thirdparty): Failed to transfer https://nexus.inductiveautomation.com/repository/inductiveautomation-thirdparty/com/inductiveautomation/ignitionsdk/ignition-common/7.9.0-SNAPSHOT/maven-metadata.xml. Error code 400, Repository version policy: RELEASE does not allow metadata in path: com/inductiveautomation/ignitionsdk/ignition-common/7.9.0-SNAPSHOT/maven-metadata.xml

Try setting all your SDK dependencies to be release versions rather than SNAPSHOTs

I ran into the same issue and Kevin’s suggested fix worked for me (using 7.9.4 instead of 7.9.4-SNAPSHOT).

I am wondering about your release cycle for the SDK though, as Ignition 7.9.5 is available for download and yet the nexus repository only has up to version 7.9.4 for the SDK. Do the SDK versions tend to trail product release? I would have expected it to be the other way around to give module developers some lead time, or at least up to date when a new release goes up for download.

Thanks!

They currently trail because there’s almost never a need to update your deps to the new minor version immediately. We very rarely change or add new interfaces in a point release, and you’re otherwise just programming against the interfaces in the SDK so it shouldn’t matter what minor version you’re pointing at.

3 Likes

Or with a bit of wrangling, what major version. Three of my four published modules load into v7.7.8, v7.8.3+, and v7.9.x. There a few spots where method names changed and related issues popped up, but introspection allowed dynamic solutions to almost all of them.

I noticed one other place documentation was not updated: https://docs.inductiveautomation.com/display/SE/The+Ignition+Maven+Plugin

1 Like

Thank you for pointing that out. Updated now!

Did something change with the repository settings between yesterday and today? Pulling the dependencies has been working for me until today. Now I am seeing an “Unauthorized” error:

Failed to collect dependencies at com.inductiveautomation.ignitionsdk:ignition-common:pom:7.9.4-SNAPSHOT: Failed to read artifact descriptor for com.inductiveautomation.ignitionsdk:ignition-common:pom:7.9.4-SNAPSHOT: Could not transfer artifact com.inductiveautomation.ignitionsdk:ignition-common:pom:7.9.4-SNAPSHOT from/to releases (https://nexus.inductiveautomation.com/repository/inductiveautomation-releases): Access denied to https://nexus.inductiveautomation.com/repository/inductiveautomation-releases/com/inductiveautomation/ignitionsdk/ignition-common/7.9.4-SNAPSHOT/ignition-common-7.9.4-SNAPSHOT.pom. Error code 401, Unauthorized -> [Help 1]

If I put the URL for that pom into my web browser, sure enough an “Authentication Required” window pops up, which I had not seen in the past. I am not sure what kind of credentials it is looking for. I tried my IA/forum credentials but to no avail.

1 Like

Hi Perry,

I’ve made changes to the pom file and when I try to build my project, I get the following error:

Failed to collect dependencies at com.inductiveautomation.ignitionsdk:driver-api:pom:7.9.0: Failed to read artifact descriptor for com.inductiveautomation.ignitionsdk:driver-api:pom:7.9.0: Could not transfer artifact com.inductiveautomation.ignitionsdk:driver-api:pom:7.9.0 from/to releases (https://nexus.inductiveautomation.com/repository/inductiveautomation-releases): Not authorized , ReasonPhrase:Unauthorized.

Any insight into this would be much appreciated, thank you.

1 Like

Looks like we were having similar issues. Not sure what changed, but in my case it seems to be working again today!

May have been a temporary configuration change. Let us know if you see these errors again.

Thanks!

Hi,

the maven archetypes still point to the old repository urls.

I’m no longer having any issues accessing the repo, but will some of the older dependencies be replaced? When I try to build my project now, I’m running into the following error message:

Failed to collect dependencies at com.inductiveautomation.ignitionsdk:driver-api:pom:7.9.0 -> com.inductiveautomation.xopc:opc-ua-driver-api:jar:4.9.0 -> org.eclipse.milo:sdk-client:jar:0.1.0-SNAPSHOT: Failed to read artifact descriptor for org.eclipse.milo:sdk-client:jar:0.1.0-SNAPSHOT: Could not transfer artifact org.eclipse.milo:sdk-client:pom:0.1.0-SNAPSHOT from/to releases (https://nexus.inductiveautomation.com/repository/inductiveautomation-releases): Failed to transfer file: https://nexus.inductiveautomation.com/repository/inductiveautomation-releases/org/eclipse/milo/sdk-client/0.1.0-SNAPSHOT/sdk-client-0.1.0-SNAPSHOT.pom. Return code is: 400 , ReasonPhrase:Repository version policy: RELEASE does not allow version: 0.1.0-SNAPSHOT.

My SDK dependencies are all set to be release versions, and most up to date version of the node before my artifact still points to org.eclipse.milo. As always, any help would be appreciated.

@Eden.Mar The upgrade migrated all artifacts, so nothing should be missing - we are looking into this.

Bump the SDK version to one that doesn’t depend on a snapshot of Milo. All SNAPSHOT artifacts are eventually deleted.

Just as an update - we’ve found the cause of the Failed to collect dependencies..., and are working on implementing the necessary configuration to stop those ‘errors’ (quoted as the errors aren’t in fact real errors, they are just poorly managed responses from server when attempting to search for a file that doesn’t belong in that repo).

Will update again once we’ve got the solution documented and confirmed.

Alright - it seems the solution is somewhat simple – you simply need to add some information to your repository settings to avoid trying to resolve artifacts against the wrong repositories. This is due to a change in the response code that is returned when a repo is searched for the wrong version type (release vs snapshot). Maven is ok with getting a 404 response, but treats a 400 response as a loggable event, which does seem to cause problems in some tooling/IDE environments. I’ve updated our github examples with the additional configuration, but the summary is:

Repository Configuration

  • Releases – (meaning version is NOT a snapshot) should add <snapshot> entries which disable searching them for snapshots.
  • Snapshots – should have enabled <snapshot> and disabled <release> entries
  • Thirdparty – should have the same configuration as Releases

Here is a full copy/paste of the configurations of one of the example modules.

<pluginRepositories>
        <pluginRepository>
            <id>releases</id>
            <url>https://nexus.inductiveautomation.com/repository/inductiveautomation-releases</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </pluginRepository>
    </pluginRepositories>

    <repositories>
        <repository>
            <id>releases</id>
            <url>https://nexus.inductiveautomation.com/repository/inductiveautomation-releases</url>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </releases>
        </repository>

        <repository>
            <id>snapshots</id>
            <url>https://nexus.inductiveautomation.com/repository/inductiveautomation-snapshots</url>
            <snapshots>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </snapshots>
            <releases>
                <enabled>false</enabled>
            </releases>
        </repository>

        <repository>
            <id>thirdparty</id>
            <url>https://nexus.inductiveautomation.com/repository/inductiveautomation-thirdparty</url>
            <releases>
                <enabled>true</enabled>
                <updatePolicy>always</updatePolicy>
            </releases>
            <snapshots>
                <enabled>false</enabled>
            </snapshots>
        </repository>
    </repositories>

Sorry about that, we'll get those updated soon. Feel free to submit a PR with the changes to GitHub - inductiveautomation/ignition-sdk-archetypes: Maven archetypes for the Ignition SDK if you're in a hurry.