Compare commits

...
Sign in to create a new pull request.

24 commits

Author SHA1 Message Date
27cdc5104b
Reorganize and refurbish .gitignore file 2025-04-11 20:51:55 +02:00
c4abd27ac7
Make deploy script executable
All checks were successful
Build / build (push) Successful in 11s
2025-04-11 12:41:44 +02:00
6b88318bcd
Fix regression of Java sources not being processed before compiling
All checks were successful
Build / build (push) Successful in 11s
2025-04-11 11:48:32 +02:00
96f2dce50f
Add launch configuration for debugging Helma
All checks were successful
Build / build (push) Successful in 34s
2025-04-08 12:05:54 +02:00
f786b40961
Rename the modules project to prevent VSC from renaming the main project to helma_
Does not work, unfortunately
2025-04-08 12:04:55 +02:00
8caf790529
Remove custom configuration of Gradle sourceSets
Using the sources in build creates a lot of confusion in VSC
2025-04-08 12:04:54 +02:00
e6c974120b
Update .gitigore file for VSC settings 2025-04-08 12:04:53 +02:00
38181e8e00
Update repo URL 2025-03-01 19:32:20 +01:00
8adbd23569
Bump year of copyright notice 2025-03-01 19:32:06 +01:00
e3a7732837
Escape HTML elements in commit messages 2025-03-01 19:21:42 +01:00
d9d3c9b863
Add release notes generated with git-cliff
All checks were successful
Release / release (push) Successful in 31s
2025-03-01 16:57:02 +01:00
808bc48ab9
Run the build workflow when itself has changed
All checks were successful
Build / build (push) Successful in 23s
2025-02-28 22:15:00 +01:00
6ebdd6aa31
Leave aside compiling for different Java versions for now 2025-02-28 22:15:00 +01:00
2ff29317e5
Gradle is installed on the runner 2025-02-28 22:09:55 +01:00
84333d05cd
Use fully qualified URL for setup-java action 2025-02-28 22:04:48 +01:00
3a8997ca5c
Initial commit
Some checks failed
Build / build (11) (push) Failing after 0s
Build / build (17) (push) Failing after 0s
Build / build (21) (push) Failing after 0s
2025-02-28 21:58:08 +01:00
8212600d40
Add deploy script usable with rsync and a restricted SSH key 2025-02-28 21:43:19 +01:00
1bb5a093da
Re-enable creating the release at Github after install of gh client
All checks were successful
Release / build (push) Successful in 26s
2025-02-15 19:49:13 +01:00
2c6dd96cd7
Merge branch 'main' into renovate/commons-codec-commons-codec-1.x 2025-02-15 18:39:26 +01:00
6f6ea55b7b Update dependency com.google.code.gson:gson to v2.12.1 2025-02-15 17:36:51 +00:00
b1a14ad87b Update dependency commons-logging:commons-logging to v1.3.5 2025-02-15 17:36:40 +00:00
d1ead6e081 Update Jetty packages to v9.4.57.v20241219 2025-02-15 17:36:29 +00:00
94557dd28e Update dependency gradle to v8.12.1 2025-02-15 17:35:46 +00:00
e2e67cf2cc Update dependency commons-codec:commons-codec to v1.18.0 2025-01-27 18:13:44 +00:00
11 changed files with 213 additions and 44 deletions

22
.github/workflows/build.yml vendored Normal file
View file

