Compare commits

..

4 commits

1026 changed files with 69442 additions and 157762 deletions

View file

@ -1,16 +0,0 @@
# EditorConfig is awesome: https://EditorConfig.org
root = true
[*]
end_of_line = lf
indent_size = 2
indent_style = spaces
insert_final_newline = true
trim_trailing_whitespace = true
[*.java]
indent_size = 4
[*.md]
trim_trailing_whitespace = false

View file

@ -1,15 +0,0 @@
{
"extends": "eslint:recommended",
"env": {
"es6": true,
"commonjs": true
},
"globals": {
"app": "readonly",
"HopObject": "readonly",
"java": "readonly",
"Packages": "readonly",
"req": "readonly",
"res": "readonly"
}
}

View file

@ -1,42 +0,0 @@
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}"

View file

@ -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

View file

@ -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

View file

@ -1,59 +0,0 @@
name: Release
on:
workflow_dispatch:
push:
tags: '2*'
permissions:
contents: write
jobs:
release:
runs-on: antville
env:
GH_TOKEN: ${{ secrets.GH_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: 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 }}"
- name: Upload release assets to GitHub
run: |
gh release upload "$GITHUB_REF_NAME" build/distributions/helma-*.* \
--repo "$GITHUB_REPOSITORY" \
--clobber

View file

@ -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

View file

@ -1,32 +0,0 @@
name: Deploy (Staging)
on: workflow_dispatch
jobs:
stage:
runs-on: antville
environment:
name: stage
url: ${{ vars.stage_url }}
steps:
- uses: actions/checkout@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

30
.gitignore vendored
View file

@ -1,30 +0,0 @@
# Generally ignore hidden files
.*
# 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
/backups
build
/docs
/lib
/licenses
/log
# Ignore files managed in src/dist
/*.properties
/apps
/db
/extras
/launcher.jar
/static
# Manage Gradle configuration
!/gradle.properties

View file

@ -1 +0,0 @@
11.0

View file

@ -1,6 +0,0 @@
{
"recommendations": [
"vscjava.vscode-java-pack",
"vscjava.vscode-gradle"
]
}

21
.vscode/launch.json vendored
View file

@ -1,21 +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": "Debug",
"request": "launch",
"mainClass": "helma.main.Server",
"projectName": "helma_"
}
]
}

View file

@ -1,6 +0,0 @@
{
"files.watcherExclude": {
"apps/": true
},
"java.configuration.updateBuildConfiguration": "automatic"
}

View file

@ -1,31 +0,0 @@
# Change Log
## May 17, 2020
* Added support for colored log output
* Added xgettext and po2js tasks (only running with Antville right now)
## April 13, 2020
* Added support for gzip compressed response in helma.Http
* Fixed helma.Http.getURL() not following redirects if protocol changes (e.g. http → https)
* Fixed references to obsolete Base64 encoder in modules
* Updated JavaMail library to implementation package
## March 21, 2020
* Completely rewrote build system with Gradle
* Separated launcher from main source as Gradle subproject
* Launcher now includes all JARs found in `lib`
* Upgraded Rhino to version 1.7.12
* Upgraded Jetty to version 9.x
* Fixed compatibility issues with Java 11
* Removed support for Apache JServ Protocol (AJP)
* Added support for CommonJS require() method
* Allow variable arguments in res.write() and res.writeln()
* Replaced Helmas MD5 and Base64 methods with equivalent methods from Apache Commons
* Refactored String methods from Java to JavaScript: encode(), encodeForm(), encodeXml(), stripTags()
* Replaced custom String methods with Rhinos built-in ones: endsWith(), repeat(), startsWith(), trim()
* Refactored custom String.pad() method with built-in methods
* Redefined custom Array.contains() method with built-in Array.includes()
* Refactored custom Array methods with built-in methods: intersection(), union()

View file

@ -1,37 +0,0 @@
# License
Copyright (c) 1999-2025 Helma Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. Products derived from this software may not be called "Helma"
or "Hop", nor may "Helma" or "Hop" appear in their name, without
prior written permission of the Helma Project Group. For written
permission, please contact helma@helma.org.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE HELMA PROJECT OR ITS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
Helma includes third party software released under different specific
license terms. See the licenses directory in the Helma distribution
for a list of these licenses.

View file

@ -1,71 +0,0 @@
# How to Helma
## 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)
- Invoke `./bin/helma`, resp. `./bin/helma.bat`, depending on your platform
- Direct your web browser to <http://localhost:8080>
## Introduction
Helma is an open source web application framework for fast and efficient scripting and serving of your websites and Internet applications.
Helma is written in Java and employs JavaScript for its server-side scripting environment, removing the need for compilation cycles and reducing development costs while giving you instant access to leverage the whole wealth of Java libraries out there.
Helma pioneered the simple and codeless mapping of application objects to database tables, which has only recently come into vogue with other web frameworks. In addition, an embedded object-oriented database performs automatic data persistence of unmapped objects.
Helma has proven itself to be stable and fast, capable of serving high traffic sites with hundreds of thousands of dynamic pages per day. The Austrian Broadcasting Corporation, popular weblog hosting sites such as antville.org, twoday.net, and blogger.de, among many others, have successfully been deploying Helma for several years now.
Although Helma became a Grande Dame of server-side JavaScript already decades ago when she performed in cozy Finnish clubs, she appears somehow retired nowadays. Nevertheless, she is here to stay for those last ones out there still tinkering with this nostalgic and wonderful piece of software.
## System Requirements
You need a Java virtual machine version 11 or higher to run Helma.
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.
Helma is built with [Gradle](https://gradle.org), the build task depends on the binaries [rsync](https://rsync.samba.org) and [npx](https://www.npmjs.com/package/npx) being installed on your system.
## Development
### Additional Prerequisites
* [Node.js](https://nodejs.org) LTS version
* [Rsync](https://rsync.samba.org) version ≥ 3.1.0
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.
>
> Alternatively, you could move or copy the desired files manually from the installation directory `build/install/helma`.
After all files are put into place start Helma by invoking `./bin/helma.bat` or `./bin/helma`, depending on whether you are on Windows or Linux / Unix / OS X, respectively. If the `java` command is not found, try setting the `JAVA_HOME` environment variable to the location of your Java installation.
You can adjust server-wide settings in the `server.properties` file. For example, you could set the `smtp` property to the name of the SMTP server that Helma should use to send e-mail. Applications can be started or stopped by editing the `apps.properties` file, or through the web interface using the management application that is part of Helma.
If all goes well you should be able to connect your browser to <http://localhost:8080> port 8080 on the local machine, that is.
Helma comes with a version of [Jetty](http://eclipse.org/jetty/), a lightweight yet industrial strength web server.
While Jetty works well for development and in fact deploying real web sites, you might want to run Helma with the web server you are already using. This is most easily done by proxying Helma. Please consult the documentation of your web server how to achieve this.
Finally, Helma can be plugged into Servlet containers using Servlet classes that communicate with Helma either directly or via Java RMI. Be warned that these options may be harder to set up and maintain though, since most of the recent development efforts have been geared towards a proxied setup.
## Documentation and Further Information
After installing and running Helma, you will be able to access introductions to the features of Helma and the various included development tools. Further information you will find on the helma.org website:
> 😿
> Unfortunately, the Helma website disappeard in the meantime. However, with some archaeological web digging and thanks to the great search engines and archive services out there it is still possible to find useful resources.
- [helma.org at Internet Archive](http://web.archive.org/web/20180122132315/http://helma.org)
- [Documentation](http://web.archive.org/web/20100530234322/http://helma.org/documentation/)
- [API Reference](https://helma.serverjs.org/reference/)
- [Tutorial](http://web.archive.org/web/20100526182848/http://helma.org/Documentation/Object-Relational+Mapping+Tutorial/)
- [DocBook](http://dev.orf.at/download/helma/documentation/documentation.pdf)

97
README.txt Normal file
View file

@ -0,0 +1,97 @@
This is the README file for version 1.2 of Helma Object Publisher.
===========
ABOUT HELMA
===========
Helma is a scriptable platform for creating dynamic, database backed
web sites.
Helma provides an easy way to map relational database tables to objects.
These objects are wrapped with a layer of scripts and skins that allow
them to be presented and manipulated over the web. The clue here is that
both functions and skins work in an object oriented manner and force
a clear separation between content, functionality and presentation.
Actions are special functions that are callable over the web. Macros are
special functions that expose functionality to the presentation layer.
Skins are pieces of layout that do not contain any application logic,
only macro tags as placeholders for parts that are dynamically provided
by the application.
In short, Helma provides a one stop framework to create web applications
with less code and in shorter time than most of the other software out
there.
===================
SYSTEM REQUIREMENTS
===================
You need a Java virtual machine 1.3 or higher to run Helma.
For Windows, Linux and Solaris you can get a Java runtime or development
kit from http://java.sun.com/j2se/downloads.html.
If you are on Mac OS X, you already have a Java runtime that will work
well with Helma.
Unfortunately, there is no Java 2 interpreter for Mac OS Classic, so
you can't use Helma on Mac OS 9.
============================
INSTALLING AND RUNNING HELMA
============================
Simply unzip or untar the contents of the archive file into any place
on your hard disk. Start Helma by invoking hop.bat or hop.sh from the
command line, depending on whether you are on Windows or
Linux/Unix/MacOSX. If the java command is not found, try setting the
JAVA_HOME variable in the start script to the location of your Java
installation.
You may also want to have a look at the start script for other settings.
You can adjust server wide settings in the server.properties file. For
example, you should set the smtp property to the name of the SMTP server
that Helma should use to send Email. Applications can be started or
stopped by editing the apps.properties file through the web interface
using the Management application that is part of Helma.
If you manage to get it running you should be able to connect your
browser to http://localhost:8080/ or http://127.0.0.1:8080/
(port 8080 on the local machine, that is).
Helma comes with a version of Jetty, a lightweight yet industrial strenth
web server developed by Mortbay Consulting. See http://jetty.mortbay.com/
for more information. While Jetty works well for deploying real web sites,
you may want to run Helma behind an existing web server. This is most
easily done by running Helma with the AJPv13 listener which allows you to
plug Helma into any web server using the Apache mod_jk module. See
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html for more
information on mod_jk and AJPv13.
Finally, Helma can be plugged into Servlet containers using Servlet
classes that communicate with Helma either directly or via Java RMI.
(Be warned that these options may be harder to set up and maintain though,
since most of the recent development efforts have been geared towards the
mod_jk/AJPv13 setup.)
=====================================
DOCUMENTATION AND FURTHER INFORMATION
=====================================
Currently, documentation-in-progress is available online at
http://helma.org/. We know that it sucks and hope to do some substantial
improvments within the coming weeks and months.
Your input is highly welcome. There is a mailing-list to discuss Helma at
http://helma.org/lists/listinfo/hop. Don't hesitate to voice any questions,
proposals, complaints, praise you may have on the list. We know we have
a lot to do and to learn, and we're open to suggestions.
For questions, comments or suggestions also feel free to contact
hannes@helma.at.
--
Last modified on December 5, 2002 by Hannes Wallnoefer <hannes@helma.at>

4
apps.properties Normal file
View file

@ -0,0 +1,4 @@
# List of apps to start.
test

View file

@ -1,293 +0,0 @@
plugins {
id 'application'
id 'com.github.jk1.dependency-license-report' version '2.9'
}
import org.apache.tools.ant.filters.FixCrLfFilter
def jettyLogLevel = '-Dorg.eclipse.jetty.LEVEL=WARN'
// Suppress menu bar and default icon being shown in macos dock (Radar #5754483)
// See https://developer.apple.com/library/content/releasenotes/Java/JavaLeopardUpdate1RN/ResolvedIssues/ResolvedIssues.html
def suppressMacosDockIcon = '-Dapple.awt.UIElement=true'
// This list is used to determine which files need processing of line endings
def textFiles = ['**/*.hac', '**/.html', '**/*.js', '**/*.md', '**/*.properties', '**/*.skin', '**/*.txt', '**/*.xml']
allprojects {
apply plugin: 'java'
java {
sourceCompatibility = JavaVersion.VERSION_11
targetCompatibility = JavaVersion.VERSION_11
}
repositories {
mavenCentral()
}
}
version = new Date().format("yy.M.d")
tasks.build.dependsOn javadoc, 'jsdoc', 'generateLicenseReport'
tasks.compileJava.dependsOn 'processSource'
// Disable DocLint for now
// See <https://blog.joda.org/2014/02/turning-off-doclint-in-jdk-8-javadoc.html>
if (JavaVersion.current().isJava8Compatible()) {
allprojects {
tasks.withType(Javadoc) {
options.addStringOption('Xdoclint:none', '-quiet')
}
}
}
configurations {
// Wrapping implementation because it does not allow access to its files
// (i.e. cannot be resolved)
library.extendsFrom implementation
}
dependencies {
implementation 'com.google.code.gson:gson:2.12.1'
implementation 'commons-codec:commons-codec:1.18.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 '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.sejda.imageio:webp-imageio:0.1.6'
implementation 'xerces:xercesImpl:2.12.2'
implementation 'xmlrpc:xmlrpc:2.0.1'
}
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')
mainClass = 'helma.main.launcher.Main'
defaultJvmOpts = [jettyLogLevel, suppressMacosDockIcon]
doLast {
// Work-around to make the classpath above work (launcher.jar is located outside of `lib` dir)
// See https://discuss.gradle.org/t/classpath-in-application-plugin-is-building-always-relative-to-app-home-lib-directory/2012
def unixScriptFile = file getUnixScript()
def windowsScriptFile = file getWindowsScript()
unixScriptFile.text = unixScriptFile.text.replace('$APP_HOME/lib', '$APP_HOME')
windowsScriptFile.text = windowsScriptFile.text.replace('%APP_HOME%\\lib', '%APP_HOME%')
}
}
distributions {
main {
contents {
from project(':launcher').jar
}
}
}
distTar {
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
compression = Compression.GZIP
filesMatching(textFiles) {
filter(FixCrLfFilter.class, eol: FixCrLfFilter.CrLf.newInstance("lf"))
}
}
distZip {
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
filesMatching(textFiles) {
filter(FixCrLfFilter.class, eol: FixCrLfFilter.CrLf.newInstance("crlf"))
}
}
installDist {
dependsOn build
}
def processSource = tasks.register('processSource', Sync) {
def gitOutput = new ByteArrayOutputStream()
outputs.dir "${project.buildDir}/src"
exec {
commandLine 'git', 'rev-parse', '--short', 'HEAD'
standardOutput = gitOutput
errorOutput = new ByteArrayOutputStream()
ignoreExitValue = true
}
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
}
tasks.compileJava.source = processSource.map { it.outputs.files }
tasks.register('update') {
dependsOn installDist
def rsyncArgs = ['--archive', '--filter', '- backups']
def confirm = {
ant.input(message: 'Update this installation?', validargs: 'yes,no', addproperty: 'continue')
return ant.continue == 'yes'
}
onlyIf { confirm() }
doFirst {
def backupDir = 'backups/' + new Date().format('yyyyMMdd-HHmmss')
mkdir backupDir
exec {
// Create a backup with rsync instead of a CopyTask because the latter chokes on multi-byte characters
// See https://github.com/gradle/gradle/issues/789
executable 'rsync'
args rsyncArgs
args "$projectDir/", backupDir
}
print "Created backup of ${projectDir} in ${backupDir}"
}
doLast {
exec {
// Using rsync to selectively update the repo directory
executable 'rsync'
args '--delete'
args rsyncArgs
args '--filter', '+ bin/***'
args '--filter', '+ docs/***'
args '--filter', '+ extras/***'
args '--filter', '+ launcher.jar'
args '--filter', '+ lib'
args '--filter', '+ *.jar'
args '--filter', '- *'
args "${installDist.destinationDir}/", projectDir
}
}
}
tasks.register('jsdoc', Exec) {
description 'Generates JSDoc API documentation for the included JavaScript modules.'
group 'Documentation'
def sources = ['modules/core', 'modules/helma', 'modules/jala/code']
def destination = "${project.buildDir}/docs/jsdoc"
sources.each { dir -> inputs.dir dir }
outputs.dir destination
executable 'npx'
args = ['jsdoc', '-d', "$destination"].plus(sources)
}
tasks.register('xgettext', JavaExec) {
description 'Extracts translatable message strings from source code.'
group 'i18n'
classpath = files('launcher.jar')
mainClass = 'helma.main.launcher.Commandline'
// TODO: Decouple from Antville app
args = [
// Root.extractMessages is currently located in antville/code/Global/i18n.js
'antville.extractMessages',
'modules/jala/util/HopKit/scripts/MessageParser.js',
'code compat',
'apps/antville/i18n/antville.pot'
]
}
tasks.register('po2js', JavaExec) {
description 'Converts translated message strings from PO format to JavaScript.'
group 'i18n'
classpath = files(rhinoJar)
mainClass = 'org.mozilla.javascript.tools.shell.Main'
// TODO: Decouple from Antville app
args = [
'modules/jala/util/HopKit/scripts/PoParser.js',
'apps/antville/i18n',
'apps/antville/i18n'
]
}
tasks.register('rhinoShell', JavaExec) {
description 'Runs the interactive Rhino JavaScript shell.'
group 'Application'
classpath = files(rhinoJar)
mainClass = 'org.mozilla.javascript.tools.shell.Main'
standardInput = System.in
}
// Call this task with a function definition using the `-P` parameter, e.g.
// `./gradlew commandLine -Pfunction=manage.getAllApplications`
tasks.register('commandLine', JavaExec) {
description 'Runs a function in a Helma application with `-Pfunction=app.functionName`.'
group 'Application'
classpath = files('launcher.jar')
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')
}

