Reconfigure for gitea/woodpecker

This commit is contained in:
Stephan Schnabel 2025-04-28 20:42:15 +02:00
parent f421be47af
commit 9638e13671
Signed by: stephan.schnabel
SSH key fingerprint: SHA256:99zuzxNGFb5/5P+E/O7ONU2qhUojUe/D8rIPTW+9Xp0
18 changed files with 1144 additions and 375 deletions

405
pom.xml
View file

@ -2,20 +2,13 @@
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>io.kokuwa.maven</groupId>
<artifactId>maven-parent</artifactId>
<version>0.6.18</version>
<relativePath />
</parent>
<groupId>io.kokuwa.keycloak</groupId>
<artifactId>keycloak-event-metrics</artifactId>
<version>1.1.2-SNAPSHOT</version>
<version>2.0.0-SNAPSHOT</version>
<name>Keycloak Metrics</name>
<description>Provides metrics for Keycloak user/admin events</description>
<url>https://github.com/kokuwaio/keycloak-event-metrics</url>
<url>https://git.kokuwa.io/keycloak/keycloak-event-metrics</url>
<inceptionYear>2023</inceptionYear>
<organization>
<name>Kokuwa.io</name>
@ -23,38 +16,46 @@
</organization>
<licenses>
<license>
<name>Apache-2.0</name>
<url>https://www.apache.org/licenses/LICENSE-2.0.txt</url>
<name>EUPL-1.2</name>
<url>https://interoperable-europe.ec.europa.eu/collection/eupl/eupl-text-eupl-12</url>
<distribution>repo</distribution>
</license>
</licenses>
<developers>
<developer>
<id>sschnabe</id>
<id>stephan.schnabel</id>
<name>Stephan Schnabel</name>
<url>https://github.com/sschnabe</url>
<email>stephan@grayc.de</email>
<organization>GrayC GmbH</organization>
<organizationUrl>https://grayc.de</organizationUrl>
<url>https://schnabel.org</url>
<email>stephan@schnabel.org</email>
<timezone>Europe/Berlin</timezone>
</developer>
</developers>
<scm>
<url>https://github.com/kokuwaio/keycloak-event-metrics</url>
<connection>scm:git:https://github.com/kokuwaio/keycloak-event-metrics.git</connection>
<developerConnection>scm:git:https://github.com/kokuwaio/keycloak-event-metrics.git</developerConnection>
<url>https://git.kokuwa.io/keycloak/keycloak-event-metrics</url>
<connection>ssh://git@git.kokuwa.io:2222/keycloak/keycloak-event-metrics.git</connection>
<developerConnection>ssh://git@git.kokuwa.io:2222/keycloak/keycloak-event-metrics.git</developerConnection>
<tag>HEAD</tag>
</scm>
<issueManagement>
<system>github</system>
<url>https://github.com/kokuwaio/keycloak-event-metrics/issues</url>
<system>forgejo</system>
<url>https://git.kokuwa.io/keycloak/keycloak-event-metrics/issues</url>
</issueManagement>
<ciManagement>
<system>github</system>
<url>https://github.com/kokuwaio/keycloak-event-metrics/actions</url>
<system>woodpecker</system>
<url>https://ci.kokuwa.io/repos/keycloak/keycloak-event-metrics</url>
</ciManagement>
<distributionManagement>
<repository>
<id>sonatype-nexus</id>
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
</repository>
<snapshotRepository>
<id>sonatype-nexus</id>
<url>https://oss.sonatype.org/content/repositories/snapshots/</url>
</snapshotRepository>
</distributionManagement>
<properties>
@ -62,17 +63,49 @@
<!-- =============================== Build =============================== -->
<!-- ===================================================================== -->
<maven.compiler.source>17</maven.compiler.source>
<maven.compiler.target>17</maven.compiler.target>
<project.build.outputTimestamp>2025-04-28T12:25:49Z</project.build.outputTimestamp>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<project.build.propertiesEncoding>ISO-8859-1</project.build.propertiesEncoding>
<maven.release.releaseProfiles>deploy,site,ossrh,release</maven.release.releaseProfiles>
<maven.compiler.release>17</maven.compiler.release>
<maven.compiler.source>${maven.compiler.release}</maven.compiler.source>
<maven.compiler.target>${maven.compiler.release}</maven.compiler.target>
<maven.compiler.compilerArgument>-Xlint:all</maven.compiler.compilerArgument>
<maven.compiler.failOnWarning>true</maven.compiler.failOnWarning>
<maven.compiler.showWarnings>true</maven.compiler.showWarnings>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
<maven.test.redirectTestOutputToFile>true</maven.test.redirectTestOutputToFile>
<impsort.removeUnused>true</impsort.removeUnused>
<impsort.groups>java.,javax.,jakarta.,org.</impsort.groups>
<formatter.configFile>${project.basedir}/src/eclipse/formatter.xml</formatter.configFile>
<!-- ===================================================================== -->
<!-- ============================== Libaries ============================= -->
<!-- ============================= Versions ============================== -->
<!-- ===================================================================== -->
<version.org.apache.maven.plugins.clean>3.4.1</version.org.apache.maven.plugins.clean>
<version.org.apache.maven.plugins.compiler>3.14.0</version.org.apache.maven.plugins.compiler>
<version.org.apache.maven.plugins.deploy>3.1.4</version.org.apache.maven.plugins.deploy>
<version.org.apache.maven.plugins.gpg>3.2.7</version.org.apache.maven.plugins.gpg>
<version.org.apache.maven.plugins.install>3.1.4</version.org.apache.maven.plugins.install>
<version.org.apache.maven.plugins.jar>3.4.2</version.org.apache.maven.plugins.jar>
<version.org.apache.maven.plugins.javadoc>3.11.2</version.org.apache.maven.plugins.javadoc>
<version.org.apache.maven.plugins.release>3.1.1</version.org.apache.maven.plugins.release>
<version.org.apache.maven.plugins.resources>3.3.1</version.org.apache.maven.plugins.resources>
<version.org.apache.maven.plugins.site>3.21.0</version.org.apache.maven.plugins.site>
<version.org.apache.maven.plugins.source>3.3.1</version.org.apache.maven.plugins.source>
<version.org.apache.maven.plugins.surefire>3.5.3</version.org.apache.maven.plugins.surefire>
<version.org.codehaus.mojo.exec>3.5.1</version.org.codehaus.mojo.exec>
<version.org.codehaus.mojo.tidy>1.4.0</version.org.codehaus.mojo.tidy>
<version.org.codehaus.mojo.versions>2.18.0</version.org.codehaus.mojo.versions>
<version.org.sonatype.plugins.nexus>1.7.0</version.org.sonatype.plugins.nexus>
<version.net.revelc.code.formatter>2.26.0</version.net.revelc.code.formatter>
<version.net.revelc.code.impsort>1.12.0</version.net.revelc.code.impsort>
<version.org.keycloak>26.2.5</version.org.keycloak>
<version.org.keycloak.test>${version.org.keycloak}</version.org.keycloak.test>
<version.org.keycloak.test>26.2.5</version.org.keycloak.test>
<version.org.testcontainers>1.18.3</version.org.testcontainers>
</properties>
@ -188,12 +221,136 @@
</dependencies>
<build>
<finalName>${project.artifactId}</finalName>
<testResources>
<testResource>
<directory>${project.basedir}/src/test/resources</directory>
<filtering>true</filtering>
</testResource>
</testResources>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-clean-plugin</artifactId>
<version>${version.org.apache.maven.plugins.clean}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>${version.org.apache.maven.plugins.compiler}</version>
<configuration>
<compilerArgument>${maven.compiler.compilerArgument}</compilerArgument>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>${version.org.apache.maven.plugins.deploy}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-failsafe-plugin</artifactId>
<version>${version.org.apache.maven.plugins.surefire}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<version>${version.org.apache.maven.plugins.gpg}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<version>${version.org.apache.maven.plugins.install}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-jar-plugin</artifactId>
<version>${version.org.apache.maven.plugins.jar}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>${version.org.apache.maven.plugins.javadoc}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-release-plugin</artifactId>
<version>${version.org.apache.maven.plugins.release}</version>
<configuration>
<preparationGoals>clean verify</preparationGoals>
<preparationProfiles>check</preparationProfiles>
<goals>deploy</goals>
<releaseProfiles>deploy,release</releaseProfiles>
<signTag>true</signTag>
<scmReleaseCommitComment>@{prefix} prepare release @{releaseLabel} [CI SKIP]</scmReleaseCommitComment>
<tagNameFormat>@{project.version}</tagNameFormat>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<version>${version.org.apache.maven.plugins.resources}</version>
<configuration>
<propertiesEncoding>${project.build.propertiesEncoding}</propertiesEncoding>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-site-plugin</artifactId>
<version>${version.org.apache.maven.plugins.site}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>${version.org.apache.maven.plugins.source}</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<version>${version.org.apache.maven.plugins.surefire}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<version>${version.org.codehaus.mojo.exec}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tidy-maven-plugin</artifactId>
<version>${version.org.codehaus.mojo.tidy}</version>
</plugin>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>${version.org.codehaus.mojo.versions}</version>
<configuration>
<generateBackupPoms>false</generateBackupPoms>
<ignoredVersions>
<ignoredVersion>^.*-(alpha|beta|M)-?[0-9]+$</ignoredVersion>
</ignoredVersions>
</configuration>
</plugin>
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<version>${version.org.sonatype.plugins.nexus}</version>
</plugin>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<version>${version.net.revelc.code.formatter}</version>
<configuration>
<configFile>${formatter.configFile}</configFile>
</configuration>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<version>${version.net.revelc.code.impsort}</version>
</plugin>
</plugins>
</pluginManagement>
<plugins>
<!-- run tests -->
@ -210,13 +367,13 @@
</executions>
</plugin>
<!-- flatten fails because of groupId ${ee.maven.groupId} - skip -->
<!-- disable default executions -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>flatten-maven-plugin</artifactId>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-install-plugin</artifactId>
<executions>
<execution>
<id>default</id>
<id>default-install</id>
<phase />
</execution>
</executions>
@ -227,36 +384,142 @@
<profiles>
<profile>
<id>release</id>
<id>dev</id>
<activation>
<property>
<name>!env.CI</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-resources-plugin</artifactId>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tidy-maven-plugin</artifactId>
<executions>
<execution>
<phase>prepare-package</phase>
<phase>validate</phase>
<goals>
<goal>copy-resources</goal>
<goal>pom</goal>
</goals>
<configuration>
<resources>
<resource>
<directory>${project.basedir}/src/main/docker</directory>
<filtering>true</filtering>
</resource>
</resources>
<outputDirectory>${project.build.directory}</outputDirectory>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>sort</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>format</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>check</id>
<activation>
<property>
<name>env.CI</name>
</property>
</activation>
<build>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>tidy-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code</groupId>
<artifactId>impsort-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>check</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>net.revelc.code.formatter</groupId>
<artifactId>formatter-maven-plugin</artifactId>
<executions>
<execution>
<phase>validate</phase>
<goals>
<goal>validate</goal>
</goals>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
<profile>
<id>deploy</id>
<activation>
<property>
<name>env.CI</name>
</property>
</activation>
<build>
<plugins>
<!-- add source/javadoc for downstream projects -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar-no-fork</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>jar</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- docker image -->
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>exec-maven-plugin</artifactId>
<executions>
<execution>
<phase>deploy</phase>
<phase>package</phase>
<goals>
<goal>exec</goal>
</goals>
@ -265,11 +528,20 @@
<arguments>
<argument>build</argument>
<argument>${project.build.directory}</argument>
<argument>--tag=ghcr.io/kokuwaio/keycloak-event-metrics:latest</argument>
<argument>--file=src/main/docker/Dockerfile</argument>
<argument>--quiet</argument>
<!-- https://github.com/opencontainers/image-spec/blob/main/annotations.md -->
<argument>--label=org.opencontainers.image.title=${project.name}</argument>
<argument>--label=org.opencontainers.image.description ${project.description}</argument>
<argument>--label=org.opencontainers.image.url=${project.url}</argument>
<argument>--label=org.opencontainers.image.source=${project.url}/src/main/docker/Dockerfile</argument>
<argument>--label=org.opencontainers.image.vendor=${project.organization.name}</argument>
<argument>--label=org.opencontainers.image.authors=https://github.com/orgs/kokuwaio/people</argument>
<argument>--label=org.opencontainers.image.licenses=GPL-3.0-or-later</argument>
<argument>--label=org.opencontainers.image.version=${project.version}</argument>
<argument>--label=org.opencontainers.image.base.name=docker.io/library/busybox:1.37.0-uclibc@sha256:cc57e0ff4b6d3138931ff5c7180d18078813300e2508a25fb767a4d36df30d4d</argument>
<argument>--tag=ghcr.io/kokuwaio/keycloak-event-metrics:${project.version}</argument>
<argument>--tag=docker.io/kokuwaio/keycloak-event-metrics:latest</argument>
<argument>--tag=docker.io/kokuwaio/keycloak-event-metrics:${project.version}</argument>
<argument>--push</argument>
</arguments>
</configuration>
</execution>
@ -279,5 +551,38 @@
</plugins>
</build>
</profile>
<profile>
<id>release</id>
<build>
<plugins>
<!-- sign before upload -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-gpg-plugin</artifactId>
<executions>
<execution>
<goals>
<goal>sign</goal>
</goals>
</execution>
</executions>
</plugin>
<!-- autoclose sonatype nexus repo -->
<plugin>
<groupId>org.sonatype.plugins</groupId>
<artifactId>nexus-staging-maven-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<serverId>sonatype-nexus</serverId>
<nexusUrl>https://oss.sonatype.org/</nexusUrl>
<autoReleaseAfterClose>false</autoReleaseAfterClose>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>