Compare commits
2 commits
main
...
renovate/l
Author | SHA1 | Date | |
---|---|---|---|
|
4b8d121266 | ||
85f6102112 |
25 changed files with 228 additions and 378 deletions
22
.github/workflows/build.yml
vendored
22
.github/workflows/build.yml
vendored
|
@ -1,22 +0,0 @@
|
|||
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
|
15
.github/workflows/deploy.yml
vendored
15
.github/workflows/deploy.yml
vendored
|
@ -1,15 +0,0 @@
|
|||
name: Deploy (Production)
|
||||
|
||||
on: workflow_dispatch
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: antville
|
||||
|
||||
environment:
|
||||
name: antville.org
|
||||
url: https://antville.org
|
||||
|
||||
steps:
|
||||
- name: Copy files to production server
|
||||
run: ssh staging-server deploy-helma
|
50
.github/workflows/release.yml
vendored
50
.github/workflows/release.yml
vendored
|
@ -1,59 +1,45 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags: '2*'
|
||||
tags:
|
||||
- 'v*'
|
||||
|
||||
permissions:
|
||||
contents: write
|
||||
|
||||
jobs:
|
||||
release:
|
||||
runs-on: antville
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
GH_TOKEN: ${{ secrets.GH_TOKEN }}
|
||||
GH_TOKEN: ${{ github.token }}
|
||||
LC_TIME: en_US.UTF-8
|
||||
|
||||
steps:
|
||||
- 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: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew assembleDist
|
||||
|
||||
- name: Create release
|
||||
uses: actions/forgejo-release@v2
|
||||
with:
|
||||
direction: upload
|
||||
url: https://code.host.antville.org
|
||||
token: ${{ github.token }}
|
||||
title: Helma ${{ github.ref_name }}
|
||||
release-dir: build/distributions
|
||||
release-notes: ${{ steps.create_release_notes.outputs.release_notes }}
|
||||
verbose: true
|
||||
|
||||
- name: Create release at GitHub
|
||||
run: |
|
||||
gh release create "$GITHUB_REF_NAME" \
|
||||
--repo "$GITHUB_REPOSITORY" \
|
||||
--title "Helma ${{ github.ref_name }}" \
|
||||
--notes "${{ steps.create_release_notes.outputs.release_notes }}"
|
||||
--title "$(date +'%d %b %Y')" \
|
||||
--generate-notes
|
||||
|
||||
- name: Upload release assets to GitHub
|
||||
- name: Upload assets
|
||||
run: |
|
||||
gh release upload "$GITHUB_REF_NAME" build/distributions/helma-*.* \
|
||||
--repo "$GITHUB_REPOSITORY" \
|
||||
gh release upload "$GITHUB_REF_NAME" \
|
||||
build/distributions/helma-*.* \
|
||||
--clobber
|
||||
|
|
44
.github/workflows/renovate.yml
vendored
44
.github/workflows/renovate.yml
vendored
|
@ -1,44 +0,0 @@
|
|||
name: Run Renovate
|
||||
|
||||
on:
|
||||
schedule:
|
||||
- cron: "13 * * * *"
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
renovate:
|
||||
runs-on: antville
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Run Renovate
|
||||
# See <https://docs.renovatebot.com/troubleshooting/#log-debug-levels>
|
||||
# debug | info | warn | error | fatal
|
||||
run: LOG_LEVEL=info npx renovate
|
||||
env:
|
||||
# Renovate is using this token to retrieve release notes
|
||||
GITHUB_COM_TOKEN: ${{ secrets.renovate_github_com_token }}
|
||||
# Autodiscover is better suited for an extra repo running Renovate on all desired repos
|
||||
#RENOVATE_AUTODISCOVER: 'true'
|
||||
RENOVATE_CONFIG_FILE: renovate.json
|
||||
RENOVATE_ENDPOINT: ${{ github.api_url }}
|
||||
RENOVATE_GIT_AUTHOR: Renovate Bot <mail+renovate@antville.org>
|
||||
#RENOVATE_GIT_IGNORED_AUTHORS:
|
||||
# - 29139614+renovate[bot]@users.noreply.github.com
|
||||
RENOVATE_IGNORE_PR_AUTHOR: 'true'
|
||||
RENOVATE_LOG_FILE: renovate-log.ndjson
|
||||
RENOVATE_LOG_FILE_LEVEL: debug
|
||||
RENOVATE_PLATFORM: gitea
|
||||
RENOVATE_REPOSITORIES: ${{ github.repository }}
|
||||
RENOVATE_REPOSITORY_CACHE: 'enabled'
|
||||
# github.token is not working here, it lacks some permissions required by Renovate
|
||||
RENOVATE_TOKEN: ${{ secrets.renovate_token }}
|
||||
|
||||
- name: Save log file
|
||||
# FIXME: v4 of this action causes an error on Forgejo (“You must configure a GitHub token”)
|
||||
uses: actions/upload-artifact@v3
|
||||
if: always()
|
||||
with:
|
||||
name: renovate-log.ndjson
|
||||
path: renovate-log.ndjson
|
31
.github/workflows/stage.yml
vendored
31
.github/workflows/stage.yml
vendored
|
@ -4,29 +4,42 @@ on: workflow_dispatch
|
|||
|
||||
jobs:
|
||||
stage:
|
||||
runs-on: antville
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
environment:
|
||||
name: stage
|
||||
url: ${{ vars.stage_url }}
|
||||
url: https://antville-test.click
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up SSH agent
|
||||
uses: ./.github/actions/ssh
|
||||
with:
|
||||
config: ${{ vars.SSH_CONFIG }}
|
||||
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||
known-hosts: ${{ vars.SSH_KNOWN_HOSTS }}
|
||||
|
||||
- name: Set up Java
|
||||
uses: actions/setup-java@v4
|
||||
with:
|
||||
distribution: temurin
|
||||
java-version: 21
|
||||
|
||||
- name: Set up Gradle
|
||||
uses: gradle/actions/setup-gradle@v3
|
||||
|
||||
- name: Build with Gradle
|
||||
run: ./gradlew installDist
|
||||
|
||||
- name: Publish to staging server
|
||||
run: |
|
||||
rsync ./build/install/helma/ staging-server:./ \
|
||||
rsync build/install/helma/ antville.dev:/ \
|
||||
--verbose --archive --delete --compress \
|
||||
--filter '+ /bin' \
|
||||
--filter '+ /extras' \
|
||||
--filter 'protect /lib/ext' \
|
||||
--filter '+ /launcher.jar' \
|
||||
--filter '- /lib/ext' \
|
||||
--filter '+ /lib' \
|
||||
--filter '+ /modules' \
|
||||
--filter '- /*'
|
||||
--filter '- /*' \
|
||||
|
||||
- name: Restart Helma
|
||||
run: ssh staging-server restart
|
||||
run: ssh antville.dev restart
|
||||
|
|
32
.gitignore
vendored
32
.gitignore
vendored
|
@ -1,30 +1,22 @@
|
|||
# Generally ignore hidden files
|
||||
.*
|
||||
.gradle
|
||||
.idea
|
||||
.settings
|
||||
build
|
||||
|
||||
# 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
|
||||
/apps
|
||||
/bin
|
||||
/backups
|
||||
build
|
||||
/db
|
||||
/docs
|
||||
/extras
|
||||
/lib
|
||||
/licenses
|
||||
/log
|
||||
|
||||
# Ignore files managed in src/dist
|
||||
/*.properties
|
||||
/apps
|
||||
/db
|
||||
/extras
|
||||
/launcher.jar
|
||||
/static
|
||||
|
||||
# Manage Gradle configuration
|
||||
/*.properties
|
||||
/launcher.jar
|
||||
/passwd
|
||||
/start.*
|
||||
|
||||
!/gradle.properties
|
||||
|
|
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
|
@ -1,6 +1,5 @@
|
|||
{
|
||||
"recommendations": [
|
||||
"vscjava.vscode-java-pack",
|
||||
"vscjava.vscode-gradle"
|
||||
"vscjava.vscode-java-pack"
|
||||
]
|
||||
}
|
||||
|
|
103
.vscode/launch.json
vendored
103
.vscode/launch.json
vendored
|
@ -1,21 +1,84 @@
|
|||
{
|
||||
// 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_"
|
||||
}
|
||||
]
|
||||
}
|
||||
// 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": "ImageInfo",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.image.ImageInfo",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "CommandlineRunner",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.main.CommandlineRunner",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Server",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.main.Server",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "XmlConverter",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.objectmodel.dom.XmlConverter",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Crypt",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.util.Crypt",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "HtmlEncoder",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.util.HtmlEncoder",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Logo",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.util.Logo",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "MarkdownProcessor",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.util.MarkdownProcessor",
|
||||
"projectName": "helma_"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Commandline",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.main.launcher.Commandline",
|
||||
"projectName": "launcher"
|
||||
},
|
||||
{
|
||||
"type": "java",
|
||||
"name": "Main",
|
||||
"request": "launch",
|
||||
"mainClass": "helma.main.launcher.Main",
|
||||
"projectName": "launcher"
|
||||
}
|
||||
]
|
||||
}
|
|
@ -1,6 +1,6 @@
|
|||
# License
|
||||
|
||||
Copyright (c) 1999-2025 Helma Project. All rights reserved.
|
||||
Copyright (c) 1999-2008 Helma Project. All rights reserved.
|
||||
|
||||
Redistribution and use in source and binary forms, with or without
|
||||
modification, are permitted provided that the following conditions
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
## TL;DR
|
||||
|
||||
- Make sure you have Java 11 or higher installed
|
||||
- Download and unpack the [latest release](https://code.host.antville.org/antville/helma/releases)
|
||||
- Download and unpack the [latest release](https://github.com/antville/helma/releases)
|
||||
- Invoke `./bin/helma`, resp. `./bin/helma.bat`, depending on your platform
|
||||
- Direct your web browser to <http://localhost:8080>
|
||||
|
||||
|
@ -33,12 +33,10 @@ Helma is built with [Gradle](https://gradle.org), the build task depends on the
|
|||
|
||||
### Additional Prerequisites
|
||||
|
||||
* [Node.js](https://nodejs.org) LTS version
|
||||
* [Rsync](https://rsync.samba.org) version ≥ 3.1.0
|
||||
* [Node.js](https://nodejs.org) LTS version
|
||||
|
||||
Clone this repository to your machine and run Helma with `./gradlew run`.
|
||||
|
||||
To update the installation from a build, run `./gradlew update` and enter `yes` at the prompt.
|
||||
Clone this repository to your machine and start the build process with `./gradlew install`. The build script is going to ask you if you want to update the installation, enter `yes` or `no`.
|
||||
|
||||
> ⚠️
|
||||
> Please be aware that this step is going to overwrite files in the installation directory – escpecially at a later time when there might be substantial changes. Should this happen by accident you find the previous installation in the `backups` directory.
|
||||
|
|
137
build.gradle
137
build.gradle
|
@ -1,6 +1,6 @@
|
|||
plugins {
|
||||
id 'application'
|
||||
id 'com.github.jk1.dependency-license-report' version '2.9'
|
||||
id 'com.github.jk1.dependency-license-report' version '2.7'
|
||||
}
|
||||
|
||||
import org.apache.tools.ant.filters.FixCrLfFilter
|
||||
|
@ -17,7 +17,7 @@ def textFiles = ['**/*.hac', '**/.html', '**/*.js', '**/*.md', '**/*.properties'
|
|||
allprojects {
|
||||
apply plugin: 'java'
|
||||
|
||||
java {
|
||||
compileJava {
|
||||
sourceCompatibility = JavaVersion.VERSION_11
|
||||
targetCompatibility = JavaVersion.VERSION_11
|
||||
}
|
||||
|
@ -27,7 +27,7 @@ allprojects {
|
|||
}
|
||||
}
|
||||
|
||||
version = new Date().format("yy.M.d")
|
||||
version = new Date().format("yyyyMMdd")
|
||||
|
||||
tasks.build.dependsOn javadoc, 'jsdoc', 'generateLicenseReport'
|
||||
tasks.compileJava.dependsOn 'processSource'
|
||||
|
@ -42,6 +42,15 @@ if (JavaVersion.current().isJava8Compatible()) {
|
|||
}
|
||||
}
|
||||
|
||||
sourceSets {
|
||||
main {
|
||||
java {
|
||||
// Sources in `src` will be available here after processing
|
||||
srcDirs = ["$buildDir/src/main/java"]
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
configurations {
|
||||
// Wrapping implementation because it does not allow access to its files
|
||||
// (i.e. cannot be resolved)
|
||||
|
@ -49,17 +58,17 @@ configurations {
|
|||
}
|
||||
|
||||
dependencies {
|
||||
implementation 'com.google.code.gson:gson:2.12.1'
|
||||
implementation 'commons-codec:commons-codec:1.18.0'
|
||||
implementation 'com.google.code.gson:gson:2.11.0'
|
||||
implementation 'commons-codec:commons-codec:1.17.0'
|
||||
implementation 'commons-fileupload:commons-fileupload:1.5'
|
||||
implementation 'commons-logging:commons-logging:1.3.5'
|
||||
implementation 'commons-net:commons-net:3.11.1'
|
||||
implementation 'commons-logging:commons-logging:1.3.2'
|
||||
implementation 'commons-net:commons-net:3.10.0'
|
||||
implementation 'com.sun.mail:javax.mail:1.6.2'
|
||||
implementation 'javax.servlet:javax.servlet-api:4.0.1'
|
||||
implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
|
||||
implementation 'org.eclipse.jetty:jetty-servlet:9.4.57.v20241219'
|
||||
implementation 'org.eclipse.jetty:jetty-xml:9.4.57.v20241219'
|
||||
implementation 'org.mozilla:rhino-all:1.8.0'
|
||||
implementation 'org.eclipse.jetty:jetty-servlet:9.4.54.v20240208'
|
||||
implementation 'org.eclipse.jetty:jetty-xml:9.4.54.v20240208'
|
||||
implementation 'org.mozilla:rhino:1.7.13'
|
||||
implementation 'org.sejda.imageio:webp-imageio:0.1.6'
|
||||
implementation 'xerces:xercesImpl:2.12.2'
|
||||
implementation 'xmlrpc:xmlrpc:2.0.1'
|
||||
|
@ -69,37 +78,6 @@ def rhinoJar = configurations.library.files.find { jar ->
|
|||
jar.name.startsWith('rhino')
|
||||
}
|
||||
|
||||
run {
|
||||
jvmArgs jettyLogLevel, suppressMacosDockIcon
|
||||
classpath += fileTree(dir: 'lib/ext', include: '*.jar')
|
||||
}
|
||||
|
||||
application {
|
||||
mainClass = 'helma.main.Server'
|
||||
|
||||
applicationDistribution.from(projectDir) {
|
||||
include 'modules/**'
|
||||
include 'LICENSE.md'
|
||||
include 'README.md'
|
||||
include 'start.*'
|
||||
}
|
||||
|
||||
applicationDistribution.from(javadoc.destinationDir) {
|
||||
include '**'
|
||||
into 'docs/javadoc'
|
||||
}
|
||||
|
||||
applicationDistribution.from("${project.buildDir}/docs/jsdoc") {
|
||||
include '**'
|
||||
into 'docs/jsdoc'
|
||||
}
|
||||
|
||||
applicationDistribution.from("${project.buildDir}/reports/dependency-license") {
|
||||
include '**'
|
||||
into 'licenses'
|
||||
}
|
||||
}
|
||||
|
||||
startScripts {
|
||||
applicationName = 'helma'
|
||||
classpath = files('../launcher.jar')
|
||||
|
@ -125,6 +103,30 @@ distributions {
|
|||
}
|
||||
}
|
||||
|
||||
application {
|
||||
applicationDistribution.from(projectDir) {
|
||||
include 'modules/**'
|
||||
include 'LICENSE.md'
|
||||
include 'README.md'
|
||||
include 'start.*'
|
||||
}
|
||||
|
||||
applicationDistribution.from(javadoc.destinationDir) {
|
||||
include '**'
|
||||
into 'docs/javadoc'
|
||||
}
|
||||
|
||||
applicationDistribution.from("${project.buildDir}/docs/jsdoc") {
|
||||
include '**'
|
||||
into 'docs/jsdoc'
|
||||
}
|
||||
|
||||
applicationDistribution.from("${project.buildDir}/reports/dependency-license") {
|
||||
include '**'
|
||||
into 'licenses'
|
||||
}
|
||||
}
|
||||
|
||||
distTar {
|
||||
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
|
||||
|
||||
|
@ -145,35 +147,42 @@ distZip {
|
|||
|
||||
installDist {
|
||||
dependsOn build
|
||||
|
||||
if (!System.getenv('CI')) {
|
||||
finalizedBy 'update'
|
||||
}
|
||||
}
|
||||
|
||||
def processSource = tasks.register('processSource', Sync) {
|
||||
run {
|
||||
classpath = files('launcher.jar')
|
||||
jvmArgs jettyLogLevel, suppressMacosDockIcon
|
||||
}
|
||||
|
||||
task processSource(type: Sync) {
|
||||
def date = new Date().format("MMMM dd, yyyy")
|
||||
def gitOutput = new ByteArrayOutputStream()
|
||||
|
||||
outputs.dir "${project.buildDir}/src"
|
||||
|
||||
exec {
|
||||
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
||||
commandLine 'git', 'describe'
|
||||
standardOutput = gitOutput
|
||||
errorOutput = new ByteArrayOutputStream()
|
||||
ignoreExitValue = true
|
||||
}
|
||||
|
||||
def description = date
|
||||
def tag = gitOutput.toString().trim()
|
||||
|
||||
// TODO: Implement extended description in Java code
|
||||
if (tag) description = "$tag; $description"
|
||||
|
||||
from 'src'
|
||||
|
||||
filter {
|
||||
line -> line
|
||||
.replaceAll('__builddate__', new Date().format("d MMM yyyy"))
|
||||
.replaceAll('__commithash__', gitOutput.toString().trim())
|
||||
.replaceAll('__version__', version)
|
||||
} into outputs.files.singleFile
|
||||
line -> line.replaceAll('__builddate__', date)
|
||||
} into "${project.buildDir}/src"
|
||||
}
|
||||
|
||||
tasks.compileJava.source = processSource.map { it.outputs.files }
|
||||
|
||||
tasks.register('update') {
|
||||
dependsOn installDist
|
||||
|
||||
task update {
|
||||
def rsyncArgs = ['--archive', '--filter', '- backups']
|
||||
|
||||
def confirm = {
|
||||
|
@ -217,7 +226,7 @@ tasks.register('update') {
|
|||
}
|
||||
}
|
||||
|
||||
tasks.register('jsdoc', Exec) {
|
||||
task jsdoc(type: Exec) {
|
||||
description 'Generates JSDoc API documentation for the included JavaScript modules.'
|
||||
group 'Documentation'
|
||||
|
||||
|
@ -231,7 +240,7 @@ tasks.register('jsdoc', Exec) {
|
|||
args = ['jsdoc', '-d', "$destination"].plus(sources)
|
||||
}
|
||||
|
||||
tasks.register('xgettext', JavaExec) {
|
||||
task xgettext(type: JavaExec) {
|
||||
description 'Extracts translatable message strings from source code.'
|
||||
group 'i18n'
|
||||
|
||||
|
@ -248,7 +257,7 @@ tasks.register('xgettext', JavaExec) {
|
|||
]
|
||||
}
|
||||
|
||||
tasks.register('po2js', JavaExec) {
|
||||
task po2js(type: JavaExec) {
|
||||
description 'Converts translated message strings from PO format to JavaScript.'
|
||||
group 'i18n'
|
||||
|
||||
|
@ -263,7 +272,7 @@ tasks.register('po2js', JavaExec) {
|
|||
]
|
||||
}
|
||||
|
||||
tasks.register('rhinoShell', JavaExec) {
|
||||
task rhinoShell(type: JavaExec) {
|
||||
description 'Runs the interactive Rhino JavaScript shell.'
|
||||
group 'Application'
|
||||
|
||||
|
@ -275,7 +284,7 @@ tasks.register('rhinoShell', JavaExec) {
|
|||
|
||||
// Call this task with a function definition using the `-P` parameter, e.g.
|
||||
// `./gradlew commandLine -Pfunction=manage.getAllApplications`
|
||||
tasks.register('commandLine', JavaExec) {
|
||||
task commandLine(type: JavaExec) {
|
||||
description 'Runs a function in a Helma application with `-Pfunction=app.functionName`.'
|
||||
group 'Application'
|
||||
|
||||
|
@ -283,11 +292,3 @@ tasks.register('commandLine', JavaExec) {
|
|||
mainClass = 'helma.main.launcher.Commandline'
|
||||
args '-h', projectDir, function
|
||||
}
|
||||
|
||||
tasks.register('debug', JavaExec) {
|
||||
group = 'application'
|
||||
main = 'helma.main.Server'
|
||||
classpath = sourceSets.main.runtimeClasspath
|
||||
jvmArgs = ['-agentlib:jdwp=transport=dt_socket,server=y,suspend=n,address=*:5005']
|
||||
classpath += fileTree(dir: 'lib/ext', include: '*.jar')
|
||||
}
|
||||
|
|
52
cliff.toml
52
cliff.toml
|
@ -1,52 +0,0 @@
|
|||
# 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" },
|
||||
]
|
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
BIN
gradle/wrapper/gradle-wrapper.jar
vendored
Binary file not shown.
2
gradle/wrapper/gradle-wrapper.properties
vendored
2
gradle/wrapper/gradle-wrapper.properties
vendored
|
@ -1,6 +1,6 @@
|
|||
distributionBase=GRADLE_USER_HOME
|
||||
distributionPath=wrapper/dists
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12.1-bin.zip
|
||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.8-bin.zip
|
||||
networkTimeout=10000
|
||||
validateDistributionUrl=true
|
||||
zipStoreBase=GRADLE_USER_HOME
|
||||
|
|
4
gradlew
vendored
4
gradlew
vendored
|
@ -15,8 +15,6 @@
|
|||
# See the License for the specific language governing permissions and
|
||||
# limitations under the License.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
#
|
||||
|
||||
##############################################################################
|
||||
#
|
||||
|
@ -86,7 +84,7 @@ done
|
|||
# shellcheck disable=SC2034
|
||||
APP_BASE_NAME=${0##*/}
|
||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
||||
|
||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||
MAX_FD=maximum
|
||||
|
|
2
gradlew.bat
vendored
2
gradlew.bat
vendored
|
@ -13,8 +13,6 @@
|
|||
@rem See the License for the specific language governing permissions and
|
||||
@rem limitations under the License.
|
||||
@rem
|
||||
@rem SPDX-License-Identifier: Apache-2.0
|
||||
@rem
|
||||
|
||||
@if "%DEBUG%"=="" @echo off
|
||||
@rem ##########################################################################
|
||||
|
|
|
@ -1,8 +1,8 @@
|
|||
dependencies {
|
||||
runtimeOnly 'ch.ethz.ganymed:ganymed-ssh2:build209'
|
||||
runtimeOnly 'net.sourceforge.jexcelapi:jxl:2.5.7'
|
||||
runtimeOnly 'org.apache.lucene:lucene-analyzers:2.2.0'
|
||||
runtimeOnly 'org.apache.lucene:lucene-core:2.2.0'
|
||||
runtimeOnly 'org.apache.lucene:lucene-analyzers:2.9.4'
|
||||
runtimeOnly 'org.apache.lucene:lucene-core:2.9.4'
|
||||
}
|
||||
|
||||
jar.enabled = false
|
||||
|
@ -12,7 +12,7 @@ processResources.enabled = false
|
|||
processTestResources.enabled = false
|
||||
test.enabled = false
|
||||
|
||||
tasks.register('deps', Copy) {
|
||||
task deps(type: Copy) {
|
||||
from sourceSets.main.runtimeClasspath
|
||||
into '.'
|
||||
}
|
||||
|
|
|
@ -15,7 +15,7 @@ processResources.enabled = false
|
|||
processTestResources.enabled = false
|
||||
test.enabled = false
|
||||
|
||||
tasks.register('deps', Copy) {
|
||||
task deps(type: Copy) {
|
||||
from sourceSets.main.runtimeClasspath
|
||||
into 'lib'
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ processResources.enabled = false
|
|||
processTestResources.enabled = false
|
||||
test.enabled = false
|
||||
|
||||
tasks.register('deps', Copy) {
|
||||
task deps(type: Copy) {
|
||||
from sourceSets.main.runtimeClasspath
|
||||
into 'lib'
|
||||
}
|
||||
|
|
|
@ -10,7 +10,7 @@ processResources.enabled = false
|
|||
processTestResources.enabled = false
|
||||
test.enabled = false
|
||||
|
||||
tasks.register('deps', Copy) {
|
||||
task deps(type: Copy) {
|
||||
from sourceSets.main.runtimeClasspath
|
||||
into 'code'
|
||||
}
|
||||
|
|
|
@ -16,6 +16,3 @@ project(':modules').projectDir = file('modules/helma')
|
|||
project(':jala').projectDir = file('modules/jala')
|
||||
project(':hopKit').projectDir = file('modules/jala/util/HopKit')
|
||||
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
60
src/dist/extras/deploy.sh
vendored
|
@ -1,60 +0,0 @@
|
|||
#!/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
|
2
src/dist/extras/helma.service
vendored
2
src/dist/extras/helma.service
vendored
|
@ -18,7 +18,7 @@ ExecStart = /usr/bin/java -server \
|
|||
-jar launcher.jar \
|
||||
-w 8080 -x 8081
|
||||
|
||||
ExecReload = /bin/sh -c 'touch apps.properties && touch server.properties'
|
||||
ExecReload = touch apps.properties && touch server.properties
|
||||
ExecStop = /bin/kill -15 $MAINPID
|
||||
|
||||
[Install]
|
||||
|
|
|
@ -36,13 +36,7 @@ import helma.util.ResourceProperties;
|
|||
*/
|
||||
public class Server implements Runnable {
|
||||
// version string
|
||||
public static final String version = "__version__";
|
||||
|
||||
// build date
|
||||
public static final String buildDate = "__builddate__";
|
||||
|
||||
// commit hash
|
||||
public static final String commitHash = "__commithash__";
|
||||
public static final String version = "🐜 (__builddate__)";
|
||||
|
||||
// static server instance
|
||||
private static Server server;
|
||||
|
@ -149,13 +143,17 @@ public class Server implements Runnable {
|
|||
* check if we are running on a Java 2 VM - otherwise exit with an error message
|
||||
*/
|
||||
public static void checkJavaVersion() {
|
||||
String javaVersion = System.getProperty("java.version", "0");
|
||||
int majorVersion = Integer.parseInt(javaVersion.split("\\.")[0]);
|
||||
String javaVersion = System.getProperty("java.version");
|
||||
|
||||
if (majorVersion < 11) {
|
||||
System.err.println("This version of Helma requires Java 11 or greater.");
|
||||
if ((javaVersion == null) || javaVersion.startsWith("1.5")
|
||||
|| javaVersion.startsWith("1.4")
|
||||
|| javaVersion.startsWith("1.3")
|
||||
|| javaVersion.startsWith("1.2")
|
||||
|| javaVersion.startsWith("1.1")
|
||||
|| javaVersion.startsWith("1.0")) {
|
||||
System.err.println("This version of Helma requires Java 1.6 or greater.");
|
||||
|
||||
if (majorVersion == 0) { // don't think this will ever happen, but you never know
|
||||
if (javaVersion == null) { // don't think this will ever happen, but you never know
|
||||
System.err.println("Your Java Runtime did not provide a version number. Please update to a more recent version.");
|
||||
} else {
|
||||
System.err.println("Your Java Runtime is version " + javaVersion +
|
||||
|
|
Loading…
Add table
Reference in a new issue