@ -0,0 +1,22 @@
name: Build
on:
push:
paths:
- .github/workflows/build.yml
- build.gradle
- settings.gradle
- src/**
- launcher/build.gradle
- launcher/src/**
workflow_dispatch:
jobs:
build:
runs-on: antville
steps:
- uses: actions/checkout@v4
- name: Compile with Gradle
run: ./gradlew :compileJava

View file

@ -9,16 +9,27 @@ permissions:
contents: write contents: write
jobs: jobs:
build: release:
runs-on: antville runs-on: antville
env: env:
GH_TOKEN: ${{ github.token }} GH_TOKEN: ${{ secrets.GH_TOKEN }}
LC_TIME: en_US.UTF-8 LC_TIME: en_US.UTF-8
TODAY: $(date +'%d %b %Y')
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Create release notes
id: create_release_notes
run: |
release_notes=$(npx git-cliff@latest --latest)
# Write the release notes as a heredoc to the workflow output
# ⚠️ No white space around `<<` is crucial!
echo "release_notes<<.eot0x03" >> $GITHUB_OUTPUT
echo "$release_notes" >> $GITHUB_OUTPUT
echo ".eot0x03" >> $GITHUB_OUTPUT
- name: Build with Gradle - name: Build with Gradle
run: ./gradlew assembleDist run: ./gradlew assembleDist
@ -29,23 +40,20 @@ jobs:
direction: upload direction: upload
url: https://code.host.antville.org url: https://code.host.antville.org
token: ${{ github.token }} token: ${{ github.token }}
title: ${{ env.TODAY }} title: Helma ${{ github.ref_name }}
#tag: $(date +'%Y.%m.%d')
release-dir: build/distributions release-dir: build/distributions
release-notes-assistant: true release-notes: ${{ steps.create_release_notes.outputs.release_notes }}
verbose: true verbose: true
- name: Create release at GitHub - name: Create release at GitHub
# FIXME: Currently only outputs gh command; adapt for Forgejo
run: | run: |
echo gh release create "$GITHUB_REF_NAME" \ gh release create "$GITHUB_REF_NAME" \
--repo "$GITHUB_REPOSITORY" \ --repo "$GITHUB_REPOSITORY" \
--title "$(date +'%d %b %Y')" \ --title "Helma ${{ github.ref_name }}" \
--generate-notes --notes "${{ steps.create_release_notes.outputs.release_notes }}"
- name: Upload release assets to GitHub - name: Upload release assets to GitHub
# FIXME: Currently only outputs gh command; adapt for Forgejo
run: | run: |
echo gh release upload "$GITHUB_REF_NAME" \ gh release upload "$GITHUB_REF_NAME" build/distributions/helma-*.* \
build/distributions/helma-*.* \ --repo "$GITHUB_REPOSITORY" \
--clobber --clobber

32
.gitignore vendored
View file

@ -1,22 +1,30 @@
.gradle # Generally ignore hidden files
.idea .*
.settings
build
/apps # Manage some Codium configuration
.vscode/*
!.vscode
!.vscode/extensions.json
!.vscode/launch.json
!.vscode/settings.json
!.vscode/tasks.json
# Ignore files created during build or run
/bin /bin
/backups /backups
/db build
/docs /docs
/extras
/lib /lib
/licenses /licenses
/log /log
# Ignore files managed in src/dist
/*.properties
/apps
/db
/extras
/launcher.jar
/static /static
/*.properties # Manage Gradle configuration
/launcher.jar
/passwd
/start.*
!/gradle.properties !/gradle.properties

21
.vscode/launch.json vendored Normal file
View file

@ -0,0 +1,21 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Current File",
"request": "launch",
"mainClass": "${file}"
},
{
"type": "java",
"name": "Debug",
"request": "launch",
"mainClass": "helma.main.Server",
"projectName": "helma_"
}
]
}

View file

@ -1,6 +1,6 @@
# License # License
Copyright (c) 1999-2008 Helma Project. All rights reserved. Copyright (c) 1999-2025 Helma Project. All rights reserved.
Redistribution and use in source and binary forms, with or without Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions modification, are permitted provided that the following conditions

View file

@ -3,7 +3,7 @@
## TL;DR ## TL;DR
- Make sure you have Java 11 or higher installed - Make sure you have Java 11 or higher installed
- Download and unpack the [latest release](https://github.com/antville/helma/releases) - Download and unpack the [latest release](https://code.host.antville.org/antville/helma/releases)
- Invoke `./bin/helma`, resp. `./bin/helma.bat`, depending on your platform - Invoke `./bin/helma`, resp. `./bin/helma.bat`, depending on your platform
- Direct your web browser to <http://localhost:8080> - Direct your web browser to <http://localhost:8080>

View file

@ -42,15 +42,6 @@ if (JavaVersion.current().isJava8Compatible()) {
} }
} }
sourceSets {
main {
java {
// Sources in `src` will be available here after processing
srcDirs = ["$buildDir/src/main/java"]
}
}
}
configurations { configurations {
// Wrapping implementation because it does not allow access to its files // Wrapping implementation because it does not allow access to its files
// (i.e. cannot be resolved) // (i.e. cannot be resolved)
@ -58,16 +49,16 @@ configurations {
} }
dependencies { dependencies {
implementation 'com.google.code.gson:gson:2.11.0' implementation 'com.google.code.gson:gson:2.12.1'
implementation 'commons-codec:commons-codec:1.17.1' implementation 'commons-codec:commons-codec:1.18.0'
implementation 'commons-fileupload:commons-fileupload:1.5' implementation 'commons-fileupload:commons-fileupload:1.5'
implementation 'commons-logging:commons-logging:1.3.4' implementation 'commons-logging:commons-logging:1.3.5'
implementation 'commons-net:commons-net:3.11.1' implementation 'commons-net:commons-net:3.11.1'
implementation 'com.sun.mail:javax.mail:1.6.2' implementation 'com.sun.mail:javax.mail:1.6.2'
implementation 'javax.servlet:javax.servlet-api:4.0.1' implementation 'javax.servlet:javax.servlet-api:4.0.1'
implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
implementation 'org.eclipse.jetty:jetty-servlet:9.4.56.v20240826' implementation 'org.eclipse.jetty:jetty-servlet:9.4.57.v20241219'
implementation 'org.eclipse.jetty:jetty-xml:9.4.56.v20240826' implementation 'org.eclipse.jetty:jetty-xml:9.4.57.v20241219'
implementation 'org.mozilla:rhino-all:1.8.0' implementation 'org.mozilla:rhino-all:1.8.0'
implementation 'org.sejda.imageio:webp-imageio:0.1.6' implementation 'org.sejda.imageio:webp-imageio:0.1.6'
implementation 'xerces:xercesImpl:2.12.2' implementation 'xerces:xercesImpl:2.12.2'
@ -156,9 +147,11 @@ installDist {
dependsOn build dependsOn build
} }
tasks.register('processSource', Sync) { def processSource = tasks.register('processSource', Sync) {
def gitOutput = new ByteArrayOutputStream() def gitOutput = new ByteArrayOutputStream()
outputs.dir "${project.buildDir}/src"
exec { exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD' commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = gitOutput standardOutput = gitOutput
@ -173,9 +166,11 @@ tasks.register('processSource', Sync) {
.replaceAll('__builddate__', new Date().format("d MMM yyyy")) .replaceAll('__builddate__', new Date().format("d MMM yyyy"))
.replaceAll('__commithash__', gitOutput.toString().trim()) .replaceAll('__commithash__', gitOutput.toString().trim())
.replaceAll('__version__', version) .replaceAll('__version__', version)
} into "${project.buildDir}/src" } into outputs.files.singleFile
} }
tasks.compileJava.source = processSource.map { it.outputs.files }
tasks.register('update') { tasks.register('update') {
dependsOn installDist dependsOn installDist

52
cliff.toml Normal file
View file

@ -0,0 +1,52 @@
# git-cliff ~ default configuration file
# https://git-cliff.org/docs/configuration
#
# Lines starting with "#" are comments.
# Configuration options are organized into tables and keys.
# See documentation for more information on available options.
[changelog]
trim = true
header = "## Changes"
body = """
{% for group, commits in commits | filter(attribute="merge_commit") | group_by(attribute="group") %}
### {{ group | striptags | trim | upper_first }}
{% for commit in commits %}
* [<tt>{{ commit.id | split(pat="") | slice(end=11) | join() }}</tt>]\
(https://code.host.antville.org/antville/helma/commit/{{ commit.id }}) \
{% if commit.breaking %}**Breaking:** {% endif %}\
{{ commit.message | split(pat="\\n") | first | upper_first | escape }}\
{% endfor %}
{% endfor %}
**Full Changelog:** [{{ previous.version }} {{ version }}]\
(https://code.host.antville.org/antville/helma/compare/\
{{ previous.version | urlencode }}..{{ version | urlencode }})\n\n
"""
footer = """
Generated by [git-cliff](https://git-cliff.org/).
"""
[git]
conventional_commits = false
filter_commits = false
filter_unconventional = false
protect_breaking_commits = false
sort_commits = "newest"
split_commits = false
topo_order = false
commit_parsers = [
{ message = "^Apply \\d+ suggestion", skip = true },
{ message = "^Merge .*(branch|dependabot|dependency|renovate)", skip = true },
{ message = "^Lock file maintenance", skip = true },
{ message = "yarn\\.lock", skip = true },
{ message = "^[Ff]ix", group = "<!-- 0 --> 🐛 Bug Fixes" },
{ field = "author.name", pattern = "[Rr]enovate|[Dd]ependabot", group = "<!-- 3 --> 📦 Dependency Updates" },
{ message = "^Merge pull request", group = "<!-- 1 --> 🔀 Merges" },
{ message = ".*", group = "<!-- 2 --> Uncategorized" },
]

View file

@ -1,6 +1,6 @@
distributionBase=GRADLE_USER_HOME distributionBase=GRADLE_USER_HOME
distributionPath=wrapper/dists distributionPath=wrapper/dists
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
networkTimeout=10000 networkTimeout=10000
validateDistributionUrl=true validateDistributionUrl=true
zipStoreBase=GRADLE_USER_HOME zipStoreBase=GRADLE_USER_HOME

View file

@ -16,3 +16,6 @@ project(':modules').projectDir = file('modules/helma')
project(':jala').projectDir = file('modules/jala') project(':jala').projectDir = file('modules/jala')
project(':hopKit').projectDir = file('modules/jala/util/HopKit') project(':hopKit').projectDir = file('modules/jala/util/HopKit')
project(':test').projectDir = file('modules/jala/util/Test') project(':test').projectDir = file('modules/jala/util/Test')
// Rename this project to prevent redundancy and renaming of main project (VSC does not care, though)
project(':modules').name = 'modules'

60
src/dist/extras/deploy.sh vendored Executable file
View file

@ -0,0 +1,60 @@
#!/bin/sh
# Use this script as forced command of an authorized SSH key:
# command="/home/helma/extras/deploy.sh" ssh-ed25519 AAAAC3NzaC…
# Define HELMA_HOST and ANTVILLE_HOST in this file
# shellcheck source=/dev/null
. "$HOME"/deploy.env
case "$SSH_ORIGINAL_COMMAND" in
ping)
echo pong
;;
deploy-helma)
rsync ./ "$HELMA_HOST":./ \
--archive --compress --delete --verbose \
--filter '+ /bin' \
--filter '+ /extras' \
--filter '+ /launcher.jar' \
--filter '- /lib/ext' \
--filter '+ /lib' \
--filter '+ /modules' \
--filter '- /*'
printf 'Restarting Helma on HELMA_host… '
ssh "$HELMA_HOST" sudo /bin/systemctl restart helma
;;
deploy-antville)
rsync ./apps/antville/ "$ANTVILLE_HOST":./apps/antville/ \
--archive --compress --delete --verbose \
--filter '+ /claustra' \
--filter '+ /code' \
--filter '+ /compat' \
--filter '+ /i18n' \
--filter '+ /lib' \
--filter '- /*'
rsync ./apps/antville/static/helma/ "$ANTVILLE_HOST":./apps/antville/static/helma/ \
--archive --compress --verbose \
--filter '+ /fonts' \
--filter '+ /formica.html' \
--filter '+ /img' \
--filter '+ /scripts' \
--filter '+ /styles' \
--filter '- /*'
printf 'Restarting Helma on ANTVILLE_host… '
ssh "$ANTVILLE_HOST" sudo /bin/systemctl restart helma
;;
restart)
printf 'Restarting Helma… '
sudo /bin/systemctl restart helma
printf '%s\n' 'done.'
;;
*)
# Allow any rsync command but restrict it to the installation directory
rrsync -wo /home/helma
;;
esac