GitHub Packages
Simple Story
Blank rule sheets come from two shops. This page is about the one that asks to see a staff card; most head teachers can use the other one, which does not.
Maven Central is recommended
Maven Central requires no authentication and is the simpler choice for most users. See Installation. Use GitHub Packages only if you specifically need it.
GitHub Packages does not currently allow unregistered, public access to packages. You therefore need to authenticate to GitHub if you use GitHub Packages as a repository source.
Maven configuration
Add the following to your pom.xml:
<repositories>
<repository>
<id>github</id>
<name>GitHub ls1intum Apache Maven Packages</name>
<url>https://maven.pkg.github.com/ls1intum/Ares2</url>
</repository>
</repositories>
Then add authentication to your ~/.m2/settings.xml:
<settings>
<servers>
<server>
<id>github</id>
<username>YOUR_GITHUB_USERNAME</username>
<password>YOUR_GITHUB_TOKEN</password>
</server>
</servers>
</settings>
Gradle configuration
Add the following to your build.gradle:
repositories {
maven {
url = uri("https://maven.pkg.github.com/ls1intum/Ares2")
credentials {
username = project.findProperty("gpr.user") ?: System.getenv("GITHUB_USERNAME")
password = project.findProperty("gpr.token") ?: System.getenv("GITHUB_TOKEN")
}
}
}
Generating a GitHub token
- Go to GitHub Settings → Developer settings → Personal access tokens.
- Generate a new token with the
read:packagesscope. - Store the token securely in your settings.
Keep the token out of the repository
Read it from an environment variable or from ~/.gradle/gradle.properties, never from a file
committed alongside the exercise.