You are viewing the documentation for the container-native version of IBM Event Streams.
Looking for the managed service on IBM Cloud? Click here.

Not authorized error when building Maven schema registry project


When building a Maven project that pulls from the IBM Event Streams schema registry, the build fails with an error similar to the following message:

Could not resolve dependencies for project <project>: Failed to collect dependencies at<schema-name>:jar:<version>: Failed to read artifact descriptor for<schema-name>:jar:<version> Could not transfer artifact<schema-name>:pom:<version> from/to eventstreams-schemas-repository (https://<schema-registry-route>/files/schemas): Not authorized


The Maven settings.xml code snippets provided in the Event Streams UI for both SCRAM and Mutual TLS are missing the <servers> XML elements.

In addition, the same error can also be displayed when using SCRAM credentials, and the Authorization value does not have the following format: Basic <scram-token>

Resolving the problem

Update the Maven settings.xml file to have the following format:

            <value>Basic <scram-token></value>
      # ...

Also, if using SCRAM credentials, ensure that the Authorization element has the format Basic <scram-token>, where the <scram-token> value is a Base64-encoded string in the following format: <scram-username>:<scram-password>