93
build/README Normal file
View file

@ -0,0 +1,93 @@
This is the README file for the Helma build files as part of the Helma Object Publisher. It is included in the current distribution (version 1.2pre as of 8 November 2001) downloadable at <http://helma.org/download>.
The build directory consists of the following files:
ant.jar
build.bat
build.sh
build.xml
crimson.jar
jaxp.jar
README
PREREQUISITES
=============
The Helma build script is using a software called Ant. Ant is a build system that was developed for the Jakarta Tomcat project. For more information about Ant, see <http://jakarta.apache.org/ant/>.
To run Ant, you also need JDK 1.3 or higher <http://java.sun.com/j2se/>.
For checking out the source files from Helma's CVS you also need a local installation of a CVS command-line client. More information about CVS at <http://www.cvshome.org/>.
STARTING BUILD
==============
The build system is started by invoking the shell script appropriate to your platform, ie. build.sh for *nix (Linux, NetBSD etc.) and build.bat for Windows systems. You need to modify the script and set the JAVA_HOME to fit your system.
The generic syntax is
./build target
The parameter "target" specifies one of the following build targets.
BUILD A SNAPSHOT
================
To build a helma.jar with the most up-to-date version of helma yourself you need to run
./build checkout
and
./build snapshot
BUILD TARGETS
=============
checkout
Fetches (or updates, resp.) the Helma source code in the src/-directory from the CVS. If you've still got the sourcecode that came with the distribution in there, you need to move that away first.
snapshot
Runs snapshotcompile and stuffs the class files as .jar archive in the lib directory. The file is named helma-yyyymmdd.jar.
snapshotcompile
Compiles the source files contained in the src/hop directory into the classes directory (which will be created if necessary). You can use the source files from your distribution or you can get the most recent version by checking out the "hop"-module from the cvs.
fullcheckout
Fetches (or updates, resp.) everything that's needed to create a full Helma distribution (source files, build files, libs, demo-apps) from the CVS and copies them into the work/checkout/ directory (which will be created if necessary).
compile
Compiles the source files contained in the work/checkout/hop/ directory into the work/classes/ directory (which will be created if necessary).
jar
Stuffs the files in work/classes/ together and saves them as .jar archive in the work directory. The file is named helma-yyyymmdd.jar.
javadocs
Creates the Java API documentation for the Helma classes. The resulting files are saved into the work/docs/api/ directory (which will be created if necessary).
helmadocs
Gets the documentation from helma.org via http in a printable version. (still some way to go..)
package
Builds all previous targets (checkout, compile, jar, javadoc) and saves the created files in the directory work/helma-1.x/ (with 1.x being the version number). All directories will be created if necessary.
package-zip
Same as "package". Additionally, the files in the output directory will be compressed as .zip file.
package-tgz
Same as "package". Additionall, the file in the output directory will be compressed as .tar.gz file.
package-all
Builds all previous targets. The result is a complete and up-to-date (as in the CVS) installation of Helma, the API documentation, source and build files as well as compressed packages for *nix and Windows systems including all the files.
--
This README was last updated on 26 April 2002. Questions? tobi@helma.org

BIN
build/ant.jar Normal file

Binary file not shown.

143
build/antclick/README.txt Normal file
View file

