Compare commits
40 commits
v20240530🐜
...
25.1.3
Author | SHA1 | Date | |
---|---|---|---|
bdd4f7e280 | |||
154a4a916a | |||
a00e2f730a | |||
9c2c603d4a | |||
b0260259ea | |||
|
d3098c892f | ||
a5fa58dc3d | |||
20ea2a8fb9 | |||
de34e49fc0 | |||
|
e93c501149 | ||
|
3809198380 | ||
|
65ac2df0ba | ||
|
12e7f298ad | ||
3365a2ef58 | |||
44f2375749 | |||
|
a975930192 | ||
|
a54b27c4aa | ||
608fd695c4 | |||
87675fd6cd | |||
efb7ad89b3 | |||
5de4616df0 | |||
bd70d2fb62 | |||
0f8bace3dd | |||
c1ad40ef72 | |||
6b694a83ed | |||
79b7e8092b | |||
196794cd93 | |||
ed56cf72f7 | |||
3a9c14898b | |||
82c32bb448 | |||
def303c069 | |||
64bcb63e4a | |||
55dbc0359c | |||
f2feef4332 | |||
14ccdf0691 | |||
4ae840d3c9 | |||
132f8f4d7d | |||
048cdc39f5 | |||
|
6d7774fd2e | ||
0e8ce1d7a7 |
20 changed files with 203 additions and 209 deletions
42
.github/actions/ssh/action.yml
vendored
Normal file
42
.github/actions/ssh/action.yml
vendored
Normal file
|
@ -0,0 +1,42 @@
|
||||||
|
name: SSH setup
|
||||||
|
description: Set up the SSH agent
|
||||||
|
|
||||||
|
inputs:
|
||||||
|
config:
|
||||||
|
description: The SSH configuration
|
||||||
|
required: true
|
||||||
|
key:
|
||||||
|
description: The private SSH key
|
||||||
|
required: true
|
||||||
|
known-hosts:
|
||||||
|
description: The list of known hosts
|
||||||
|
required: true
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: composite
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Configure SSH
|
||||||
|
shell: sh
|
||||||
|
env:
|
||||||
|
CONFIG: ${{ inputs.config }}
|
||||||
|
KNOWN_HOSTS: ${{ inputs.known-hosts }}
|
||||||
|
run: |
|
||||||
|
mkdir -p ~/.ssh
|
||||||
|
echo "${CONFIG}" > ~/.ssh/config
|
||||||
|
echo "${KNOWN_HOSTS}" > ~/.ssh/known_hosts
|
||||||
|
|
||||||
|
- name: Start SSH agent
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
SOCKET: /tmp/ssh-agent.sock
|
||||||
|
run: |
|
||||||
|
echo "SSH_AUTH_SOCK=${SOCKET}" >> $GITHUB_ENV
|
||||||
|
ssh-agent -a ${SOCKET} > /dev/null
|
||||||
|
|
||||||
|
- name: Add SSH key
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
KEY: ${{ inputs.key }}
|
||||||
|
run: |
|
||||||
|
ssh-add - <<< "${KEY}"
|
22
.github/workflows/deploy.yml
vendored
Normal file
22
.github/workflows/deploy.yml
vendored
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
name: Deploy (Production)
|
||||||
|
|
||||||
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
deploy:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
environment:
|
||||||
|
name: weblogs.at
|
||||||
|
url: https://weblogs.at
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- name: Set up SSH agent
|
||||||
|
uses: antville/helma/.github/actions/ssh@helma-🐜
|
||||||
|
with:
|
||||||
|
config: ${{ vars.SSH_CONFIG }}
|
||||||
|
key: ${{ secrets.SSH_PRIVATE_KEY }}
|
||||||
|
known-hosts: ${{ vars.SSH_KNOWN_HOSTS }}
|
||||||
|
|
||||||
|
- name: Copy files to production server
|
||||||
|
run: ssh staging-server deploy-helma
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
|
@ -26,7 +26,7 @@ jobs:
|
||||||
java-version: 21
|
java-version: 21
|
||||||
|
|
||||||
- name: Set up Gradle
|
- name: Set up Gradle
|
||||||
uses: gradle/actions/setup-gradle@v3
|
uses: gradle/actions/setup-gradle@v4
|
||||||
|
|
||||||
- name: Build with Gradle
|
- name: Build with Gradle
|
||||||
run: ./gradlew assembleDist
|
run: ./gradlew assembleDist
|
||||||
|
|
48
.github/workflows/stage.yml
vendored
Normal file
48
.github/workflows/stage.yml
vendored
Normal file
|
@ -0,0 +1,48 @@
|
||||||
|
name: Deploy (Staging)
|
||||||
|
|
||||||
|
on: workflow_dispatch
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
stage:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
environment:
|
||||||
|
name: stage
|
||||||
|
url: https://antville-test.online
|
||||||
|
|
||||||
|
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@v4
|
||||||
|
|
||||||
|
- name: Build with Gradle
|
||||||
|
run: ./gradlew installDist
|
||||||
|
|
||||||
|
- name: Publish to staging server
|
||||||
|
run: |
|
||||||
|
rsync ./build/install/helma/ staging-server:./ \
|
||||||
|
--verbose --archive --delete --compress \
|
||||||
|
--filter '+ /bin' \
|
||||||
|
--filter '+ /extras' \
|
||||||
|
--filter '+ /launcher.jar' \
|
||||||
|
--filter '- /lib/ext' \
|
||||||
|
--filter '+ /lib' \
|
||||||
|
--filter '+ /modules' \
|
||||||
|
--filter '- /*'
|
||||||
|
|
||||||
|
- name: Restart Helma
|
||||||
|
run: ssh staging-server restart
|
50
.github/workflows/staging.yml
vendored
50
.github/workflows/staging.yml
vendored
|
@ -1,50 +0,0 @@
|
||||||
name: Staging
|
|
||||||
|
|
||||||
on:
|
|
||||||
workflow_dispatch
|
|
||||||
|
|
||||||
env:
|
|
||||||
SSH_AUTH_SOCK: /tmp/ssh-agent.sock
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
install:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
|
|
||||||
environment:
|
|
||||||
name: staging
|
|
||||||
url: https://antville-test.click
|
|
||||||
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v4
|
|
||||||
|
|
||||||
- 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: Set up SSH agent
|
|
||||||
run: |
|
|
||||||
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
|
|
||||||
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
|
|
||||||
mkdir -p ~/.ssh
|
|
||||||
echo '${{ vars.SSH_CONFIG }}' > ~/.ssh/config
|
|
||||||
echo '${{ vars.KNOWN_HOSTS }}' > ~/.ssh/known_hosts
|
|
||||||
|
|
||||||
- name: Publish to staging server
|
|
||||||
run: |
|
|
||||||
rsync build/install/helma/ antville.dev:/ \
|
|
||||||
--verbose --archive --delete --compress \
|
|
||||||
--filter '+ launcher.jar' \
|
|
||||||
--filter '+ lib' \
|
|
||||||
--filter '+ *.jar' \
|
|
||||||
--filter '- *' \
|
|
||||||
|
|
||||||
- name: Restart Helma
|
|
||||||
run: ssh antville.dev restart
|
|
3
.vscode/extensions.json
vendored
3
.vscode/extensions.json
vendored
|
@ -1,5 +1,6 @@
|
||||||
{
|
{
|
||||||
"recommendations": [
|
"recommendations": [
|
||||||
"vscjava.vscode-java-pack"
|
"vscjava.vscode-java-pack",
|
||||||
|
"vscjava.vscode-gradle"
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
84
.vscode/launch.json
vendored
84
.vscode/launch.json
vendored
|
@ -1,84 +0,0 @@
|
||||||
{
|
|
||||||
// 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"
|
|
||||||
}
|
|
||||||
]
|
|
||||||
}
|
|
12
README.md
12
README.md
|
@ -2,7 +2,7 @@
|
||||||
|
|
||||||
## TL;DR
|
## TL;DR
|
||||||
|
|
||||||
- Make sure you have Java 17 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://github.com/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>
|
||||||
|
@ -21,9 +21,9 @@ Although Helma became a Grande Dame of server-side JavaScript already decades ag
|
||||||
|
|
||||||
## System Requirements
|
## System Requirements
|
||||||
|
|
||||||
You need a Java virtual machine version 17 or higher to run Helma.
|
You need a Java virtual machine version 11 or higher to run Helma.
|
||||||
|
|
||||||
Please consult the documentation of your platform on how to obtain and install Java.
|
Please consult the documentation of your platform how to obtain and install Java.
|
||||||
|
|
||||||
You also can directly download a [Java runtime or development kit](https://www.oracle.com/java/technologies/javase-downloads.html#javasejdk) from Oracle.
|
You also can directly download a [Java runtime or development kit](https://www.oracle.com/java/technologies/javase-downloads.html#javasejdk) from Oracle.
|
||||||
|
|
||||||
|
@ -33,10 +33,12 @@ Helma is built with [Gradle](https://gradle.org), the build task depends on the
|
||||||
|
|
||||||
### Additional Prerequisites
|
### Additional Prerequisites
|
||||||
|
|
||||||
* [Rsync](https://rsync.samba.org) version ≥ 3.1.0
|
|
||||||
* [Node.js](https://nodejs.org) LTS version
|
* [Node.js](https://nodejs.org) LTS version
|
||||||
|
* [Rsync](https://rsync.samba.org) version ≥ 3.1.0
|
||||||
|
|
||||||
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`.
|
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.
|
||||||
|
|
||||||
> ⚠️
|
> ⚠️
|
||||||
> 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.
|
> 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.
|
||||||
|
|
121
build.gradle
121
build.gradle
|
@ -1,6 +1,6 @@
|
||||||
plugins {
|
plugins {
|
||||||
id 'application'
|
id 'application'
|
||||||
id 'com.github.jk1.dependency-license-report' version '2.7'
|
id 'com.github.jk1.dependency-license-report' version '2.9'
|
||||||
}
|
}
|
||||||
|
|
||||||
import org.apache.tools.ant.filters.FixCrLfFilter
|
import org.apache.tools.ant.filters.FixCrLfFilter
|
||||||
|
@ -17,9 +17,9 @@ def textFiles = ['**/*.hac', '**/.html', '**/*.js', '**/*.md', '**/*.properties'
|
||||||
allprojects {
|
allprojects {
|
||||||
apply plugin: 'java'
|
apply plugin: 'java'
|
||||||
|
|
||||||
compileJava {
|
java {
|
||||||
sourceCompatibility = JavaVersion.VERSION_17
|
sourceCompatibility = JavaVersion.VERSION_11
|
||||||
targetCompatibility = JavaVersion.VERSION_17
|
targetCompatibility = JavaVersion.VERSION_11
|
||||||
}
|
}
|
||||||
|
|
||||||
repositories {
|
repositories {
|
||||||
|
@ -27,7 +27,7 @@ allprojects {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
version = new Date().format("yyyyMMdd")
|
version = new Date().format("yy.M.d")
|
||||||
|
|
||||||
tasks.build.dependsOn javadoc, 'jsdoc', 'generateLicenseReport'
|
tasks.build.dependsOn javadoc, 'jsdoc', 'generateLicenseReport'
|
||||||
tasks.compileJava.dependsOn 'processSource'
|
tasks.compileJava.dependsOn 'processSource'
|
||||||
|
@ -59,15 +59,15 @@ configurations {
|
||||||
|
|
||||||
dependencies {
|
dependencies {
|
||||||
implementation 'com.google.code.gson:gson:2.11.0'
|
implementation 'com.google.code.gson:gson:2.11.0'
|
||||||
implementation 'commons-codec:commons-codec:1.17.0'
|
implementation 'commons-codec:commons-codec:1.17.1'
|
||||||
implementation 'commons-fileupload:commons-fileupload:1.5'
|
implementation 'commons-fileupload:commons-fileupload:1.5'
|
||||||
implementation 'commons-logging:commons-logging:1.3.2'
|
implementation 'commons-logging:commons-logging:1.3.4'
|
||||||
implementation 'commons-net:commons-net:3.10.0'
|
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.54.v20240208'
|
implementation 'org.eclipse.jetty:jetty-servlet:9.4.56.v20240826'
|
||||||
implementation 'org.eclipse.jetty:jetty-xml:9.4.54.v20240208'
|
implementation 'org.eclipse.jetty:jetty-xml:9.4.56.v20240826'
|
||||||
implementation 'org.mozilla:rhino:1.7.13'
|
implementation 'org.mozilla:rhino:1.7.13'
|
||||||
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'
|
||||||
|
@ -78,6 +78,37 @@ def rhinoJar = configurations.library.files.find { jar ->
|
||||||
jar.name.startsWith('rhino')
|
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 {
|
startScripts {
|
||||||
applicationName = 'helma'
|
applicationName = 'helma'
|
||||||
classpath = files('../launcher.jar')
|
classpath = files('../launcher.jar')
|
||||||
|
@ -103,30 +134,6 @@ 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 {
|
distTar {
|
||||||
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
|
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
|
||||||
|
|
||||||
|
@ -147,42 +154,30 @@ distZip {
|
||||||
|
|
||||||
installDist {
|
installDist {
|
||||||
dependsOn build
|
dependsOn build
|
||||||
|
|
||||||
if (!System.getenv('CI')) {
|
|
||||||
finalizedBy 'update'
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
run {
|
tasks.register('processSource', Sync) {
|
||||||
classpath = files('launcher.jar')
|
|
||||||
jvmArgs jettyLogLevel, suppressMacosDockIcon
|
|
||||||
}
|
|
||||||
|
|
||||||
task processSource(type: Sync) {
|
|
||||||
def date = new Date().format("MMMM dd, yyyy")
|
|
||||||
def gitOutput = new ByteArrayOutputStream()
|
def gitOutput = new ByteArrayOutputStream()
|
||||||
|
|
||||||
exec {
|
exec {
|
||||||
commandLine 'git', 'describe'
|
commandLine 'git', 'rev-parse', '--short', 'HEAD'
|
||||||
standardOutput = gitOutput
|
standardOutput = gitOutput
|
||||||
errorOutput = new ByteArrayOutputStream()
|
errorOutput = new ByteArrayOutputStream()
|
||||||
ignoreExitValue = true
|
ignoreExitValue = true
|
||||||
}
|
}
|
||||||
|
|
||||||
def description = date
|
|
||||||
def tag = gitOutput.toString().trim()
|
|
||||||
|
|
||||||
// TODO: Implement extended description in Java code
|
|
||||||
if (tag) description = "$tag; $description"
|
|
||||||
|
|
||||||
from 'src'
|
from 'src'
|
||||||
|
|
||||||
filter {
|
filter {
|
||||||
line -> line.replaceAll('__builddate__', date)
|
line -> line
|
||||||
|
.replaceAll('__builddate__', new Date().format("d MMM yyyy"))
|
||||||
|
.replaceAll('__commithash__', gitOutput.toString().trim())
|
||||||
} into "${project.buildDir}/src"
|
} into "${project.buildDir}/src"
|
||||||
}
|
}
|
||||||
|
|
||||||
task update {
|
tasks.register('update') {
|
||||||
|
dependsOn installDist
|
||||||
|
|
||||||
def rsyncArgs = ['--archive', '--filter', '- backups']
|
def rsyncArgs = ['--archive', '--filter', '- backups']
|
||||||
|
|
||||||
def confirm = {
|
def confirm = {
|
||||||
|
@ -226,7 +221,7 @@ task update {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
task jsdoc(type: Exec) {
|
tasks.register('jsdoc', Exec) {
|
||||||
description 'Generates JSDoc API documentation for the included JavaScript modules.'
|
description 'Generates JSDoc API documentation for the included JavaScript modules.'
|
||||||
group 'Documentation'
|
group 'Documentation'
|
||||||
|
|
||||||
|
@ -240,7 +235,7 @@ task jsdoc(type: Exec) {
|
||||||
args = ['jsdoc', '-d', "$destination"].plus(sources)
|
args = ['jsdoc', '-d', "$destination"].plus(sources)
|
||||||
}
|
}
|
||||||
|
|
||||||
task xgettext(type: JavaExec) {
|
tasks.register('xgettext', JavaExec) {
|
||||||
description 'Extracts translatable message strings from source code.'
|
description 'Extracts translatable message strings from source code.'
|
||||||
group 'i18n'
|
group 'i18n'
|
||||||
|
|
||||||
|
@ -257,7 +252,7 @@ task xgettext(type: JavaExec) {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
task po2js(type: JavaExec) {
|
tasks.register('po2js', JavaExec) {
|
||||||
description 'Converts translated message strings from PO format to JavaScript.'
|
description 'Converts translated message strings from PO format to JavaScript.'
|
||||||
group 'i18n'
|
group 'i18n'
|
||||||
|
|
||||||
|
@ -272,7 +267,7 @@ task po2js(type: JavaExec) {
|
||||||
]
|
]
|
||||||
}
|
}
|
||||||
|
|
||||||
task rhinoShell(type: JavaExec) {
|
tasks.register('rhinoShell', JavaExec) {
|
||||||
description 'Runs the interactive Rhino JavaScript shell.'
|
description 'Runs the interactive Rhino JavaScript shell.'
|
||||||
group 'Application'
|
group 'Application'
|
||||||
|
|
||||||
|
@ -284,7 +279,7 @@ task rhinoShell(type: JavaExec) {
|
||||||
|
|
||||||
// Call this task with a function definition using the `-P` parameter, e.g.
|
// Call this task with a function definition using the `-P` parameter, e.g.
|
||||||
// `./gradlew commandLine -Pfunction=manage.getAllApplications`
|
// `./gradlew commandLine -Pfunction=manage.getAllApplications`
|
||||||
task commandLine(type: JavaExec) {
|
tasks.register('commandLine', JavaExec) {
|
||||||
description 'Runs a function in a Helma application with `-Pfunction=app.functionName`.'
|
description 'Runs a function in a Helma application with `-Pfunction=app.functionName`.'
|
||||||
group 'Application'
|
group 'Application'
|
||||||
|
|
||||||
|
@ -292,3 +287,11 @@ task commandLine(type: JavaExec) {
|
||||||
mainClass = 'helma.main.launcher.Commandline'
|
mainClass = 'helma.main.launcher.Commandline'
|
||||||
args '-h', projectDir, function
|
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')
|
||||||
|
}
|
||||||
|
|
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
|
distributionBase=GRADLE_USER_HOME
|
||||||
distributionPath=wrapper/dists
|
distributionPath=wrapper/dists
|
||||||
distributionUrl=https\://services.gradle.org/distributions/gradle-8.7-bin.zip
|
distributionUrl=https\://services.gradle.org/distributions/gradle-8.12-bin.zip
|
||||||
networkTimeout=10000
|
networkTimeout=10000
|
||||||
validateDistributionUrl=true
|
validateDistributionUrl=true
|
||||||
zipStoreBase=GRADLE_USER_HOME
|
zipStoreBase=GRADLE_USER_HOME
|
||||||
|
|
6
gradlew
vendored
6
gradlew
vendored
|
@ -15,6 +15,8 @@
|
||||||
# See the License for the specific language governing permissions and
|
# See the License for the specific language governing permissions and
|
||||||
# limitations under the License.
|
# limitations under the License.
|
||||||
#
|
#
|
||||||
|
# SPDX-License-Identifier: Apache-2.0
|
||||||
|
#
|
||||||
|
|
||||||
##############################################################################
|
##############################################################################
|
||||||
#
|
#
|
||||||
|
@ -55,7 +57,7 @@
|
||||||
# Darwin, MinGW, and NonStop.
|
# Darwin, MinGW, and NonStop.
|
||||||
#
|
#
|
||||||
# (3) This script is generated from the Groovy template
|
# (3) This script is generated from the Groovy template
|
||||||
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
# https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
|
||||||
# within the Gradle project.
|
# within the Gradle project.
|
||||||
#
|
#
|
||||||
# You can find Gradle at https://github.com/gradle/gradle/.
|
# You can find Gradle at https://github.com/gradle/gradle/.
|
||||||
|
@ -84,7 +86,7 @@ done
|
||||||
# shellcheck disable=SC2034
|
# shellcheck disable=SC2034
|
||||||
APP_BASE_NAME=${0##*/}
|
APP_BASE_NAME=${0##*/}
|
||||||
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
|
||||||
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
|
APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
|
||||||
|
|
||||||
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
# Use the maximum available, or set MAX_FD != -1 to use that value.
|
||||||
MAX_FD=maximum
|
MAX_FD=maximum
|
||||||
|
|
2
gradlew.bat
vendored
2
gradlew.bat
vendored
|
@ -13,6 +13,8 @@
|
||||||
@rem See the License for the specific language governing permissions and
|
@rem See the License for the specific language governing permissions and
|
||||||
@rem limitations under the License.
|
@rem limitations under the License.
|
||||||
@rem
|
@rem
|
||||||
|
@rem SPDX-License-Identifier: Apache-2.0
|
||||||
|
@rem
|
||||||
|
|
||||||
@if "%DEBUG%"=="" @echo off
|
@if "%DEBUG%"=="" @echo off
|
||||||
@rem ##########################################################################
|
@rem ##########################################################################
|
||||||
|
|
0
lib/ext/.keep
Normal file
0
lib/ext/.keep
Normal file
|
@ -12,7 +12,7 @@ processResources.enabled = false
|
||||||
processTestResources.enabled = false
|
processTestResources.enabled = false
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
|
|
||||||
task deps(type: Copy) {
|
tasks.register('deps', Copy) {
|
||||||
from sourceSets.main.runtimeClasspath
|
from sourceSets.main.runtimeClasspath
|
||||||
into '.'
|
into '.'
|
||||||
}
|
}
|
||||||
|
|
|
@ -15,7 +15,7 @@ processResources.enabled = false
|
||||||
processTestResources.enabled = false
|
processTestResources.enabled = false
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
|
|
||||||
task deps(type: Copy) {
|
tasks.register('deps', Copy) {
|
||||||
from sourceSets.main.runtimeClasspath
|
from sourceSets.main.runtimeClasspath
|
||||||
into 'lib'
|
into 'lib'
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ processResources.enabled = false
|
||||||
processTestResources.enabled = false
|
processTestResources.enabled = false
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
|
|
||||||
task deps(type: Copy) {
|
tasks.register('deps', Copy) {
|
||||||
from sourceSets.main.runtimeClasspath
|
from sourceSets.main.runtimeClasspath
|
||||||
into 'lib'
|
into 'lib'
|
||||||
}
|
}
|
||||||
|
|
|
@ -10,7 +10,7 @@ processResources.enabled = false
|
||||||
processTestResources.enabled = false
|
processTestResources.enabled = false
|
||||||
test.enabled = false
|
test.enabled = false
|
||||||
|
|
||||||
task deps(type: Copy) {
|
tasks.register('deps', Copy) {
|
||||||
from sourceSets.main.runtimeClasspath
|
from sourceSets.main.runtimeClasspath
|
||||||
into 'code'
|
into 'code'
|
||||||
}
|
}
|
||||||
|
|
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 \
|
-jar launcher.jar \
|
||||||
-w 8080 -x 8081
|
-w 8080 -x 8081
|
||||||
|
|
||||||
ExecReload = touch apps.properties && touch server.properties
|
ExecReload = /bin/sh -c 'touch apps.properties && touch server.properties'
|
||||||
ExecStop = /bin/kill -15 $MAINPID
|
ExecStop = /bin/kill -15 $MAINPID
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
|
|
|
@ -36,7 +36,13 @@ import helma.util.ResourceProperties;
|
||||||
*/
|
*/
|
||||||
public class Server implements Runnable {
|
public class Server implements Runnable {
|
||||||
// version string
|
// version string
|
||||||
public static final String version = "🐜 (__builddate__)";
|
public static final String version = "🐜";
|
||||||
|
|
||||||
|
// build date
|
||||||
|
public static final String buildDate = "__builddate__";
|
||||||
|
|
||||||
|
// commit hash
|
||||||
|
public static final String commitHash = "__commithash__";
|
||||||
|
|
||||||
// static server instance
|
// static server instance
|
||||||
private static Server server;
|
private static Server server;
|
||||||
|
|
Loading…
Add table
Reference in a new issue