Unable to deploy kjar to Nexus maven repository while building a project in Decision Central on OCP

Solution Verified - Updated -

Issue

Per document Preparing a Maven mirror repository for offline use, Nexus maven repository is deployed as a pod in the name space(project) where Decision Central is deployed.
Based on the document, in the pom.xml of the project in Decision Central, <distributionManagement> is configured as follows :

https://access.redhat.com/documentation/en-us/red_hat_decision_manager/7.10/html/deploying_red_hat_decision_manager_on_red_hat_openshift_container_platform/dm-openshift-prepare-con_openshift-operator#offline-repo-proc_openshift-operator
   <distributionManagement>
    <snapshotRepository> 
      <id>my-nexus-repo</id>
      <name>Nexus repository</name>
      <url>http://nexus-myproject.apps.ocp.example.com/nexus/content/repositories/my-nexus-repo/</url>     
      <layout>default</layout>
    </snapshotRepository>
  </distributionManagement>

The user name and password for this maven repository are set by the following environment variables in Decision Central's deployment config.

    - name: MAVEN_REPO_ID
      value: my-nexus-repo      <=== this is same with id specified in pom.xml above 
    - name: MAVEN_REPO_URL
  value:http://nexus-myproject.apps.ocp.example.com/nexus/content/repositories/my-nexus-repo/
    - name: MAVEN_REPO_USERNAME
  value: admin
    - name: MAVEN_REPO_PASSWORD
  value: admin123

When building and installing this project in Decision Central, it fails with the following error:

org.eclipse.aether.deployment.DeploymentException: Failed to deploy artifacts: Could not transfer artifact com.cee:ocpProj:jar:1.0.0-20210526.074010-3 from/to my-nexus-repo (http://nexus-myproject.apps.ocp.example.com/nexus/content/repositories/my-nexus-repo/): status code: 400, reason phrase: Bad request (400)

Is there any configuration problem? How can I deploy kjar to this nexus repository via Decision Central UI?

Environment

  • Red Hat Decision Manager
    • 7.10.1
  • OpenShift Container Platform
    • 3.11
    • 4.x

Subscriber exclusive content

A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.

Current Customers and Partners

Log in for full access

Log In

New to Red Hat?

Learn more about Red Hat subscriptions

Using a Red Hat product through a public cloud?

How to access this content