boozallen / aissemble

Booz Allen's lean manufacturing approach for holistically designing, developing and fielding AI solutions across the engineering lifecycle from data processing to model building, tuning, and training to secure operational deployment
Other
32 stars 8 forks source link

BUG: update instructions to include ghcr.io SNAPSHOT repository configuration support #240

Closed d-ryan-ashcraft closed 1 month ago

d-ryan-ashcraft commented 1 month ago

Description

When building, if you do not already have a server in your settings.xml for ghcr.io, you will receive errors about not being able to download from https://maven.pkg.github.com/boozallen/aissemble.

For instance:

[ERROR] Failed to execute goal on project aissemble-configuration-store: Could not resolve dependencies for project 
   com.boozallen.aissemble:aissemble-configuration-store:docker-build:1.8.0-SNAPSHOT: 
   The following artifacts could not be resolved: com.boozallen.aissemble:aissemble-quarkus:docker-build:1.8.0-SNAPSHOT (absent): 
   Could not transfer artifact com.boozallen.aissemble:aissemble-quarkus:docker-build:1.8.0-SNAPSHOT from/to ghcr.io (https://maven.pkg.github.com/boozallen/aissemble): 
   status code: 401, reason phrase: Unauthorized (401)

Steps to Reproduce

  1. Check your settings.xml for a server entry named ghcr.io
  2. If you have one, comment it out and save the file.
  3. Delete the foundation-core-java module via the following command:
    rm -rf ~/.m2/repository/com/boozallen/aissemble/foundation-core-java
  4. Run the build for a module that references it as a dependency and fails with a 401 error around https://maven.pkg.github.com/boozallen/aissemble
    mvn clean install -pl :foundation-configuration-store

Test Steps

Run the Steps to Reproduce 3 - 5. Determine that the build passes in this case.

d-ryan-ashcraft commented 1 month ago

A note that could be confusing around this is that ghcr.io WILL allow unauthenticated downloads for specific SNAPSHOT revisions on their website. You MUST be authenticated to resolve them via Maven at build time.