@ -0,0 +1,143 @@
==============
ABOUT ANTCLICK
==============
Antclick is an integrated Helma/Antville package. It comes with
integrated web server and SQL database. It should run out of the
box although you may have to modify the start script.
This version of Antclick contains Mckoi as the embedded database
and Jetty as the embedded web server.
Although Antcklick comes preconfigured with the Mckoi database, it
can easily be set up to run with other databases such as MySQL and
Oracle. It is also possible to configure it to use a fully featured
web server instead of the built-in web server.
======================
INSTALLING AND RUNNING
======================
Simply uncompress the content of the archive file into any place on
your hard disk. Start Helma on Windows by opening the file hop.bat.
On Unix systems open a terminal window, change to the Antclick
directory and type ./hop.sh.
If you manage to get it running you should be able to connect your
browser to http://127.0.0.1:8080/ (port 8080, that is). Now you can
set up and configure your antville site.
==============
ABOUT ANTVILLE
==============
Antville is an open source project aimed to the development of an
"easy to maintain and use" weblog-hosting system. It is not limited
to just one weblog, it can easily host up to several hundred or
thousand weblogs (the number of weblogs is more limited by the site
owner's choice and server power than software limitations).
Antville is entirely written in JavaScript and based on the Helma
Object Publisher, a powerful and fast scriptable open source web
application server (which itself is written in Java). Antville works
with a relational database in the backend.
Check out http://project.antville.org/ for more information.
===========
ABOUT HELMA
===========
Helma is a scriptable platform for creating dynamic, database backed
web sites.
Helma provides an easy way to map relational database tables to objects.
These objects are wrapped with a layer of scripts and skins that allow
them to be presented and manipulated over the web. The clue here is that
both functions and skins work in an object oriented manner and force
a clear separation between content, functionality and presentation.
Actions are special functions that are callable over the web. Macros are
special functions that expose functionality to the presentation layer.
Skins are pieces of layout that do not contain any application logic,
only macro tags as placeholders for parts that are dynamically provided
by the application.
In short, Helma provides a one stop framework to create web applications
with less code and in shorter time than most of the other software out
there.
===================
SYSTEM REQUIREMENTS
===================
You need a Java virtual machine 1.3 or higher to run Helma.
For Windows, Linux and Solaris you can get a Java runtime or development
kit from http://java.sun.com/j2se/downloads.html.
If you are on Mac OS X, you already have a Java runtime that will work
well with Helma.
Unfortunately, there is no Java 2 interpreter for Mac OS Classic, so
you can't use Helma on Mac OS 9.
============================
INSTALLING AND RUNNING HELMA
============================
Simply unzip or untar the contents of the archive file into any place
on your hard disk. Start Helma by invoking hop.bat or hop.sh from the
command line, depending on whether you are on Windows or
Linux/Unix/MacOSX. If the java command is not found, try setting the
JAVA_HOME variable in the start script to the location of your Java
installation.
You may also want to have a look at the start script for other settings.
You can adjust server wide settings in the server.properties file. For
example, you should set the smtp property to the name of the SMTP server
that Helma should use to send Email. Applications can be started or
stopped by editing the apps.properties file through the web interface
using the Management application that is part of Helma.
If you manage to get it running you should be able to connect your
browser to http://localhost:8080/ or http://127.0.0.1:8080/
(port 8080 on the local machine, that is).
Helma comes with a version of Jetty, a lightweight yet industrial strenth
web server developed by Mortbay Consulting. See http://jetty.mortbay.com/
for more information. While Jetty works well for deploying real web sites,
you may want to run Helma behind an existing web server. This is most
easily done by running Helma with the AJPv13 listener which allows you to
plug Helma into any web server using the Apache mod_jk module. See
http://jakarta.apache.org/tomcat/tomcat-4.1-doc/jk2/index.html for more
information on mod_jk and AJPv13.
Finally, Helma can be plugged into Servlet containers using Servlet
classes that communicate with Helma either directly or via Java RMI.
(Be warned that these options may be harder to set up and maintain though,
since most of the recent development efforts have been geared towards the
mod_jk/AJPv13 setup.)
=====================================
DOCUMENTATION AND FURTHER INFORMATION
=====================================
Currently, documentation-in-progress is available online at
http://helma.org/. We know that it sucks and hope to do some substantial
improvments within the coming weeks and months.
Your input is highly welcome. There is a mailing-list to discuss Helma at
http://helma.org/lists/listinfo/hop. Don't hesitate to voice any questions,
proposals, complaints, praise you may have on the list. We know we have
a lot to do and to learn, and we're open to suggestions.
For questions, comments or suggestions also feel free to contact
antville@helma.org.
--
Last modified on December 5, 2002 by Hannes Wallnoefer <hannes@helma.at>

View file

@ -0,0 +1,10 @@
# List of apps to start.
# mount antville as /managehop to avoid
# conflict with antville's manage.hac action
manage
manage.mountpoint = /manage/hop
# mount antville as root application
antville
antville.mountpoint = /

View file

@ -0,0 +1,5 @@
# Properties of antville datasource
antville.url=jdbc:mckoi:local://./db.conf
antville.driver=com.mckoi.JDBCDriver
antville.user=admin
antville.password=entwil

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

318
build/antclick/db.conf Normal file
View file

@ -0,0 +1,318 @@
#######################################################
#
# Configuration options for the Mckoi SQL Database.
#
# NOTE: Lines starting with '#' are comments.
#
#######################################################
#
# database_path - The path where the database data files
# are located.
# See the 'root_path' configuration property for the
# details of how the engine resolves this to an
# absolute path in your file system.
database_path=./data
#
# log_path - The path the log files are written.
# See the 'root_path' configuration property for the
# details of how the engine resolves this to an
# absolute path in your file system.
# The log path must point to a writable directory. If
# no log files are to be kept, then comment out (or
# remove) the 'log_path' variable.
log_path=./log
#
# root_path - If this is set to 'jvm' then the root
# path of all database files is the root path of the
# JVM (Java virtual machine) running the database
# engine. If this property is set to 'configuration'
# or if it is not present then the root path is the
# path of this configuration file.
# This property is useful if you are deploying a
# database and need this configuration file to be the
# root of the directory tree of the database files.
root_path=configuration
#root_path=jvm
#
# jdbc_server_port - The TCP/IP port on this host where
# the database server is mounted. The default port
# of the Mckoi SQL Database server is '9157'
jdbc_server_port=9157
#
# ignore_case_for_identifiers - If enabled all
# identifiers are compared case insensitive. If
# disabled (the default) the case of the identifier
# is important.
# For example, if a table called 'MyTable' contains
# a column called 'my_column' and this property is
# enabled, the identifier 'MYTAble.MY_COlumN' will
# correctly reference the column of the table. If
# this property is disable a not found error is
# generated.
# This property is intended for compatibility with
# other database managements systems where the case
# of identifiers is not important.
ignore_case_for_identifiers=disabled
#
# socket_polling_frequency - Mckoi SQL maintains a pool
# of connections on the server to manage dispatching
# of commands to worker threads. All connections on
# the jdbc port are polled frequently, and ping
# requests are sent to determine if the TCP
# connection has closed or not. This value determines
# how frequently the connections are polled via the
# 'available' method.
# The value is the number of milliseconds between each
# poll of the 'available' method of the connections
# input socket stream. Different Java implementations
# will undoubtedly require this value to be tweaked.
# A value of '3' works great on the Sun NT Java 1.2.2
# and 1.3 Java runtimes.
#
# NOTE: This 'socket polling' module is a horrible hack
# and will be removed at some point when the threading
# performance improves or there is an API for non-
# blocking IO. I'll probably write an alternative
# version for use with the improved Java version.
socket_polling_frequency=3
# ----- PLUG-INS -----
#
# database_services - The services (as a Java class) that
# are registered at database boot time. Each service
# class is separated by a semi-colon (;) character.
# A database service must extend
# com.mckoi.database.ServerService
#
#database_services=mypackage.MyService
#
# function_factories - Registers one or more FunctionFactory
# classes with the database at boot time. A
# FunctionFactory allows user-defined functions to be
# incorporated into the SQL language. Each factory class
# is separated by a semi-colon (;) character.
#
#function_factories=mypackage.MyFunctionFactory
#
# The Java regular expression library to use. Currently
# the engine supports the Apache Jakarta regular expression
# library, and the GNU LGPL regular expression library.
# These two regular expression libraries can be found at the
# following web sites:
#
# GNU Regexp: http://www.cacas.org/~wes/java/
# Apache Regexp: http://jakarta.apache.org/regexp/
#
# The libraries provide similar functionality, however they
# are released under a different license. The GNU library
# is released under the LGPL and is compatible with GPL
# distributions of the database. The Apache Jakarta library
# is released under the Apache Software License and must not
# be linked into GPL distributions.
#
# Use 'regex_library=gnu.regexp' to use the GNU library, or
# 'regex_library=org.apache.regexp' to use the Apache
# library.
#
# NOTE: To use either library, you must include the
# respective .jar package in the Java classpath.
regex_library=gnu.regexp
# ----- PERFORMANCE -----
#
# data_cache_size - The maximum amount of memory (in bytes)
# to allow the memory cache to grow to. If this is set
# to a value < 4096 then the internal cache is disabled.
# It is recommended that a database server should provide
# a cache of 4 Megabytes (4194304). A stand alone
# database need not have such a large cache.
# data_cache_size=4194304
data_cache_size=0
#
# max_cache_entry_size - The maximum size of an element
# in the data cache. This is available for tuning
# reasons and the value here is dependant on the type
# of data being stored. If your data has more larger
# fields that would benefit from being stored in the
# cache then increase this value from its default of
# 8192 (8k).
max_cache_entry_size=8192
#
# lookup_comparison_list - When this is set to 'enabled'
# the database attempts to optimize sorting by generating
# an internal lookup table that enables the database to
# quickly calculate the order of a column without having
# to look at the data directly. The column lookup
# tables are only generated under certain query
# conditions. Set this to 'disabled' if the memory
# resources are slim.
lookup_comparison_list=enabled
#
# lookup_comparison_cache_size - The maximum amount of
# memory (in bytes) to allow for column lookup tables.
# If the maximum amount of memory is reached, the lookup
# table is either cached to disk so that is may be
# reloaded later if necessary, or removed from memory
# entirely. The decision is based on how long ago the
# table was last used.
#
# This property only makes sense if the
# 'lookup_comparison_list' property is enabled.
#
# NOTE: This property does nothing yet...
lookup_comparison_cache_size=2097152
#
# index_cache_size - The maximum amount of memory (in
# bytes) to allow for the storage of column indices.
# If the number of column indices in memory reaches
# this memory threshold then the index blocks are
# cached to disk.
#
# ISSUE: This is really an implementation of internal
# memory page caching but in Java. Is it necessary?
# Why not let the OS handle it with its page file?
#
# NOTE: This property does nothing yet...
index_cache_size=2097152
#
# max_worker_threads - The maximum number of worker
# threads that can be spawned to handle incoming
# requests. The higher this number, the more
# 'multi-threaded' the database becomes. The
# default setting is '4'.
maximum_worker_threads=4
#
# soft_index_storage - If this is set to 'enabled', the
# database engine will keep all column indices behind a
# soft reference. This enables the JVM garbage collector
# to reclaim memory used by the indexing system if the
# memory is needed.
#
# This is useful for an embedded database where requests
# are rare. When the database part is idle, the index
# memory (that can take up significant space for large
# tables) is reclaimed for other uses. For a dedicated
# database server it is recommended this is disabled.
#
# Enable this if you need the engine to use less memory.
# I would recommend the config property
# 'lookup_comparison_list' is disabled if this is enabled.
# The default setting is 'disabled'.
soft_index_storage=disabled
#
# dont_synch_filesystem - If this is enabled, the engine
# will not synchronize the file handle when a table change
# is committed. This will mean the data is not as
# safe but the 'commit' command will work faster. If this
# is enabled, there is a chance that committed changes will
# not get a chance to flush to the file system if the
# system crashes.
#
# It is recommended this property is left commented out.
#
#dont_synch_filesystem=enabled
#
# transaction_error_on_dirty_select - If this is disabled
# the 4th conflict (dirty read on modified table) will
# not be detected. This has transactional consequences
# that will cause data modifications to sometimes be
# out of syncronization. For example, one transaction
# adds an entry, and another concurrent transaction
# deletes all entries. If this is disabled this
# conflict will not be detected. The table will end up
# with the one entry added after commit.
#
# It is recommended this property is left commented out.
#
#transaction_error_on_dirty_select=disabled
# ----- SPECIAL -----
#
# read_only - If this is set to 'enabled' then the database
# is readable and not writable. You may boot a database
# in read only mode from multiple VM's. If the database
# data files are stored on a read only medium such as a
# CD, then the property must be enabled else it will not
# be possible to boot the database.
# ( Uncomment the line below for read only mode )
#read_only=enabled
# ----- DEBUGGING -----
#
# debug_log_file - The file that is used to log all debug
# information. This file is stored in the 'log_path'
# path.
debug_log_file=debug.log
#
# debug_level - The minimum debug level of messages that
# are written to the log file. Reducing this number
# will cause more debug information to be written to
# the log.
# 10 = INFORMATION
# 20 = WARNINGS
# 30 = ALERTS
# 40 = ERRORS
debug_level=20
#
# table_lock_check - If this is enabled, every time a
# table is accessed a check is performed to ensure that
# the table owns the correct locks. If a lock assertion
# fails then an error is generated in the log file.
# This should not be enabled in a production system
# because the lock assertion check is expensive. However
# it should be used during testing because it helps to
# ensure locks are being made correctly.
table_lock_check=disabled

View file

@ -8,11 +8,9 @@
# The actual mapping of types is done in the
# type.properties file in the prototype directories.
#
# More information about this file is available at
# http://helma.org/docs/guide/properties/db.properties/
# Properties of JDBC data sources
#myDataSource.url = jdbc:mysql://db.domain.com/space
#myDataSource.driver = org.gjt.mm.mysql.Driver
#myDataSource.user = username
#myDataSource.password = xyz
myDataSource.url = jdbc:mysql://db.domain.com/space
myDataSource.driver = org.gjt.mm.mysql.Driver
myDataSource.user = username
myDataSource.password = xyz

79
build/antclick/hop.bat Executable file
View file

@ -0,0 +1,79 @@
@echo off
rem Batch file for Starting Helma with a JDK-like virtual machine.
rem To add jar files to the classpath, simply place them into the
rem lib/ext directory of this Helma installation.
:: Initialize variables
:: (don't touch this section)
set JAVA_HOME=
set HOP_HOME=
set HTTP_PORT=
set XMLRPC_PORT=
set AJP13_PORT=
set RMI_PORT=
set OPTIONS=
:: Set TCP ports for Helma servers
:: (comment/uncomment to de/activate)
set HTTP_PORT=8080
rem set XMLRPC_PORT=8081
rem set AJP13_PORT=8009
rem set RMI_PORT=5050
:: Uncomment to set HOP_HOME
rem set HOP_HOME=c:\program files\helma
:: Uncomment to set JAVA_HOME variable
rem set JAVA_HOME=c:\program files\java
:: Uncomment to pass options to the Java virtual machine
rem set JAVA_OPTIONS=-server -Xmx128m
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::: No user configuration needed below this line :::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Setting the script path
set INSTALL_DIR=%~d0%~p0
:: Using JAVA_HOME variable if defined. Otherwise,
:: Java executable must be contained in PATH variable
if "%JAVA_HOME%"=="" goto default
set JAVACMD=%JAVA_HOME%\bin\java
goto end
:default
set JAVACMD=java
:end
:: Setting HOP_HOME to script path if undefined
if "%HOP_HOME%"=="" (
set HOP_HOME=%INSTALL_DIR%
)
cd %HOP_HOME%
:: Setting Helma server options
if not "%HTTP_PORT%"=="" (
echo Starting HTTP server on port %HTTP_PORT%
set OPTIONS=%OPTIONS% -w %HTTP_PORT%
)
if not "%XMLRPC_PORT%"=="" (
echo Starting XML-RPC server on port %XMLRPC_PORT%
set OPTIONS=%OPTIONS% -x %XMLRPC_PORT%
)
if not "%AJP13_PORT%"=="" (
echo Starting AJP13 listener on port %AJP13_PORT%
set OPTIONS=%OPTIONS% -jk %AJP13_PORT%
)
if not "%RMI_PORT%"=="" (
echo Starting RMI server on port %RMI_PORT%
set OPTIONS=%OPTIONS% -p %RMI_PORT%
)
if not "%HOP_HOME%"=="" (
echo Serving applications from %HOP_HOME%
set OPTIONS=%OPTIONS% -h "%HOP_HOME%
)
:: Invoking the Java virtual machine
%JAVACMD% %JAVA_OPTIONS% -jar "%INSTALL_DIR%\launcher.jar" %OPTIONS%

73
build/antclick/hop.sh Executable file
View file

@ -0,0 +1,73 @@
#!/bin/sh
# Shell script for starting Helma with a JDK-like virtual machine.
# To add JAR files to the classpath, simply place them into the
# lib/ext directory.
# uncomment to set JAVA_HOME variable
# JAVA_HOME=/usr/lib/java
# uncomment to set HOP_HOME, otherwise we get it from the script path
# HOP_HOME=/usr/local/helma
# options to pass to the Java virtual machine
# JAVA_OPTIONS="-server -Xmx128m"
# Set TCP ports for Helma servers
# (comment/uncomment to de/activate)
HTTP_PORT=8080
# XMLRPC_PORT=8081
# AJP13_PORT=8009
# RMI_PORT=5050
###########################################################
###### No user configuration needed below this line #######
###########################################################
# if JAVA_HOME variable is set, use it. Otherwise, Java executable
# must be contained in PATH variable.
if [ "$JAVA_HOME" ]; then
JAVACMD="$JAVA_HOME/bin/java"
else
JAVACMD=java
fi
# Get the Helma installation directory
INSTALL_DIR="${0%/*}"
cd $INSTALL_DIR
INSTALL_DIR=$PWD
# get HOP_HOME variable if it isn't set
if test -z "$HOP_HOME"; then
# try to get HOP_HOME from script file and pwd
# strip everyting behind last slash
HOP_HOME="${0%/*}"
cd $HOP_HOME
HOP_HOME=$PWD
else
cd $HOP_HOME
fi
echo "Starting Helma in directory $HOP_HOME"
if [ "$HTTP_PORT" ]; then
SWITCHES="$SWITCHES -w $HTTP_PORT"
echo Starting HTTP server on port $HTTP_PORT
fi
if [ "$XMLRPC_PORT" ]; then
SWITCHES="$SWITCHES -x $XMLRPC_PORT"
echo Starting XML-RPC server on port $XMLRPC_PORT
fi
if [ "$AJP13_PORT" ]; then
SWITCHES="$SWITCHES -jk $AJP13_PORT"
echo Starting AJP13 listener on port $AJP13_PORT
fi
if [ "$RMI_PORT" ]; then
SWITCHES="$SWITCHES -p $RMI_PORT"
echo Starting RMI server on port $RMI_PORT
fi
if [ "$HOP_HOME" ]; then
SWITCHES="$SWITCHES -h $HOP_HOME"
fi
# Invoke the Java VM
$JAVACMD $JAVA_OPTIONS -jar "$INSTALL_DIR/launcher.jar" $SWITCHES

Binary file not shown.

View file

@ -0,0 +1,50 @@
Copyright (c) 1999-2001 Helma Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
are met:
1. Redistributions of source code must retain the above copyright
notice, this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in
the documentation and/or other materials provided with the
distribution.
3. The end-user documentation included with the redistribution,
if any, must include the following acknowledgment:
"This product includes software developed by the Helma Project
for use in the Helma Object Publisher (http://www.helma.org/)."
Alternately, this acknowledgment may appear in the software itself,
if and wherever such third-party acknowledgments normally appear.
4. The names "Helma" and "Hop" must not be used to endorse or
promote products derived from this software without prior written
permission. For written permission, please contact
helma@helma.org.
5. Products derived from this software may not be called "Helma"
or "Hop", nor may "Helma" or "Hop" appear in their name, without
prior written permission of the Helma Project Group.
6. We ask you to give credit to the Helma Project for sites which build
upon Helma. This would normally consist of a text or graphic link
to http://helma.org/ with the line "Powered by Helma" somewhere on the
site. While it is not a breach of this license to omit this, it's a
great way for you to make help the Helma Project to continue
to flourish and grow.
THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED
WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES
OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE HELMA PROJECT OR ITS
CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL,
SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT
NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT,
STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.

View file

@ -0,0 +1,27 @@
# The SMTP server to use for sending mails. Set and
# uncomment this line before trying to send mails from
# Helma applications.
#
# smtp=mail.yourdomain.com
# Some examples for server-wide locale settings
# (please refer to http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
# for country codes, resp. http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt
# for language codes).
#
# country = AT
# language = de
#
# country = UK
# language = en
#
# country = FR
# language = fr
#
# country = CZ
# language = cs
# list ip addresses for admin-application here:
allowAdmin=127.0.0.1, 192.168.0.1

48
build/build.bat Normal file
View file

@ -0,0 +1,48 @@
@echo off
set TARGET=%1%
REM set JAVA_HOME=c:\programme\jdk13
REM --------------------------------------------
REM No need to edit anything past here
REM --------------------------------------------
set BUILDFILE=build.xml
if "%TARGET%" == "" goto setdist
goto cont1
:cont1
if not "%2%" == "" goto setapp
goto final
:setdist
set TARGET=usage
goto cont1
:setapp
set APPNAME=-Dapplication=%2%
goto final
:final
if "%JAVA_HOME%" == "" goto javahomeerror
set CP=%CLASSPATH%;ant.jar;jaxp.jar;crimson.jar
if exist %JAVA_HOME%\lib\tools.jar set CP=%CP%;%JAVA_HOME%\lib\tools.jar
echo Classpath: %CP%
echo JAVA_HOME: %JAVA_HOME%
%JAVA_HOME%\bin\java.exe -classpath "%CP%" %APPNAME% org.apache.tools.ant.Main -buildfile %BUILDFILE% %TARGET%
goto end
REM -----------ERROR-------------
:javahomeerror
echo "ERROR: JAVA_HOME not found in your environment."
echo "Please, set the JAVA_HOME variable in your environment to match the"
echo "location of the Java Virtual Machine you want to use."
:end

31
build/build.sh Executable file
View file

@ -0,0 +1,31 @@
#!/bin/sh
# export JAVA_HOME=/usr/lib/j2sdk1.4.0
#--------------------------------------------
# No need to edit anything past here
#--------------------------------------------
if test -z "${JAVA_HOME}" ; then
echo "ERROR: JAVA_HOME not found in your environment."
echo "Please, set the JAVA_HOME variable in your environment to match the"
echo "location of the Java Virtual Machine you want to use."
exit
fi
if test -f ${JAVA_HOME}/lib/tools.jar ; then
CLASSPATH=${CLASSPATH}:${JAVA_HOME}/lib/tools.jar
fi
if test -n "${2}" ; then
APPNAME=-Dapplication=${2}
fi
CP=${CLASSPATH}:ant.jar:jaxp.jar:../lib/crimson.jar
echo "Classpath: ${CP}"
echo "JAVA_HOME: ${JAVA_HOME}"
BUILDFILE=build.xml
${JAVA_HOME}/bin/java -classpath ${CP} ${APPNAME} org.apache.tools.ant.Main -buildfile ${BUILDFILE} ${1}

413
build/build.xml Normal file
View file

@ -0,0 +1,413 @@
<?xml version="1.0"?>
<project name="Helma" default="usage" basedir=".">
<!-- =================================================================== -->
<!-- Initializes some variables -->
<!-- =================================================================== -->
<target name="init">
<property name="Name" value="helma"/>
<property name="year" value="1998-${year}"/>
<property name="version" value="1.2-rc2"/>
<property name="project" value="helma"/>
<property name="build.compiler" value="classic"/>
<property name="cvs.root.apps" value=":pserver:anonymous@adele.helma.at:/opt/cvs/apps"/>
<property name="cvs.root.helma" value=":pserver:anonymous@adele.helma.at:/opt/cvs/helma"/>
<property name="home.dir" value=".."/>
<property name="build.dir" value="${home.dir}/build"/>
<property name="build.src" value="${home.dir}/src"/>
<property name="build.lib" value="${home.dir}/lib"/>
<property name="build.classes" value="${home.dir}/classes"/>
<property name="build.docs" value="${home.dir}/docs"/>
<property name="build.javadocs" value="${home.dir}/docs/api"/>
<property name="build.work" value="${home.dir}/work"/>
<property name="build.dist" value="${home.dir}/dist"/>
<property name="jar.name" value="${project}"/>
<property name="package.name" value="${project}-${version}"/>
<property name="antclick.name" value="antclick-1.0pre3"/>
<property name="debug" value="on"/>
<property name="optimize" value="on"/>
<property name="deprecation" value="off"/>
<path id="build.class.path">
<fileset dir="${home.dir}/lib">
<exclude name="**/helma*.jar" />
<include name="**/*.jar" />
</fileset>
</path>
<tstamp/>
<filter token="year" value="${year}"/>
<filter token="version" value="${version}"/>
<filter token="date" value="${TODAY}"/>
</target>
<!-- =================================================================== -->
<!-- Help on usage -->
<!-- =================================================================== -->
<target name="help" depends="usage" />
<target name="usage">
<echo message=""/>
<echo message=""/>
<echo message="Helma build instructions"/>
<echo message="-------------------------------------------------------------"/>
<echo message=""/>
<echo message=" available targets are:"/>
<echo message=""/>
<echo message=" compile --> compiles the source code to ./classes"/>
<echo message=" jar --> generates the ./lib/helma-YYYYMMDD.jar file"/>
<echo message=" javadocs --> generates the API docs"/>
<echo message=" docs --> tries to retrieve the HTML documentation "/>
<echo message=" (may need proxy settings in startscript)"/>
<echo message=" package --> generates the distribution (zip and tar.gz)"/>
<echo message=" antclick --> generates the distribution (zip and tar.gz)"/>
<echo message=" with antville preconfigured"/>
<echo message=" app [name] --> gets an application from the cvs and zips it"/>
<echo message=""/>
<echo message=" usage --> provides help on using the build tool (default)"/>
<echo message=""/>
<echo message=" See comments inside the build.xml file for more details."/>
<echo message="-------------------------------------------------------------"/>
<echo message=""/>
<echo message=""/>
</target>
<!-- =================================================================== -->
<!-- Compiles the source directory -->
<!-- =================================================================== -->
<target name="compile" depends="init">
<mkdir dir="${build.classes}"/>
<javac srcdir="${build.src}"
destdir="${build.classes}"
debug="${debug}"
deprecation="${deprecation}"
optimize="${optimize}">
<classpath refid="build.class.path" />
</javac>
<rmic classname="helma.framework.core.RemoteApplication" base="${build.classes}"/>
</target>
<!-- =================================================================== -->
<!-- Creates a helma.jar file (snapshot) in the lib-directory -->
<!-- =================================================================== -->
<target name="jar" depends="compile">
<jar jarfile="${build.lib}/${jar.name}-${DSTAMP}.jar"
basedir="${build.classes}"
excludes="**/package.html,**/main/launcher/**"/>
<jar jarfile="${home.dir}/launcher.jar"
basedir="${build.classes}"
includes="**/main/launcher/**"
manifest="${build.src}/helma/main/launcher/manifest.txt"/>
</target>
<!-- =================================================================== -->
<!-- Creates the API documentation -->
<!-- =================================================================== -->
<target name="javadocs" depends="init">
<mkdir dir="${build.javadocs}"/>
<javadoc packagenames="helma.*"
sourcepath="${build.src}"
destdir="${build.javadocs}"
author="false"
private="false"
version="false"
windowtitle="${Name} ${version} API"
doctitle="${Name} ${version} API"
bottom="Copyright &#169; ${year} Helma.org. All Rights Reserved."
classpathref="build.class.path"
/>
</target>
<!-- =================================================================== -->
<!-- Get the documentation (currently can fail due to request time-out -->
<!-- or missing support for proxies) -->
<!-- =================================================================== -->
<target name="docs" depends="init">
<get src="http://www.helma.org/docs/reference/print"
dest="${build.docs}/reference.html"
ignoreerrors="true"
/>
</target>
<!-- =================================================================== -->
<!-- Creates the full helma distribution -->
<!-- =================================================================== -->
<target name="package" depends="init">
<mkdir dir="${build.work}"/>
<!-- create the main part of helma -->
<antcall target="package-raw">
<param name="distribution" value="main" />
</antcall>
<chmod perm="755">
<fileset dir="${build.work}">
<include name="hop.sh"/>
</fileset>
</chmod>
<!-- checkout the demo apps (and zip manage-app) -->
<antcall target="package-apps" />
<!-- zip up the whole thing -->
<antcall target="package-zip">
<param name="filename" value="${package.name}"/>
</antcall>
<antcall target="package-tgz">
<param name="filename" value="${package.name}"/>
</antcall>
<!-- make the src distributions -->
<antcall target="package-src-zip">
<param name="filename" value="${package.name}"/>
</antcall>
<antcall target="package-src-tgz">
<param name="filename" value="${package.name}"/>
</antcall>
<!-- clean up -->
<delete dir="${build.work}"/>
</target>
<!-- =================================================================== -->
<!-- Compile Helma and prepare the skeleton in a temporary directory. -->
<!-- Used by package and antclick. -->
<!-- =================================================================== -->
<target name="package-raw" depends="init, jar">
<!-- copy the framework (apps.props, server.props, hop/db, hop/static) -->
<copy todir="${build.work}">
<fileset dir="${build.dir}/${distribution}" excludes="**/CVS**"/>
</copy>
<!-- copy the launcher jar file -->
<copy file="${home.dir}/launcher.jar" todir="${build.work}/"/>
<!-- copy README.txt -->
<copy file="${home.dir}/README.txt" todir="${build.work}/"/>
<!-- copy the whole docs-directory -->
<!-- copy todir="${build.work}/docs">
<fileset dir="${build.docs}"/>
</copy -->
<!-- copy all libraries except helma-YYYYMMDD.jar -->
<copy todir="${build.work}/lib">
<fileset dir="${home.dir}/lib">
<exclude name="**/helma*.jar" />
<include name="**/*.jar" />
</fileset>
</copy>
<!-- copy the whole licenses-directory -->
<copy todir="${build.work}/licenses">
<fileset dir="${home.dir}/licenses" excludes="**/CVS**"/>
</copy>
<!-- rename the current jar-file -->
<copy file="${build.lib}/${jar.name}-${DSTAMP}.jar" tofile="${build.work}/lib/helma.jar"/>
<!-- zip the sourcecode -->
<!-- mkdir dir="${build.work}/src"/>
<tar tarfile="${build.work}/src/helma-src.tar" basedir="${build.src}/">
<tarfileset dir="${build.src}">
<include name="${build.src}/**"/>
</tarfileset>
</tar>
<gzip zipfile="${build.work}/src/helma-src.tar.gz" src="${build.work}/src/helma-src.tar"/>
<delete file="${build.work}/src/helma-src.tar"/ -->
</target>
<!-- =================================================================== -->
<!-- Checkout demo apps, put them in work directory and zip manage app -->
<!-- =================================================================== -->
<target name="package-apps" depends="init">
<mkdir dir="${build.work}/apps" />
<!-- get demo apps -->
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="base" dest="${build.work}/apps" />
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="bloggerapi" dest="${build.work}/apps" />
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="himp" dest="${build.work}/apps" />
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="hopblog" dest="${build.work}/apps" />
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="lillebror" dest="${build.work}/apps" />
<antcall target="package-manage" />
<!-- write out apps.properties file -->
<echo file="${build.work}/apps.properties" append="false">
# list of applications to be started by helma
base
base.mountpoint = /
bloggerapi
himp
hopblog
lillebror
manage
</echo>
</target>
<!-- =================================================================== -->
<!-- Checkout and zip manage application -->
<!-- =================================================================== -->
<target name="package-manage" depends="init">
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="manage" dest="${build.work}" />
<mkdir dir="${build.work}/apps/manage"/>
<zip zipfile="${build.work}/apps/manage/manage.zip" basedir="${build.work}/manage/" includes="**" excludes="**/properties,readme/**" />
<copy todir="${build.work}/apps/manage">
<fileset dir="${build.work}/manage" includes="app.properties,class.properties,readme.txt"/>
</copy>
<delete dir="${build.work}/manage" />
</target>
<!-- =================================================================== -->
<!-- Packages the work directory with TAR-GZIP -->
<!-- needs parameter ${filename} for final dist-file -->
<!-- =================================================================== -->
<target name="package-tgz" depends="init">
<mkdir dir="${build.dist}" />
<fixcrlf srcdir="${build.work}" eol="lf" eof="remove" includes="**/*.txt, **/*.properties, **/*.hac, **/*.js, **/*.skin" />
<tar tarfile="${build.dist}/${filename}.tar" basedir="${build.work}" excludes="**">
<tarfileset prefix="${filename}" dir="${build.work}" mode="755">
<include name="hop.sh"/>
</tarfileset>
<tarfileset prefix="${filename}" dir="${build.work}">
<include name="**"/>
<exclude name="hop.sh"/>
</tarfileset>
</tar>
<gzip zipfile="${build.dist}/${filename}.tar.gz" src="${build.dist}/${filename}.tar"/>
<delete file="${build.dist}/${filename}.tar"/>
</target>
<!-- =================================================================== -->
<!-- Packages the work directory with ZIP -->
<!-- needs parameter ${filename} for final dist-file -->
<!-- =================================================================== -->
<target name="package-zip" depends="init">
<mkdir dir="${build.dist}" />
<fixcrlf srcdir="${build.work}" eol="crlf" includes="**/*.txt, **/*.properties, **/*.hac, **/*.js, **/*.skin, **/*.xml" />
<zip zipfile="${build.dist}/${filename}.zip">
<zipfileset dir="${build.work}" prefix="${filename}" includes="**" />
</zip>
</target>
<!-- =================================================================== -->
<!-- Packages Helma src and build directories with TAR-GZIP -->
<!-- needs parameter ${filename} for final dist-file -->
<!-- =================================================================== -->
<target name="package-src-tgz" depends="init">
<mkdir dir="${build.dist}" />
<tar tarfile="${build.dist}/${filename}-src.tar">
<tarfileset prefix="${filename}" dir="${home.dir}"
includes="src/**,build/**,license.txt,licenses/**"/>
</tar>
<gzip zipfile="${build.dist}/${filename}-src.tar.gz" src="${build.dist}/${filename}-src.tar"/>
<delete file="${build.dist}/${filename}-src.tar"/>
</target>
<!-- =================================================================== -->
<!-- Packages Helma src and build directories with ZIP -->
<!-- needs parameter ${filename} for final dist-file -->
<!-- =================================================================== -->
<target name="package-src-zip" depends="init">
<mkdir dir="${build.dist}" />
<zip zipfile="${build.dist}/${filename}-src.zip">
<zipfileset dir="${home.dir}" prefix="${filename}"
includes="src/**,build/**,license.txt,licenses/**" />
</zip>
</target>
<!-- =================================================================== -->
<!-- Make Antclick package (helma plus Antville and manage apps) -->
<!-- =================================================================== -->
<target name="antclick" depends="init">
<mkdir dir="${build.work}"/>
<!-- create the main part of helma -->
<antcall target="package-raw">
<param name="distribution" value="antclick" />
</antcall>
<!-- get antville -->
<mkdir dir="${build.work}/apps" />
<!-- to retrieve special versions of antville insert additional attributes:
tag="TAGNAME", date="1972-09-24" or date="1972-09-24 20:05" -->
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="antville" dest="${build.work}/apps" />
<!-- unzip images -->
<mkdir dir="${build.work}/static/images"/>
<unzip src="${build.work}/apps/antville/images.zip" dest="${build.work}/static/images">
<patternset>
<include name="**"/>
</patternset>
</unzip>
<!-- delete antville's mysql-scripts, image-zip etc -->
<delete>
<fileset dir="${build.work}/apps/antville" includes="images.zip,*.sql" />
</delete>
<!-- get and zip manage-app -->
<antcall target="package-manage" />
<!-- zip up the whole thing -->
<antcall target="package-zip">
<param name="filename" value="${antclick.name}"/>
</antcall>
<antcall target="package-tgz">
<param name="filename" value="${antclick.name}"/>
</antcall>
<!-- clean up -->
<delete dir="${build.work}"/>
</target>
<!-- =================================================================== -->
<!-- Gets an application from the cvs and zips/targzs it -->
<!-- =================================================================== -->
<target name="app" depends="init">
<mkdir dir="${build.dist}" />
<mkdir dir="${build.work}" />
<!-- to retrieve special versions of an application insert
additional attributes: tag="TAGNAME" or date="1972-09-24 20:05" -->
<cvs cvsRoot="${cvs.root.apps}" command="export" tag="HEAD" package="${application}" dest="${build.work}" />
<fixcrlf srcdir="${build.work}" eol="crlf" eof="add" includes="**/*.txt, **/*.properties, **/*.hac, **/*.js, **/*.skin, **/*.xml" />
<zip zipfile="${build.dist}/${application}-${DSTAMP}.zip" basedir="${build.work}" includes="**"/>
<fixcrlf srcdir="${build.work}" eol="lf" eof="remove" includes="**/*.txt, **/*.properties, **/*.hac, **/*.js, **/*.skin" />
<tar tarfile="${build.dist}/${application}-${DSTAMP}.tar" basedir="${build.work}">
<tarfileset dir="${build.work}">
<include name="${build.work}/**"/>
</tarfileset>
</tar>
<gzip zipfile="${build.dist}/${application}-${DSTAMP}.tar.gz" src="${build.dist}/${application}-${DSTAMP}.tar" />
<delete file="${build.dist}/${application}-${DSTAMP}.tar" />
<delete dir="${build.work}" />
</target>
</project>

BIN
build/crimson.jar Normal file

Binary file not shown.

BIN
build/jaxp.jar Normal file

Binary file not shown.

View file

@ -0,0 +1,10 @@
# List of apps to start.
base
base.mountpoint = /
manage
himp
bloggerapi
lillebror

16
build/main/db.properties Normal file
View file

@ -0,0 +1,16 @@
# This is where you specify relational data sources to
# map Helma types to relational databases.
#
# If you want to define a data source just for one
# application, simply copy the db.properties file to
# the application directory.
#
# The actual mapping of types is done in the
# type.properties file in the prototype directories.
#
# Properties of JDBC data sources
myDataSource.url = jdbc:mysql://db.domain.com/space
myDataSource.driver = org.gjt.mm.mysql.Driver
myDataSource.user = username
myDataSource.password = xyz

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- printed by helma object publisher -->
<!-- created Fri May 31 16:36:44 CEST 2002 -->
<xmlroot xmlns:hop="http://www.helma.org/docs/guide/features/database">
<hopobject id="0" name="root" prototype="root" created="1022855750998" lastModified="1022855804064">
<hop:child idref="3" prototyperef="weblogstory"/>
</hopobject>
</xmlroot>

View file

@ -0,0 +1,8 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- printed by helma object publisher -->
<!-- created Fri May 31 16:36:30 CEST 2002 -->
<xmlroot xmlns:hop="http://www.helma.org/docs/guide/features/database">
<hopobject id="1" name="users" prototype="hopobject" created="1022855751010" lastModified="1022855790024">
<helma idref="2" prototyperef="user"/>
</hopobject>
</xmlroot>

View file

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- printed by helma object publisher -->
<!-- created Fri May 31 16:36:30 CEST 2002 -->
<xmlroot xmlns:hop="http://www.helma.org/docs/guide/features/database">
<hopobject id="2" name="helma" prototype="user" created="1022855790020" lastModified="1022855790025">
<hop:parent idref="1" prototyperef="hopobject"/>
<email>admin@somedomain.at</email>
<password>helma</password>
<name>helma</name>
</hopobject>
</xmlroot>

View file

@ -0,0 +1,24 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- printed by helma object publisher -->
<!-- created Fri May 31 16:36:44 CEST 2002 -->
<xmlroot xmlns:hop="http://www.helma.org/docs/guide/features/database">
<hopobject id="3" name="weblogstory" prototype="weblogstory" created="1022855804062" lastModified="1022855804064">
<hop:parent idref="0" prototyperef="root"/>
<postdate type="date">31.05.2002 16:36:44 CEST</postdate>
<day>2002.05.31</day>
<author idref="2" prototyperef="user"/>
<text>Congratulations! You successfully created your Helma HopBlog!
As a first step you can login to your HopBlog using "helma" as user name and password (certainly without the quotes) and create or edit stories.
Or you set-up HopBlog administration for yourself. You can do this by opening the file app.properties in the apps/hopblog directory of your Helma installation and editing the settings for siteAdmin, adminEmail and smtp.
After that you should register the new administrator as HopBlog user. Simply enter the data you chose for siteAdmin and adminEmail in the appropriate fields of the registration form, fill in the other form fields and submit your data. If you have set a valid e-mail address and smtp server, you should get a message confirming the registration.
Now you can login to your HopBlog using name and password of the newly created user.
Let the fun begin...
:)</text>
<moddate type="date">31.05.2002 16:36:44 CEST</moddate>
</hopobject>
</xmlroot>

View file

@ -0,0 +1,6 @@
<?xml version="1.0" encoding="ISO-8859-1"?>
<!-- printed by helma object publisher -->
<!-- created Fri May 31 16:36:44 CEST 2002 -->
<xmlroot>
<counter>3</counter>
</xmlroot>

79
build/main/hop.bat Executable file
View file

@ -0,0 +1,79 @@
@echo off
rem Batch file for Starting Helma with a JDK-like virtual machine.
rem To add jar files to the classpath, simply place them into the
rem lib/ext directory of this Helma installation.
:: Initialize variables
:: (don't touch this section)
set JAVA_HOME=
set HOP_HOME=
set HTTP_PORT=
set XMLRPC_PORT=
set AJP13_PORT=
set RMI_PORT=
set OPTIONS=
:: Set TCP ports for Helma servers
:: (comment/uncomment to de/activate)
set HTTP_PORT=8080
rem set XMLRPC_PORT=8081
rem set AJP13_PORT=8009
rem set RMI_PORT=5050
:: Uncomment to set HOP_HOME
rem set HOP_HOME=c:\program files\helma
:: Uncomment to set JAVA_HOME variable
rem set JAVA_HOME=c:\program files\java
:: Uncomment to pass options to the Java virtual machine
rem set JAVA_OPTIONS=-server -Xmx128m
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::: No user configuration needed below this line :::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Setting the script path
set INSTALL_DIR=%~d0%~p0
:: Using JAVA_HOME variable if defined. Otherwise,
:: Java executable must be contained in PATH variable
if "%JAVA_HOME%"=="" goto default
set JAVACMD=%JAVA_HOME%\bin\java
goto end
:default
set JAVACMD=java
:end
:: Setting HOP_HOME to script path if undefined
if "%HOP_HOME%"=="" (
set HOP_HOME=%INSTALL_DIR%
)
cd %HOP_HOME%
:: Setting Helma server options
if not "%HTTP_PORT%"=="" (
echo Starting HTTP server on port %HTTP_PORT%
set OPTIONS=%OPTIONS% -w %HTTP_PORT%
)
if not "%XMLRPC_PORT%"=="" (
echo Starting XML-RPC server on port %XMLRPC_PORT%
set OPTIONS=%OPTIONS% -x %XMLRPC_PORT%
)
if not "%AJP13_PORT%"=="" (
echo Starting AJP13 listener on port %AJP13_PORT%
set OPTIONS=%OPTIONS% -jk %AJP13_PORT%
)
if not "%RMI_PORT%"=="" (
echo Starting RMI server on port %RMI_PORT%
set OPTIONS=%OPTIONS% -p %RMI_PORT%
)
if not "%HOP_HOME%"=="" (
echo Serving applications from %HOP_HOME%
set OPTIONS=%OPTIONS% -h "%HOP_HOME%
)
:: Invoking the Java virtual machine
%JAVACMD% %JAVA_OPTIONS% -jar "%INSTALL_DIR%\launcher.jar" %OPTIONS%

73
build/main/hop.sh Normal file
View file

@ -0,0 +1,73 @@
#!/bin/sh
# Shell script for starting Helma with a JDK-like virtual machine.
# To add JAR files to the classpath, simply place them into the
# lib/ext directory.
# uncomment to set JAVA_HOME variable
# JAVA_HOME=/usr/lib/java
# uncomment to set HOP_HOME, otherwise we get it from the script path
# HOP_HOME=/usr/local/helma
# options to pass to the Java virtual machine
# JAVA_OPTIONS="-server -Xmx128m"
# Set TCP ports for Helma servers
# (comment/uncomment to de/activate)
HTTP_PORT=8080
# XMLRPC_PORT=8081
# AJP13_PORT=8009
# RMI_PORT=5050
###########################################################
###### No user configuration needed below this line #######
###########################################################
# if JAVA_HOME variable is set, use it. Otherwise, Java executable
# must be contained in PATH variable.
if [ "$JAVA_HOME" ]; then
JAVACMD="$JAVA_HOME/bin/java"
else
JAVACMD=java
fi
# Get the Helma installation directory
INSTALL_DIR="${0%/*}"
cd $INSTALL_DIR
INSTALL_DIR=$PWD
# get HOP_HOME variable if it isn't set
if test -z "$HOP_HOME"; then
# try to get HOP_HOME from script file and pwd
# strip everyting behind last slash
HOP_HOME="${0%/*}"
cd $HOP_HOME
HOP_HOME=$PWD
else
cd $HOP_HOME
fi
echo "Starting Helma in directory $HOP_HOME"
if [ "$HTTP_PORT" ]; then
SWITCHES="$SWITCHES -w $HTTP_PORT"
echo Starting HTTP server on port $HTTP_PORT
fi
if [ "$XMLRPC_PORT" ]; then
SWITCHES="$SWITCHES -x $XMLRPC_PORT"
echo Starting XML-RPC server on port $XMLRPC_PORT
fi
if [ "$AJP13_PORT" ]; then
SWITCHES="$SWITCHES -jk $AJP13_PORT"
echo Starting AJP13 listener on port $AJP13_PORT
fi
if [ "$RMI_PORT" ]; then
SWITCHES="$SWITCHES -p $RMI_PORT"
echo Starting RMI server on port $RMI_PORT
fi
if [ "$HOP_HOME" ]; then
SWITCHES="$SWITCHES -h $HOP_HOME"
fi
# Invoke the Java VM
$JAVACMD $JAVA_OPTIONS -jar "$INSTALL_DIR/launcher.jar" $SWITCHES

View file

@ -1,21 +1,4 @@
This package was debianized by Hannes Wallnoefer <hannes@helma.at> on
Mon, 15 Dec 2008 11:04:41 +0100.
It was downloaded from http://www.helma.org/
Upstream Authors:
Hannes Wallnoefer
Robert Gaggl
Daniel Rutharth
Stefan Pollach
Tobias Schaefer
Manfred Andres
Juerg Lehni
Copyright: 1999-2008 Helma Project. All rights reserved.
License:
Copyright (c) 1999-2002 Helma Project. All rights reserved.
Redistribution and use in source and binary forms, with or without
modification, are permitted provided that the following conditions
@ -48,15 +31,19 @@ License:
ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED
OF THE POSSIBILITY OF SUCH DAMAGE.
This product contains the FESI EcmaScript interpreter written by
Jean-Marc Lugrin (http://home.worldcom.ch/jmlugrin/fesi/). FESI is
released under the GNU Lesser General Public License (see licenses/lesser.txt).
Helma includes third party software released under different specific
license terms. See the licenses directory in the Helma distribution
for a list of these licenses.
This product contains software from the Acme package written by Jef
Poskanzer. Please see the licensing terms in the Acme source code and check out
Jef's site at http://www.acme.com/.
The Debian packaging is (C) 2008, Hannes Wallnoefer <hannes@helma.at> and
is licensed under the GPL, see `/usr/share/common-licenses/GPL'.
Parts of Helma come with different licenses, see /usr/share/helma/licenses
for details.
This product includes software developed by the Apache Software Foundation
released under the Apache Software License (licenses/apache.txt).
This product includes software developed by the JDOM Project
(http://www.jdom.org/). Please see the licensing terms in licenses/jdom.txt
This product includes software developed by the Word Wide Web Consortium
(http://www.w3c.org/). Please see the licensing terms in licenses/w3c.html.

View file

@ -0,0 +1,27 @@
# The SMTP server to use for sending mails. Set and
# uncomment this line before trying to send mails from
# Helma applications.
#
# smtp=mail.yourdomain.com
# Some examples for server-wide locale settings
# (please refer to http://userpage.chemie.fu-berlin.de/diverse/doc/ISO_3166.html
# for country codes, resp. http://www.ics.uci.edu/pub/ietf/http/related/iso639.txt
# for language codes).
#
# country = AT
# language = de
#
# country = UK
# language = en
#
# country = FR
# language = fr
#
# country = CZ
# language = cs
# list ip addresses for admin-application here:
allowAdmin=127.0.0.1, 192.168.0.1

BIN
build/main/static/helma.gif Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 721 B

View file

Before

Width:  |  Height:  |  Size: 466 B

After

Width:  |  Height:  |  Size: 466 B

Binary file not shown.

After

Width:  |  Height:  |  Size: 134 KiB

View file

@ -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" },
]

16
db.properties Normal file
View file

@ -0,0 +1,16 @@
# This is where you specify relational data sources to
# map Helma types to relational databases.
#
# If you want to define a data source just for one
# application, simply copy the db.properties file to
# the application directory.
#
# The actual mapping of types is done in the
# type.properties file in the prototype directories.
#
# Properties of JDBC data sources
myDataSource.url = jdbc:mysql://db.domain.com/space
myDataSource.driver = org.gjt.mm.mysql.Driver
myDataSource.user = username
myDataSource.password = xyz

2472
docs/reference.html Normal file

File diff suppressed because it is too large Load diff

View file

@ -1,3 +0,0 @@
org.gradle.console = plain
function =

Binary file not shown.

View file

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

251
gradlew vendored
View file

@ -1,251 +0,0 @@
#!/bin/sh
#
# Copyright © 2015-2021 the original authors.
#
# Licensed under the Apache License, Version 2.0 (the "License");
# you may not use this file except in compliance with the License.
# You may obtain a copy of the License at
#
# https://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
# SPDX-License-Identifier: Apache-2.0
#
##############################################################################
#
# Gradle start up script for POSIX generated by Gradle.
#
# Important for running:
#
# (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
# noncompliant, but you have some other compliant shell such as ksh or
# bash, then to run this script, type that shell name before the whole
# command line, like:
#
# ksh Gradle
#
# Busybox and similar reduced shells will NOT work, because this script
# requires all of these POSIX shell features:
# * functions;
# * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
# «${var#prefix}», «${var%suffix}», and «$( cmd )»;
# * compound commands having a testable exit status, especially «case»;
# * various built-in commands including «command», «set», and «ulimit».
#
# Important for patching:
#
# (2) This script targets any POSIX shell, so it avoids extensions provided
# by Bash, Ksh, etc; in particular arrays are avoided.
#
# The "traditional" practice of packing multiple parameters into a
# space-separated string is a well documented source of bugs and security
# problems, so this is (mostly) avoided, by progressively accumulating
# options in "$@", and eventually passing that to Java.
#
# Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
# and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
# see the in-line comments for details.
#
# There are tweaks for specific operating systems such as AIX, CygWin,
# Darwin, MinGW, and NonStop.
#
# (3) This script is generated from the Groovy template
# 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.
#
# You can find Gradle at https://github.com/gradle/gradle/.
#
##############################################################################
# Attempt to set APP_HOME
# Resolve links: $0 may be a link
app_path=$0
# Need this for daisy-chained symlinks.
while
APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
[ -h "$app_path" ]
do
ls=$( ls -ld "$app_path" )
link=${ls#*' -> '}
case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done
# This is normally unused
# 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
# Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD=maximum
warn () {
echo "$*"
} >&2
die () {
echo
echo "$*"
echo
exit 1
} >&2
# OS specific support (must be 'true' or 'false').
cygwin=false
msys=false
darwin=false
nonstop=false
case "$( uname )" in #(
CYGWIN* ) cygwin=true ;; #(
Darwin* ) darwin=true ;; #(
MSYS* | MINGW* ) msys=true ;; #(
NONSTOP* ) nonstop=true ;;
esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables
JAVACMD=$JAVA_HOME/jre/sh/java
else
JAVACMD=$JAVA_HOME/bin/java
fi
if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
else
JAVACMD=java
if ! command -v java >/dev/null 2>&1
then
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
Please set the JAVA_HOME variable in your environment to match the
location of your Java installation."
fi
fi
# Increase the maximum file descriptors if we can.
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
case $MAX_FD in #(
max*)
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
MAX_FD=$( ulimit -H -n ) ||
warn "Could not query maximum file descriptor limit"
esac
case $MAX_FD in #(
'' | soft) :;; #(
*)
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
# shellcheck disable=SC2039,SC3045
ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
esac
fi
# Collect all arguments for the java command, stacking in reverse order:
# * args from the command line
# * the main class name
# * -classpath
# * -D...appname settings
# * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# For Cygwin or MSYS, switch paths to Windows format before running java
if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
JAVACMD=$( cygpath --unix "$JAVACMD" )
# Now convert the arguments - kludge to limit ourselves to /bin/sh
for arg do
if
case $arg in #(
-*) false ;; # don't mess with options #(
/?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
[ -e "$t" ] ;; #(
*) false ;;
esac
then
arg=$( cygpath --path --ignore --mixed "$arg" )
fi
# Roll the args list around exactly as many times as the number of
# args, so each arg winds up back in the position where it started, but
# possibly modified.
#
# NB: a `for` loop captures its iteration list before it begins, so
# changing the positional parameters here affects neither the number of
# iterations, nor the values presented in `arg`.
shift # remove old arg
set -- "$@" "$arg" # push replacement arg
done
fi
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
# Collect all arguments for the java command:
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
# and any embedded shellness will be escaped.
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
# treated as '${Hostname}' itself on the command line.
set -- \
"-Dorg.gradle.appname=$APP_BASE_NAME" \
-classpath "$CLASSPATH" \
org.gradle.wrapper.GradleWrapperMain \
"$@"
# Stop when "xargs" is not available.
if ! command -v xargs >/dev/null 2>&1
then
die "xargs is not available"
fi
# Use "xargs" to parse quoted args.
#
# With -n1 it outputs one arg per line, with the quotes and backslashes removed.
#
# In Bash we could simply go:
#
# readarray ARGS < <( xargs -n1 <<<"$var" ) &&
# set -- "${ARGS[@]}" "$@"
#
# but POSIX shell has neither arrays nor command substitution, so instead we
# post-process each arg (as a line of input to sed) to backslash-escape any
# character that might be a shell metacharacter, then use eval to reverse
# that process (while maintaining the separation between arguments), and wrap
# the whole thing up as a single "set" statement.
#
# This will of course break if any of these variables contains a newline or
# an unmatched quote.
#
eval "set -- $(
printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
xargs -n1 |
sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
tr '\n' ' '
)" '"$@"'
exec "$JAVACMD" "$@"

94
gradlew.bat vendored
View file

@ -1,94 +0,0 @@
@rem
@rem Copyright 2015 the original author or authors.
@rem
@rem Licensed under the Apache License, Version 2.0 (the "License");
@rem you may not use this file except in compliance with the License.
@rem You may obtain a copy of the License at
@rem
@rem https://www.apache.org/licenses/LICENSE-2.0
@rem
@rem Unless required by applicable law or agreed to in writing, software
@rem distributed under the License is distributed on an "AS IS" BASIS,
@rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
@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 ##########################################################################
@rem
@rem Gradle startup script for Windows
@rem
@rem ##########################################################################
@rem Set local scope for the variables with windows NT shell
if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0
if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME%
@rem Resolve any "." and ".." in APP_HOME to make it shorter.
for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
@rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1
if %ERRORLEVEL% equ 0 goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:findJavaFromJavaHome
set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto execute
echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. 1>&2
goto fail
:execute
@rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end
@rem End local scope for the variables with windows NT shell
if %ERRORLEVEL% equ 0 goto mainEnd
:fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code!
set EXIT_CODE=%ERRORLEVEL%
if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd
if "%OS%"=="Windows_NT" endlocal
:omega

79
hop.bat Executable file
View file

@ -0,0 +1,79 @@
@echo off
rem Batch file for Starting Helma with a JDK-like virtual machine.
rem To add jar files to the classpath, simply place them into the
rem lib/ext directory of this Helma installation.
:: Initialize variables
:: (don't touch this section)
set JAVA_HOME=
set HOP_HOME=
set HTTP_PORT=
set XMLRPC_PORT=
set AJP13_PORT=
set RMI_PORT=
set OPTIONS=
:: Set TCP ports for Helma servers
:: (comment/uncomment to de/activate)
set HTTP_PORT=8080
rem set XMLRPC_PORT=8081
rem set AJP13_PORT=8009
rem set RMI_PORT=5050
:: Uncomment to set HOP_HOME
rem set HOP_HOME=c:\program files\helma
:: Uncomment to set JAVA_HOME variable
rem set JAVA_HOME=c:\program files\java
:: Uncomment to pass options to the Java virtual machine
rem set JAVA_OPTIONS=-server -Xmx128m
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:::::: No user configuration needed below this line :::::::
:::::::::::::::::::::::::::::::::::::::::::::::::::::::::::
:: Setting the script path
set INSTALL_DIR=%~d0%~p0
:: Using JAVA_HOME variable if defined. Otherwise,
:: Java executable must be contained in PATH variable
if "%JAVA_HOME%"=="" goto default
set JAVACMD=%JAVA_HOME%\bin\java
goto end
:default
set JAVACMD=java
:end
:: Setting HOP_HOME to script path if undefined
if "%HOP_HOME%"=="" (
set HOP_HOME=%INSTALL_DIR%
)
cd %HOP_HOME%
:: Setting Helma server options
if not "%HTTP_PORT%"=="" (
echo Starting HTTP server on port %HTTP_PORT%
set OPTIONS=%OPTIONS% -w %HTTP_PORT%
)
if not "%XMLRPC_PORT%"=="" (
echo Starting XML-RPC server on port %XMLRPC_PORT%
set OPTIONS=%OPTIONS% -x %XMLRPC_PORT%
)
if not "%AJP13_PORT%"=="" (
echo Starting AJP13 listener on port %AJP13_PORT%
set OPTIONS=%OPTIONS% -jk %AJP13_PORT%
)
if not "%RMI_PORT%"=="" (
echo Starting RMI server on port %RMI_PORT%
set OPTIONS=%OPTIONS% -p %RMI_PORT%
)
if not "%HOP_HOME%"=="" (
echo Serving applications from %HOP_HOME%
set OPTIONS=%OPTIONS% -h "%HOP_HOME%
)
:: Invoking the Java virtual machine
%JAVACMD% %JAVA_OPTIONS% -jar "%INSTALL_DIR%\launcher.jar" %OPTIONS%

73
hop.sh Executable file
View file

@ -0,0 +1,73 @@
#!/bin/sh
# Shell script for starting Helma with a JDK-like virtual machine.
# To add JAR files to the classpath, simply place them into the
# lib/ext directory.
# uncomment to set JAVA_HOME variable
# JAVA_HOME=/usr/lib/java
# uncomment to set HOP_HOME, otherwise we get it from the script path
# HOP_HOME=/usr/local/helma
# options to pass to the Java virtual machine
# JAVA_OPTIONS="-server -Xmx128m"
# Set TCP ports for Helma servers
# (comment/uncomment to de/activate)
HTTP_PORT=8080
# XMLRPC_PORT=8081
# AJP13_PORT=8009
# RMI_PORT=5050
###########################################################
###### No user configuration needed below this line #######
###########################################################
# if JAVA_HOME variable is set, use it. Otherwise, Java executable
# must be contained in PATH variable.
if [ "$JAVA_HOME" ]; then
JAVACMD="$JAVA_HOME/bin/java"
else
JAVACMD=java
fi
# Get the Helma installation directory
INSTALL_DIR="${0%/*}"
cd $INSTALL_DIR
INSTALL_DIR=$PWD
# get HOP_HOME variable if it isn't set
if test -z "$HOP_HOME"; then
# try to get HOP_HOME from script file and pwd
# strip everyting behind last slash
HOP_HOME="${0%/*}"
cd $HOP_HOME
HOP_HOME=$PWD
else
cd $HOP_HOME
fi
echo "Starting Helma in directory $HOP_HOME"
if [ "$HTTP_PORT" ]; then
SWITCHES="$SWITCHES -w $HTTP_PORT"
echo Starting HTTP server on port $HTTP_PORT
fi
if [ "$XMLRPC_PORT" ]; then
SWITCHES="$SWITCHES -x $XMLRPC_PORT"
echo Starting XML-RPC server on port $XMLRPC_PORT
fi
if [ "$AJP13_PORT" ]; then
SWITCHES="$SWITCHES -jk $AJP13_PORT"
echo Starting AJP13 listener on port $AJP13_PORT
fi
if [ "$RMI_PORT" ]; then
SWITCHES="$SWITCHES -p $RMI_PORT"
echo Starting RMI server on port $RMI_PORT
fi
if [ "$HOP_HOME" ]; then
SWITCHES="$SWITCHES -h $HOP_HOME"
fi
# Invoke the Java VM
$JAVACMD $JAVA_OPTIONS -jar "$INSTALL_DIR/launcher.jar" $SWITCHES

View file

@ -1,5 +0,0 @@
jar {
manifest {
from 'src/main/java/helma/main/launcher/manifest.txt'
}
}

View file

@ -1,59 +0,0 @@
/*
* Helma License Notice
*
* The contents of this file are subject to the Helma License
* Version 2.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://adele.helma.org/download/helma/license.txt
*
* Copyright 1998-2003 Helma Software. All Rights Reserved.
*
* $RCSfile$
* $Author$
* $Revision$
* $Date$
*/
package helma.main.launcher;
import java.lang.reflect.*;
/**
* Helma bootstrap class. Figures out Helma home directory, sets up class path and
* lauchnes main class. This class must be invoked from a jar file in order to work.
*
* @author Stefan Pollach
*/
public class Commandline {
/**
* boot method for running a request from the command line.
* This retrieves the Helma home directory, creates the
* classpath, get the request properties, creates the app and
* runs it
*-
* @param args command line arguments
*/
public static void main(String[] args) {
try {
String installDir = Main.getInstallDir(args);
ClassLoader loader = Main.createClassLoader(installDir);
// get the main server class
Class clazz = loader.loadClass("helma.main.CommandlineRunner");
Class[] cargs = new Class[]{args.getClass()};
Method main = clazz.getMethod("main", cargs);
Object[] nargs = new Object[]{args};
// and invoke the static main(String, String[]) method
main.invoke(null, nargs);
} catch (Exception x) {
// unable to get Helma installation dir from launcher jar
x.printStackTrace();
System.err.println("Unable to get Helma installation directory: ");
System.err.println(x.getMessage());
System.exit(2);
}
}
}

View file

@ -1,234 +0,0 @@
/*
* Helma License Notice
*
* The contents of this file are subject to the Helma License
* Version 2.0 (the "License"). You may not use this file except in
* compliance with the License. A copy of the License is available at
* http://adele.helma.org/download/helma/license.txt
*
* Copyright 1998-2003 Helma Software. All Rights Reserved.
*
* $RCSfile$
* $Author$
* $Revision$
* $Date$
*/
package helma.main.launcher;
import java.io.File;
import java.io.FilenameFilter;
import java.io.IOException;
import java.io.UnsupportedEncodingException;
import java.lang.reflect.Method;
import java.net.URL;
import java.net.URLClassLoader;
import java.net.URLDecoder;
import java.net.MalformedURLException;
import java.util.ArrayList;
/**
* Helma bootstrap class. Basically this is a convenience wrapper that takes over
* the job of setting the class path and helma install directory before launching
* the static main(String[]) method in <code>helma.main.Server</code>. This class
* should be invoked from a jar file in the Helma install directory in order to
* be able to set up class and install paths.
*/
public class Main {
private Class serverClass;
private Object server;
private static final Class[] EMPTY_CLASS_ARRAY = new Class[0];
private static final Object[] EMPTY_OBJECT_ARRAY = new Object[0];
/**
* Helma boot method. This retrieves the Helma home directory, creates the
* classpath and invokes main() in helma.main.Server.
*
* @param args command line arguments
*
*/
public static void main(String[] args) {
Main main = new Main();
main.init(args);
main.start();
}
public void init(String[] args) {
try {
String installDir = getInstallDir(args);
ClassLoader loader = createClassLoader(installDir);
// get the main server class
serverClass = loader.loadClass("helma.main.Server");
Class[] cargs = new Class[]{args.getClass()};
Method loadServer = serverClass.getMethod("loadServer", cargs);
Object[] nargs = new Object[]{args};
// and invoke the static loadServer(String[]) method
server = loadServer.invoke(null, nargs);
Method init = serverClass.getMethod("init", EMPTY_CLASS_ARRAY);
init.invoke(server, EMPTY_OBJECT_ARRAY);
} catch (Exception x) {
// unable to get Helma installation dir from launcher jar
System.err.println("Unable to load Helma: ");
x.printStackTrace();
System.exit(2);
}
}
public void start() {
try {
Method start = serverClass.getMethod("start", EMPTY_CLASS_ARRAY);
start.invoke(server, EMPTY_OBJECT_ARRAY);
} catch (Exception x) {
// unable to get Helma installation dir from launcher jar
System.err.println("Unable to start Helma: ");
x.printStackTrace();
System.exit(2);
}
}
public void stop() {
try {
Method start = serverClass.getMethod("stop", EMPTY_CLASS_ARRAY);
start.invoke(server, EMPTY_OBJECT_ARRAY);
} catch (Exception x) {
// unable to get Helma installation dir from launcher jar
System.err.println("Unable to stop Helma: ");
x.printStackTrace();
System.exit(2);
}
}
public void destroy() {
try {
Method start = serverClass.getMethod("shutdown", EMPTY_CLASS_ARRAY);
start.invoke(server, EMPTY_OBJECT_ARRAY);
} catch (Exception x) {
// unable to get Helma installation dir from launcher jar
System.err.println("Unable to shutdown Helma: ");
x.printStackTrace();
System.exit(2);
}
}
static void addJars(ArrayList jarlist, File dir) throws MalformedURLException {
File[] files = dir.listFiles(new FilenameFilter() {
public boolean accept(File dir, String name) {
String n = name.toLowerCase();
return n.endsWith(".jar") || n.endsWith(".zip"); //$NON-NLS-1$//$NON-NLS-2$
}
});
if (files != null) {
for (int i = 0; i < files.length; i++) {
jarlist.add(new URL("file:" + files[i].getAbsolutePath())); //$NON-NLS-1$
}
}
}
/**
* Create a server-wide ClassLoader from our install directory.
* This will be used as parent ClassLoader for all application
* ClassLoaders.
*
* @param installDir
* @return the main classloader we'll be using
* @throws MalformedURLException
*/
public static ClassLoader createClassLoader(String installDir)
throws MalformedURLException, UnsupportedEncodingException {
// decode installDir in case it is URL-encoded
installDir = URLDecoder.decode(installDir, System.getProperty("helma.urlEncoding", "UTF-8"));
// set up the class path
File libdir = new File(installDir, "lib");
ArrayList jarlist = new ArrayList();
// add all jar files from the lib directory
addJars(jarlist, libdir);
// add all jar files from the lib/ext directory
addJars(jarlist, new File(libdir, "ext")); //$NON-NLS-1$
URL[] urls = new URL[jarlist.size()];
jarlist.toArray(urls);
// find out if system classes should be excluded from class path
String excludeSystemClasses = System.getProperty("helma.excludeSystemClasses");
ClassLoader loader;
if ("true".equalsIgnoreCase(excludeSystemClasses)) {
loader = new URLClassLoader(urls, null);
} else {
loader = new URLClassLoader(urls);
}
// set the new class loader as context class loader
Thread.currentThread().setContextClassLoader(loader);
return loader;
}
/**
* Get the Helma install directory from the command line -i argument or
* from the Jar URL from which this class was loaded. Additionally, the
* System property "helma.home" is set to the install directory path.
*
* @param args
* @return the base install directory we're running in
* @throws IOException
* @throws MalformedURLException
*/
public static String getInstallDir(String[] args)
throws IOException, MalformedURLException {
// check if home directory is set via command line arg. If not,
// we'll get it from the location of the jar file this class
// has been loaded from.
String installDir = null;
// first, try to get helma home dir from command line options
for (int i = 0; i < args.length; i++) {
if (args[i].equals("-i") && ((i + 1) < args.length)) {
installDir = args[i + 1];
}
}
// try to get Helma installation directory
if (installDir == null) {
URL launcherUrl = ClassLoader.getSystemClassLoader()
.getResource("helma/main/launcher/Main.class"); //$NON-NLS-1$
// this is a JAR URL of the form
// jar:<url>!/{entry}
// we strip away the jar: prefix and the !/{entry} suffix
// to get the original jar file URL
String jarUrl = launcherUrl.toString();
if (!jarUrl.startsWith("jar:") || jarUrl.indexOf("!") < 0) {
installDir = System.getProperty("user.dir");
System.err.println("Warning: Helma install dir not set by -i parameter ");
System.err.println(" and not started from launcher.jar. Using ");
System.err.println(" current working directory as install dir.");
} else {
jarUrl = jarUrl.substring(4);
int excl = jarUrl.indexOf("!");
jarUrl = jarUrl.substring(0, excl);
launcherUrl = new URL(jarUrl);
File f = new File(launcherUrl.getPath()).getAbsoluteFile();
installDir = f.getParentFile().getCanonicalPath();
}
}
// set System property
System.setProperty("helma.home", installDir);
// and return install dir
return installDir;
}
}

BIN
lib/activation.jar Normal file

Binary file not shown.

BIN
lib/apache-dom.jar Normal file

Binary file not shown.

BIN
lib/crimson.jar Normal file

Binary file not shown.

View file

Some files were not shown because too many files have changed in this diff Show more