Need help with devising a stragey for forked projects and maven

I have several libraries and end products, with each library a maven dependency to some degree (either of other libraries or main products). All library projects are deployed to maven during CI, with dev branches going to SNAPSHOT and master going to RELEASE.

Here is an example .gitlab-ci.yml from a library what pushes to maven:

image: maven:3-jdk-8

variables:
  MAVEN_CLI_OPTS: "-s .m2/settings.xml --batch-mode --errors --debug -U"
  MAVEN_OPTS: "-Dmaven.repo.local=.m2/repository -Dmaven.wagon.http.ssl.insecure=true -Dmaven.wagon.http.ssl.allowall=true"

cache:
  paths:
    - .m2/repository/
    - target/

dev-build:
  stage: build
  script:
    - mvn $MAVEN_CLI_OPTS clean compile
  tags:
    - maven
  only:
    - dev
  except:
    - tags

release-build:
  stage: build
  script:
    - mvn $MAVEN_CLI_OPTS clean compile package
  tags:
    - maven
  only:
    - master
  except:
    - tags
    
test:
  stage: test
  script:
    - mvn $MAVEN_CLI_OPTS test
  tags:
    - maven
  except:
    - tags

release-deploy:
  stage: deploy
  script:
    - if [ "$(mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q | grep -c SNAPSHOT)" == "0" ] && [ $CI_PROJECT_NAMESPACE == "library" ]; then
        mvn $MAVEN_CLI_OPTS deploy;
      else 
        echo "Branch $CI_PROJECT_NAMESPACE/master is building a SNAPSHOT version.  Have you updated your version to a valid release version number? Skipping maven deployment for this job.";
      fi
  tags:
    - maven
  only:
    - master
  except:
    - tags

snapshot-deploy:
  stage: deploy
  script:
    - if [ "$(mvn -Dexec.executable='echo' -Dexec.args='${project.version}' --non-recursive exec:exec -q | grep -c SNAPSHOT)" == "1" ] && [ $CI_PROJECT_NAMESPACE == "library" ]; then
        mvn $MAVEN_CLI_OPTS deploy;
      else 
        echo "Branch $CI_PROJECT_NAMESPACE/dev is building a non-SNAPSHOT version.  Are you preparing for a 'master' release? Skipping maven deployment for this job.";
      fi
  tags:
    - maven
  only:
    - dev
  except:
    - tags

Everything works great, excepts when it comes to forks.

As part of the developer workflow, I’m asking each developer to fork any project they are working. This will allow devs to do whatever they want without affecting the upstream projects. You’ll notice above that I test $CI_PROJECT_NAMESPACE == "library" to prevent forked projects from pushing to maven any experimental developer forked code. The problem we have now is how to get forked projects to see their forked libraries if they aren’t in maven?

Am I using GitLab CI deploy wrong here? Is there is “GitLab-Way” to do this, and consider forks?

You’re input is much appreciated.