merma
merma

Reputation: 23

Alternatives to point to GitLab private registry for Scala (Play) projects?

  1. What's the easiest way to publish ~10 public packages (like mockito-scala,java-jwt, ...) into the GitLab private registry? "https://gitlab.com/api/v4/projects/SOME_PROJECT_ID/packages/maven" (mvn deploy:deploy-file?)

  2. So the Scala Play project can point to the private registry? (Came across this https://github.com/gilcloud/sbt-gitlab. Are there other solutions?)

Upvotes: 1

Views: 241

Answers (1)

VonC
VonC

Reputation: 1327324

In order to publish artifact to Gitlab private registry, the general command is:

mvn deploy:deploy-file \
  -Durl=https://gitlab.com/api/v4/groups/xxxxxx/-/packages/maven/ \
  -DrepositoryId=gitlab-maven \
  -Dfile=target/jar/ID-1.0.0-SNAPSHOT.jar \
  -DgroupId=ID \
  -DartifactId=ID \
  -Dversion=1.0.0-SNAPSHOT \
  -Dpackaging=jar \
  -DgeneratePom=true

And you can see an settings.xml/pom.xml example here.
But only with maven:3.8.3-jdk-11 or more.

Upvotes: 0

Related Questions