chore: initial Commit of project
All checks were successful
release / Release (push) Successful in 1m34s

This commit is contained in:
Oliver Weyhmüller 2025-01-04 10:04:50 +01:00
commit 1f5bec8632
Signed by: oliver
GPG key ID: 5286794099F934A3
7 changed files with 568 additions and 0 deletions

View file

@ -0,0 +1,159 @@
---
name: release
on:
push:
branches:
- main
jobs:
release:
name: Release
runs-on: ubuntu-latest
if: ${{ !startsWith(github.event.head_commit.message, 'Release') }}
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Set up Environment
run: |
apt update
apt install -y zip
mkdir -p /root/.jreleaser
touch /root/.jreleaser/config.properties
- name: Determine next version
uses: https://github.com/obfu5c8/action-svu@v1
id: generate_next_version
with:
type: auto
force-increment: true
no-metadata: false
no-pre-release: false
no-build: false
strip-prefix: true
prefix: ''
suffix: ''
- name: Install syft
uses: https://github.com/anchore/sbom-action/download-syft@v0
id: install_syft
with:
syft-version: v1.18.1
- name: Set new version
run: |
NEW_VERSION=${{steps.generate_next_version.outputs.version}}
echo NEW_VERSION=$NEW_VERSION >> "$GITHUB_ENV"
echo "New version: $NEW_VERSION"
- name: Cache Java and Maven software
uses: https://github.com/actions/cache@v4
with:
path: ~/.sdkman
key: ${{ runner.os }}-sdkman
restore-keys: |
${{ runner.os }}-sdkman
env:
ACTIONS_STEP_DEBUG: true
- name: Cache local Maven repository
uses: https://github.com/actions/cache@v4
with:
path: ~/.m2/repository
key: ${{ runner.os }}-maven
restore-keys: |
${{ runner.os }}-maven
env:
ACTIONS_STEP_DEBUG: true
- name: Install Java & Maven
uses: https://github.com/sdkman/sdkman-action@main
id: sdkman
- name: Set Version
env:
MAVEN_USERNAME: ${{ secrets.NEXUS_USERNAME }}
MAVEN_CENTRAL_TOKEN: ${{ secrets.NEXUS_PASSWORD }}
MAVEN_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
run: |
export GPG_TTY=$(tty)
git config user.name "${{ github.event.head_commit.committer.name }}"
git config user.email "${{ github.event.head_commit.committer.email }}"
mvn -B --file pom.xml versions:set -DnewVersion=${{ env.NEW_VERSION }}
- name: Run JReleaser (Changelog)
uses: https://w9r.dev/actions/release-action@main
with:
arguments: changelog --debug
setup-java: false
continue-on-error: true
env:
JRELEASER_OUTPUT_DIRECTORY: target
JRELEASER_PROJECT_VERSION: ${{ env.NEW_VERSION }}
JRELEASER_GITEA_TOKEN: ${{ secrets.JRELEASER_GITEA_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Commit and push changes
run: |
git config user.name "${{ github.event.head_commit.committer.name }}"
git config user.email "${{ github.event.head_commit.committer.email }}"
git add pom.xml CHANGELOG.md
git commit -a -m "Release ${{ env.NEW_VERSION }}"
git push
- name: Build package and populate staging area for deployment
run: |
mvn -B --file pom.xml package
mvn --file pom.xml -Ppublication
- name: Run JReleaser (Assemble)
uses: https://w9r.dev/actions/release-action@main
with:
arguments: assemble --debug
setup-java: false
continue-on-error: true
env:
JRELEASER_OUTPUT_DIRECTORY: target
JRELEASER_PROJECT_VERSION: ${{ env.NEW_VERSION }}
JRELEASER_GITEA_TOKEN: ${{ secrets.JRELEASER_GITEA_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
- name: Run JReleaser (Release)
uses: https://w9r.dev/actions/release-action@main
with:
arguments: release --debug
setup-java: false
env:
JRELEASER_OUTPUT_DIRECTORY: target
JRELEASER_PROJECT_VERSION: ${{ env.NEW_VERSION }}
JRELEASER_GITEA_TOKEN: ${{ secrets.JRELEASER_GITEA_TOKEN }}
JRELEASER_GPG_PASSPHRASE: ${{ secrets.GPG_PASSPHRASE }}
JRELEASER_GPG_PUBLIC_KEY: ${{ secrets.GPG_PUBLIC_KEY }}
JRELEASER_GPG_SECRET_KEY: ${{ secrets.GPG_PRIVATE_KEY }}
JRELEASER_ARTIFACTORY_USERNAME: ${{ secrets.NEXUS_USERNAME }}
JRELEASER_ARTIFACTORY_TOKEN: ${{ secrets.NEXUS_PASSWORD }}
# Persist logs
- name: JReleaser release trace
if: always()
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: jreleaser-trace
path: target/jreleaser/trace.log
- name: JReleaser release properties
if: always()
uses: https://gitea.com/actions/upload-artifact@v3
with:
name: jreleaser-properties
path: target/jreleaser/output.properties

38
.gitignore vendored Normal file
View file

@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

2
.sdkmanrc Normal file
View file

@ -0,0 +1,2 @@
java=21.0.5-tem
maven=3.9.9

21
LICENSE Normal file
View file

@ -0,0 +1,21 @@
MIT License
Copyright (c) [year] [fullname]
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

9
README.md Normal file
View file

@ -0,0 +1,9 @@
# Common Java Dependencies
This project defines common dependency versions to multiple projects in order to keep them up-to-date. This Project
handles:
- Common dependencies used by all projects
This ensures that dependencies used by every project have the same version
- Dependency version overrides for security reasons
This ensures that dependencies having known vulnerabilities are replaced by patched ones

184
jreleaser.yml Normal file
View file

@ -0,0 +1,184 @@
---
project:
versionPattern: SEMVER
snapshot:
pattern: .*-SNAPSHOT
label: early-access
fullChangelog: true
description: Dependencies
longDescription: |
Common dependencies
authors:
- Oliver Weyhmüller
tags:
- java
maintainers:
- 'oliver'
stereotype: NONE
license: MIT
inceptionYear: 2025
links:
homepage: https://w9r.dev/pom/dependencies
documentation: https://w9r.dev/pom/dependencies/src/branch/main/README.md
license: https://spdx.org/licenses/MIT.html
vcsBrowser: https://w9r.dev/pom/dependencies
languages:
java:
groupId: dev.w9r.pom
artifactId: dependencies
version: 17
signing:
active: ALWAYS
armored: true
verify: true
mode: MEMORY
files: true
artifacts: true
checksums: true
assemble:
archive:
pom:
active: ALWAYS
exported: true
stereotype: NONE
platform:
replacements:
osx-x86_64: mac
aarch_64: aarch64
x86_64: amd64
linux_musl: alpine
archiveName: '{{projectName}}-{{projectVersion}}'
distributionType: JAVA_BINARY
formats:
- ZIP
- TAR_GZ
fileSets:
- input: . # A set of files and directory to include.
includes:
- 'LICENSE'
- 'README.md'
- 'CHANGELOG.md'
- 'pom.xml'
catalog:
sbom:
syft:
active: ALWAYS
distributions: true
files: true
pack:
enabled: false
name: '{{projectName}}-{{projectVersion}}-sboms'
formats:
- SPDX_JSON
- CYCLONEDX_JSON
- SYFT_JSON
- GITHUB_JSON
- TABLE
- TEXT
release:
gitea:
enabled: true
connectTimeout: 20
readTimeout: 60
owner: pom
name: dependencies
host: w9r.dev
username: releasebot
apiEndpoint: https://w9r.dev
tagName: "{{projectVersion}}"
overwrite: true
update:
enabled: false
sections:
- ASSETS
skipTag: false
skipRelease: false
sign: true
branch: main
uploadAssets: ALWAYS
files: true
artifacts: true
checksums: true
signatures: true
catalogs: true
draft: false
prerelease:
enabled: false
pattern: .*-SNAPSHOT
commitAuthor:
name: ReleaseBot
email: releasebot@w9r.dev
milestone:
close: true
name: '{{tagName}}'
issues:
enabled: true
comment: '🎉 This issue has been resolved in `{{tagName}}` ([Release Notes]({{releaseNotesUrl}}))'
applyMilestone: ALWAYS
label:
name: released
color: '#FF0000'
description: Issue has been released
issueTrackerUrl: https://w9r.dev/pom/dependencies/issues
changelog:
enabled: true
sort: DESC
links: true
skipMergeCommits: false
formatted: ALWAYS
preset: 'conventional-commits'
categoryTitleFormat: '### {{categoryTitle}}'
contributorsTitleFormat: '### Contributors'
content: |
{{changelogChanges}}
{{changelogContributors}}
append:
enabled: true
title: '## [{{tagName}}]'
target: 'CHANGELOG.md'
content: |
{{changelogTitle}}
{{changelogChanges}}
contributors:
enabled: false
format: '- {{contributorName}} ({{contributorUsernameAsLink}})'
hide:
uncategorized: false
contributors:
- 'ReleaseBot'
- 'RenovateBot'
labelers:
- label: 'issue'
title: 'regex:fix:'
body: 'Fixes: '
order: 1
replacers:
- search: '\[chore\]\s'
replace: ''
- search: '/CVE-(\d{4})-(\d+)/g'
replace: 'https://cve.mitre.org/cgi-bin/cvename.cgi?name=CVE-$1-$2'
distributions:
pom:
artifacts:
- path: pom.xml
deploy:
maven:
artifactory:
pom:
active: ALWAYS
url: https://nexus.w9r.dev/repository/maven-releases
snapshotSupported: true
authorization: Basic
sign: false
checksums: true
sourceJar: false
javadocJar: false
verifyPom: true
applyMavenCentralRules: false
stagingRepositories:
- target/staging-deploy

155
pom.xml Normal file
View file

@ -0,0 +1,155 @@
<?xml version="1.0" encoding="UTF-8"?>
<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 http://maven.apache.org/xsd/maven-4.0.0.xsd">
<modelVersion>4.0.0</modelVersion>
<groupId>dev.w9r.pom</groupId>
<artifactId>dependencies</artifactId>
<version>0.0.1</version>
<name>Common Dependency Project Object Model for Maven Builds</name>
<description>Common dependencies and management of their versions</description>
<url>https://w9r.dev/pom/dependencies</url>
<developers>
<developer>
<id>oliver</id>
<name>Oliver Weyhmüller</name>
<email>oliver@weyhmueller.de</email>
</developer>
</developers>
<scm>
<connection>scm:git:https://github.com/aalmiray/app.git</connection>
<developerConnection>scm:git:https://w9r.dev/pom/dependencies.git</developerConnection>
<url>https://w9r.dev/pom/dependencies.git</url>
<tag>HEAD</tag>
</scm>
<packaging>pom</packaging>
<properties>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<w9r.logback.json.version>0.1.5</w9r.logback.json.version>
<w9r.logback.version>1.5.15</w9r.logback.version>
</properties>
<licenses>
<license>
<name>MIT</name>
<url>https://spdx.org/licenses/MIT.html</url>
<distribution>repo</distribution>
</license>
</licenses>
<!--
This file is used to provide common versions of dependencies and also temporary import updated versions of
dependencies until they make their way into the proper release of the used frameworks.
-->
<distributionManagement>
<snapshotRepository>
<id>maven-snapshots</id>
<url>https://nexus.w9r.dev/repository/maven-snapshots</url>
</snapshotRepository>
<repository>
<id>maven-releases</id>
<url>https://nexus.w9r.dev/repository/maven-releases</url>
</repository>
</distributionManagement>
<dependencyManagement>
<dependencies>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-classic</artifactId>
<version>${w9r.logback.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback</groupId>
<artifactId>logback-core</artifactId>
<version>${w9r.logback.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback.contrib</groupId>
<artifactId>logback-json-classic</artifactId>
<version>${w9r.logback.json.version}</version>
</dependency>
<dependency>
<groupId>ch.qos.logback.contrib</groupId>
<artifactId>logback-jackson</artifactId>
<version>${w9r.logback.json.version}</version>
</dependency>
</dependencies>
</dependencyManagement>
<build>
<pluginManagement>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-deploy-plugin</artifactId>
<version>3.1.3</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-compiler-plugin</artifactId>
<version>3.13.0</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<version>3.11.2</version>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<version>3.3.1</version>
</plugin>
</plugins>
</pluginManagement>
</build>
<profiles>
<profile>
<id>publication</id>
<properties>
<altDeploymentRepository>local::file:./target/staging-deploy</altDeploymentRepository>
</properties>
<build>
<defaultGoal>deploy</defaultGoal>
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-javadoc-plugin</artifactId>
<executions>
<execution>
<id>attach-javadocs</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<attach>true</attach>
</configuration>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-source-plugin</artifactId>
<executions>
<execution>
<id>attach-sources</id>
<goals>
<goal>jar</goal>
</goals>
<configuration>
<attach>true</attach>
</configuration>
</execution>
</executions>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>