aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAlexander Kriegisch <Alexander@Kriegisch.name>2021-04-09 20:04:24 +0700
committerAlexander Kriegisch <Alexander@Kriegisch.name>2021-04-09 20:06:58 +0700
commit7e3e616607441e086cdd383661a296f2074d8e71 (patch)
tree3b7244739272973ce759ea84e3409e43f8ba862a
parent569ac18874b6cee33cf8ad6dd9f89bc34b75f4f2 (diff)
downloadaspectj-7e3e616607441e086cdd383661a296f2074d8e71.tar.gz
aspectj-7e3e616607441e086cdd383661a296f2074d8e71.zip
Use special Maven settings with access token to GitHub Packages
The access token is for the 'kriegaex' account. Can be adjusted or extended in order to support other Package registries, too. for now, I just want to see it this solves the authentication error problems during GitHub CI builds. The new file .mvn/settings-read-github-packages.xml contains additional information and links to online sources, explaining why this is necessary. Signed-off-by: Alexander Kriegisch <Alexander@Kriegisch.name>
-rw-r--r--.github/workflows/maven.yml6
-rw-r--r--.mvn/settings-read-github-packages.xml25
2 files changed, 28 insertions, 3 deletions
diff --git a/.github/workflows/maven.yml b/.github/workflows/maven.yml
index 6af860e3b..5ab310b94 100644
--- a/.github/workflows/maven.yml
+++ b/.github/workflows/maven.yml
@@ -32,14 +32,14 @@ jobs:
ant -version
- name: Download + install test libraries
- run: ./mvnw -B -U --file libx/pom.xml compile
+ run: ./mvnw -B --settings .mvn/settings-read-github-packages.xml --file libx/pom.xml compile
- name: Compile + package code
- run: ./mvnw -B -DskipTests package --file pom.xml
+ run: ./mvnw -B --settings .mvn/settings-read-github-packages.xml --file pom.xml -DskipTests package
- name: Run Tests
# Tests in module ajde call Swing/AWT classes. Without frame buffer they throw
# HeadlessException: No X11 DISPLAY variable was set, but this program performed an operation which requires it.
uses: GabrielBB/xvfb-action@v1
with:
- run: ./mvnw -B -Daspectj.tests.verbose=false verify --file pom.xml
+ run: ./mvnw -B --settings .mvn/settings-read-github-packages.xml --file pom.xml -Daspectj.tests.verbose=false verify
diff --git a/.mvn/settings-read-github-packages.xml b/.mvn/settings-read-github-packages.xml
new file mode 100644
index 000000000..fa1465ac2
--- /dev/null
+++ b/.mvn/settings-read-github-packages.xml
@@ -0,0 +1,25 @@
+<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 https://maven.apache.org/xsd/settings-1.0.0.xsd">
+
+<!--
+ GitHub Actions currently requires authentication even for read-only access to Maven artifacts stored in GitHub
+ Packages. There is no such thing as public package repositories without authentication. See here:
+ https://github.community/t/how-to-allow-unauthorised-read-access-to-github-packages-maven-repository/115517/4
+
+ How to use it:
+ https://github.com/jcansdale-test/maven-consume
+
+ How to XML-encode an access token online (no problem to use the website, it is meant for public access anyway):
+ https://coderstoolbox.net/string/#!encoding=xml&action=encode&charset=none
+-->
+
+ <servers>
+ <server>
+ <id>github</id>
+ <username>kriegaex</username>
+ <!-- Public access token with 'read:packages' scope -->
+ <password>&#103;&#104;&#112;&#95;&#68;&#74;&#97;&#71;&#119;&#108;&#80;&#75;&#55;&#116;&#68;&#55;&#102;&#73;&#51;&#107;&#103;&#111;&#109;&#71;&#100;&#78;&#115;&#86;&#105;&#88;&#67;&#100;&#50;&#98;&#50;&#55;&#74;&#104;&#66;&#77;</password>
+ </server>
+ </servers>
+
+</settings>