Skip to content
This repository has been archived by the owner on Nov 17, 2023. It is now read-only.

Using the Github Maven Package Registry

Reto Wettstein edited this page Nov 23, 2020 · 5 revisions

Authenticating to GitHub Packages

For more information take a look at this GitHub documentation about authentication.

In order to install the HiGHmed DSF packages using Maven in your own projects you need a personal GitHub access token. This GitHub documentation shows you how to generate one.

After that, add the following configuration to your local .m2/settings.xml. Replace USERNAME with your GitHub username and TOKEN with the previously generated personal GitHub access token.

<settings xmlns="http://maven.apache.org/SETTINGS/1.0.0"
  xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
  xsi:schemaLocation="http://maven.apache.org/SETTINGS/1.0.0
                      http://maven.apache.org/xsd/settings-1.0.0.xsd">

  <activeProfiles>
    <activeProfile>github</activeProfile>
  </activeProfiles>

  <profiles>
    <profile>
      <id>github</id>
      <repositories>
        <repository>
          <id>github</id>
          <name>GitHub HiGHmed Apache Maven Packages</name>
          <url>https://maven.pkg.github.com/highmed/highmed-dsf</url>
          <releases><enabled>true</enabled></releases>
          <snapshots><enabled>true</enabled></snapshots>
        </repository>
      </repositories>
    </profile>
  </profiles>

  <servers>
    <server>
      <id>github</id>
      <username>USERNAME</username>
      <password>TOKEN</password>
    </server>
  </servers>
</settings>

Installing a Package

For more information take a look at this GitHub documentation about package installation.

To install an Apache Maven package from GitHub Packages edit the element dependencies in the pom.xml file by include the package. To including the dsf-bpe-process-base package in your own project, this could look as follows (replace VERSION with the package version, e.g. 0.4.0-SNAPSHOT):

<dependencies>
  <dependency>
    <groupId>org.highmed.dsf</groupId>
    <artifactId>dsf-bpe-process-base</artifactId>
    <version>VERSION</version>
  </dependency>
<dependencies>
Clone this wiki locally