Compare commits

...

153 commits

Author SHA1 Message Date
57642f6f10
Use today’s date as release title 2024-05-30 20:25:44 +02:00
dd0bdc62ec
Fix setup of GitHub token 2024-05-30 20:22:14 +02:00
renovate[bot]
656a023b27
Update dependency com.google.code.gson:gson to v2.11.0 2024-05-30 20:22:13 +02:00
7c52b6ba46
Add release action 2024-05-30 20:22:13 +02:00
47f7b19fe9
Merge remote-tracking branch 'origin/helma-🐜' into helma-🐜 2024-05-30 18:48:34 +02:00
ebf9b22f55
Bump minimum Java version to 17 (LTS) 2024-05-25 19:34:10 +02:00
399f81c1dc
Merge pull request #107 from antville/resolve-java-warnings
Resolve java warnings
2024-05-25 18:52:37 +02:00
d02dd85a45
Merge pull request #108 from antville/fix-javadoc-warnings
Fix JavaDoc warnings
2024-05-25 18:52:36 +02:00
0bfa585cb9
Replace new Boolean() with Boolean.valueOf()
Signed-off-by: Tobi Schäfer <interface@p3k.org>
2024-05-25 18:52:35 +02:00
8ffb7b0b08
Replace new Integer() with Integer.valueOf()
Signed-off-by: Tobi Schäfer <interface@p3k.org>
2024-05-25 18:52:34 +02:00
a68c478dd5
Replace new Double() with Double.valueOf()
Signed-off-by: Tobi Schäfer <interface@p3k.org>
2024-05-25 18:52:34 +02:00
77ea53d949
Fix JavaDoc warnings 2024-05-25 18:52:33 +02:00
2ff75f7879
Replace new Long() with Long.valueOf()
Signed-off-by: Tobi Schäfer <interface@p3k.org>
2024-05-25 18:52:33 +02:00
052bfc0db1
Update README.md
Minor edits
2024-05-25 18:52:32 +02:00
63c5aec4df
Add tasks to set up SSH agent and publish installation 2024-05-25 18:50:11 +02:00
cfbfea51d7
Create staging.yml 2024-05-25 18:50:10 +02:00
bca560e577
Do not run the update task in CI context 2024-05-25 18:50:09 +02:00
7f8c776c57
Upgrade the project dir only selectively on install 2024-05-25 18:50:08 +02:00
7fa9b805d6
Update renovate.json
Group Lucene packages
2024-05-25 18:50:08 +02:00
renovate[bot]
2ecd5b4e36
Update dependency gradle to v8.7 2024-05-25 18:50:07 +02:00
d23268095a
Gradle has an issue with the date-based version string 2024-05-25 18:50:06 +02:00
daf8da61b1 Add tasks to set up SSH agent and publish installation 2024-05-19 01:22:13 +02:00
db4dfd0ba7 Create staging.yml 2024-05-18 23:31:25 +02:00
f0ac6cdb5f Do not run the update task in CI context 2024-05-18 23:31:25 +02:00
d7f9882596 Upgrade the project dir only selectively on install 2024-05-18 23:11:45 +02:00
d6b7c97518 Update renovate.json
Group Lucene packages
2024-05-18 23:11:45 +02:00
renovate[bot]
b984877877 Update dependency gradle to v8.7 2024-05-18 23:11:45 +02:00
1a1b676604 Gradle has an issue with the date-based version string 2024-05-18 17:34:32 +02:00
46dd4a2c31
Merge pull request #102 from antville/renovate/jetty-packages
Update Jetty packages to v9.4.54.v20240208
2024-05-18 17:29:47 +02:00
renovate[bot]
ee2384f35a
Update Jetty packages to v9.4.54.v20240208 2024-05-18 15:19:19 +00:00
d25b8d207e
Update renovate.json
Group Jetty packages
2024-05-18 17:18:31 +02:00
f4cd065c59
Merge pull request #95 from antville/renovate/commons-codec-commons-codec-1.x
Update dependency commons-codec:commons-codec to v1.17.0
2024-05-18 17:12:42 +02:00
4b7f3b216d
Merge pull request #99 from antville/renovate/com.github.jk1.dependency-license-report-2.x
Update plugin com.github.jk1.dependency-license-report to v2.7
2024-05-18 17:07:36 +02:00
23f09d2d4f
Merge pull request #100 from antville/renovate/commons-logging-commons-logging-1.x
Update dependency commons-logging:commons-logging to v1.3.2
2024-05-18 17:01:09 +02:00
renovate[bot]
b6ed068e26
Update plugin com.github.jk1.dependency-license-report to v2.7 2024-05-18 14:51:24 +00:00
e96c224abc
Merge pull request #101 from antville/renovate/maven-dom4j-dom4j-vulnerability
Update dependency dom4j:dom4j to v20040902 [SECURITY]
2024-05-18 16:51:23 +02:00
renovate[bot]
519adc3d37
Update dependency commons-codec:commons-codec to v1.17.0 2024-05-18 14:49:57 +00:00
renovate[bot]
7d57badb94
Update dependency commons-logging:commons-logging to v1.3.2 2024-05-18 14:49:48 +00:00
renovate[bot]
b0e319f3dd
Update dependency dom4j:dom4j to v20040902 [SECURITY] 2024-05-18 14:49:45 +00:00
b8abe5a355
Fix Gradle task dependencies 2024-05-18 16:47:39 +02:00
7fa3f48cff
Pin dependency to version number 2024-05-18 16:47:38 +02:00
d64ca1c7a8
Do not exclude apps directory in Codium 2024-05-18 16:47:37 +02:00
eae2848e9e
Update Codium extensions for Java support 2024-05-18 16:47:36 +02:00
581b17bc72
Update renovate.json 2024-03-24 14:05:18 +01:00
ab116b2af9
Update renovate.json 2024-03-24 14:01:21 +01:00
d7ab9ff461
Update renovate.json 2024-03-24 13:45:44 +01:00
renovate[bot]
fd15c4703f
Update dependency dom4j:dom4j to v20040902 [SECURITY] (#96)
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
2024-02-19 22:17:28 +00:00
5e1435433a
Add vulnerability alerts 2024-02-10 22:51:46 +01:00
958a3c1cfc Merge remote-tracking branch 'origin/helma-🐜' into helma-🐜 2024-01-07 00:19:24 +01:00
5a4ad8eeda JSDoc issue seems to be fixed 2024-01-07 00:16:06 +01:00
54b9002bf4
Merge pull request #91 from antville/renovate/gradle-8.x
Update dependency gradle to v8.5
2024-01-06 21:33:57 +01:00
2e45fa4b6a
Merge pull request #89 from antville/renovate/org.eclipse.jetty-jetty-servlet-9.x
Update dependency org.eclipse.jetty:jetty-servlet to v9.4.53.v20231009
2024-01-06 21:19:48 +01:00
0fec3244e3
Merge pull request #76 from antville/renovate/commons-codec-commons-codec-1.x
Update dependency commons-codec:commons-codec to v1.16.0
2024-01-06 21:19:07 +01:00
renovate[bot]
aafd5f8a4c
Update dependency org.eclipse.jetty:jetty-servlet to v9.4.53.v20231009 2024-01-06 20:16:57 +00:00
752e4a0df7
Merge pull request #90 from antville/renovate/org.eclipse.jetty-jetty-xml-9.x
Update dependency org.eclipse.jetty:jetty-xml to v9.4.53.v20231009
2024-01-06 21:16:34 +01:00
bf29398ade
Merge pull request #92 from antville/renovate/commons-net-commons-net-3.x
Update dependency commons-net:commons-net to v3.10.0
2024-01-06 21:16:21 +01:00
renovate[bot]
7555411cdc
Update dependency commons-net:commons-net to v3.10.0 2024-01-06 20:16:12 +00:00
2f34fb5e05
Merge pull request #93 from antville/renovate/commons-logging-commons-logging-1.x
Update dependency commons-logging:commons-logging to v1.3.0
2024-01-06 21:15:55 +01:00
6eb1feb5cd
Update helma.service 2024-01-05 21:52:35 +01:00
6eaf097aef Add support for images in webp format 2023-12-30 15:11:41 +01:00
renovate[bot]
48ddd69f19
Update dependency commons-logging:commons-logging to v1.3.0 2023-12-01 05:25:09 +00:00
renovate[bot]
0223cb4ffe
Update dependency gradle to v8.5 2023-11-30 05:38:49 +00:00
renovate[bot]
1fa13b9fef
Update dependency org.eclipse.jetty:jetty-xml to v9.4.53.v20231009 2023-10-10 04:56:08 +00:00
3ccf0af87b
Update renovate.json 2023-08-28 21:10:36 +02:00
0774054470
Update renovate.json 2023-08-28 20:59:58 +02:00
e6a893a52e Remove Dependabot configuration 2023-08-28 19:46:09 +02:00
renovate[bot]
50ef602d42
fix(deps): update dependency commons-codec:commons-codec to v1.16.0 2023-08-27 11:13:38 +00:00
2cff9188cb
Replace Dependabot with Renovate 2023-08-27 13:12:53 +02:00
1540c5d24f
Merge pull request #74 from antville/renovate/configure
Configure Renovate
2023-08-27 12:53:35 +02:00
renovate[bot]
db966fb4e8
Add renovate.json 2023-08-27 10:50:25 +00:00
b04b1cf4bf
Merge pull request #68 from antville/rewrite-for-each-with-for-of
Rewrite `for…each` with `for…of`
2023-08-27 12:13:56 +02:00
d2e09554cd
Merge pull request #73 from antville/jetty-xml-9.4.51-upgrade
Upgrade Jetty XML package to version 9.4.51
2023-08-27 12:11:24 +02:00
647ca18d7b Upgrade Jetty XML package to same version as Jetty servlet 2023-08-27 12:10:26 +02:00
a580f08c17 Upgrade Gradle to latest version 2023-08-27 12:06:10 +02:00
94d6b2d1a1
Merge pull request #71 from antville/dependabot/gradle/com.github.jk1.dependency-license-report-2.5
build(deps): bump com.github.jk1.dependency-license-report from 2.2 to 2.5
2023-08-27 11:36:50 +02:00
d80ad0bf33
Merge pull request #70 from antville/dependabot/gradle/commons-net-commons-net-3.9.0
build(deps): bump commons-net:commons-net from 3.8.0 to 3.9.0
2023-08-27 11:36:42 +02:00
dependabot[bot]
dbb0b6bcfd
build(deps): bump com.github.jk1.dependency-license-report
Bumps com.github.jk1.dependency-license-report from 2.2 to 2.5.

---
updated-dependencies:
- dependency-name: com.github.jk1.dependency-license-report
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-27 09:29:35 +00:00
dependabot[bot]
d419342ee9
build(deps): bump commons-net:commons-net from 3.8.0 to 3.9.0
Bumps commons-net:commons-net from 3.8.0 to 3.9.0.

---
updated-dependencies:
- dependency-name: commons-net:commons-net
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-08-27 09:29:34 +00:00
a7ee467cdc
Group Jetty packages in Dependabot PRs 2023-08-27 11:29:05 +02:00
b812b33213 Merge branch 'helma-🐜' into rewrite-for-each-with-for-of 2023-08-26 23:26:09 +02:00
0e8f04c0f5 Replace for..each loops with for..of 2023-08-26 22:32:44 +02:00
d601ec689d
Merge pull request #65 from antville/dependabot/gradle/org.eclipse.jetty-jetty-servlet-9.4.51.v20230217
build(deps): bump org.eclipse.jetty:jetty-servlet from 9.4.50.v20221201 to 9.4.51.v20230217
2023-08-26 21:44:38 +02:00
6d5288f94b
Merge pull request #64 from antville/dependabot/gradle/com.google.code.gson-gson-2.10.1
build(deps): bump com.google.code.gson:gson from 2.8.9 to 2.10.1
2023-08-26 21:40:37 +02:00
7eae3ba273
Merge pull request #66 from antville/dependabot/gradle/commons-fileupload-commons-fileupload-1.5
build(deps): bump commons-fileupload:commons-fileupload from 1.4 to 1.5
2023-08-26 21:38:29 +02:00
796a6e7337 Enable ES6 features in Rhino 2023-08-26 21:29:54 +02:00
dependabot[bot]
4ca91f5b2e
build(deps): bump commons-fileupload:commons-fileupload from 1.4 to 1.5
Bumps commons-fileupload:commons-fileupload from 1.4 to 1.5.

---
updated-dependencies:
- dependency-name: commons-fileupload:commons-fileupload
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 09:57:57 +00:00
dependabot[bot]
fb4b11a426
build(deps): bump org.eclipse.jetty:jetty-servlet
Bumps [org.eclipse.jetty:jetty-servlet](https://github.com/eclipse/jetty.project) from 9.4.50.v20221201 to 9.4.51.v20230217.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-9.4.50.v20221201...jetty-9.4.51.v20230217)

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-servlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 09:57:54 +00:00
dependabot[bot]
7fbad44166
build(deps): bump com.google.code.gson:gson from 2.8.9 to 2.10.1
Bumps [com.google.code.gson:gson](https://github.com/google/gson) from 2.8.9 to 2.10.1.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.8.9...gson-parent-2.10.1)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-22 09:57:44 +00:00
e61b654238 Reduce rsync arguments to become more compatible 2023-05-21 12:26:38 +02:00
a19eb278c7 Disable DocLint for now
Too strict, causing too many errors
2023-05-21 12:26:37 +02:00
6701ac8095
Merge pull request #41 from antville/dependabot/gradle/xerces-xercesImpl-2.12.2
build(deps): bump xercesImpl from 2.12.1 to 2.12.2
2023-05-19 15:35:13 +02:00
1b4624d437
Merge pull request #62 from antville/dependabot/gradle/com.github.jk1.dependency-license-report-2.2
build(deps): bump com.github.jk1.dependency-license-report from 2.0 to 2.2
2023-05-19 15:31:58 +02:00
5bd6e521ce
Merge pull request #52 from antville/dependabot/gradle/org.eclipse.jetty-jetty-servlet-9.4.50.v20221201
build(deps): bump jetty-servlet from 9.4.27.v20200227 to 9.4.50.v20221201
2023-05-19 15:29:31 +02:00
dependabot[bot]
090afa9656
build(deps): bump xercesImpl from 2.12.1 to 2.12.2
Bumps xercesImpl from 2.12.1 to 2.12.2.

---
updated-dependencies:
- dependency-name: xerces:xercesImpl
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 12:51:02 +00:00
dependabot[bot]
6c61b9a02b
build(deps): bump com.github.jk1.dependency-license-report
Bumps com.github.jk1.dependency-license-report from 2.0 to 2.2.

---
updated-dependencies:
- dependency-name: com.github.jk1.dependency-license-report
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
2023-05-19 12:50:52 +00:00
58d893f044
Create helma.service
Add SystemD unit file with reasonable settings

See <https://www.baeldung.com/linux/run-java-application-as-service>
2023-05-07 01:29:35 +02:00
ec67204d51
Merge pull request #61 from antville/add-development.prerequisites
Add development prerequisites
2023-03-09 14:20:53 +01:00
a692d7718c
Add development prerequisites
Fixes #56.
Fixes #58 .
2023-03-09 14:08:42 +01:00
08a5233bc6
Merge pull request #60 from antville/59-add-support-for-jenv
Add support for jEnv
2023-03-07 00:10:47 +01:00
6a3a90c4f4 Add .java-version file 2023-03-06 23:08:46 +00:00
5fe68aef81 Add VS Code settings 2023-03-05 15:54:15 +01:00
db2ebbed9c
Merge pull request #55 from antville/54-add-support-for-prepared-sql-statements-to-databaseobject
Add DatabaseObject.executePreparedRetrieval() method
2023-03-05 13:10:25 +01:00
9a0cf1a22d Add DatabaseObject.executePreparedRetrieval() method 2023-03-05 13:00:13 +01:00
dependabot[bot]
276290add0
build(deps): bump jetty-servlet
Bumps [jetty-servlet](https://github.com/eclipse/jetty.project) from 9.4.27.v20200227 to 9.4.50.v20221201.
- [Release notes](https://github.com/eclipse/jetty.project/releases)
- [Commits](https://github.com/eclipse/jetty.project/compare/jetty-9.4.27.v20200227...jetty-9.4.50.v20221201)

---
updated-dependencies:
- dependency-name: org.eclipse.jetty:jetty-servlet
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2022-12-08 09:04:43 +00:00
832a9069f1
Merge pull request #35 from antville/dependabot/gradle/com.google.code.gson-gson-2.8.9
build(deps): bump gson from 2.8.6 to 2.8.9
2021-12-11 18:05:51 +01:00
f78e37905c
Merge pull request #32 from antville/dependabot/gradle/com.github.jk1.dependency-license-report-2.0
build(deps): bump com.github.jk1.dependency-license-report from 1.16 to 2.0
2021-12-11 17:57:39 +01:00
dependabot[bot]
4bee79eca7
build(deps): bump gson from 2.8.6 to 2.8.9
Bumps [gson](https://github.com/google/gson) from 2.8.6 to 2.8.9.
- [Release notes](https://github.com/google/gson/releases)
- [Changelog](https://github.com/google/gson/blob/master/CHANGELOG.md)
- [Commits](https://github.com/google/gson/compare/gson-parent-2.8.6...gson-parent-2.8.9)

---
updated-dependencies:
- dependency-name: com.google.code.gson:gson
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-11-01 09:08:02 +00:00
411b9198e4 Change creation of HopSession cookie value
Only include one of either, IP forwarded by proxy or remote address
2021-09-05 14:55:42 +02:00
dependabot[bot]
524578e8de
build(deps): bump com.github.jk1.dependency-license-report
Bumps com.github.jk1.dependency-license-report from 1.16 to 2.0.

---
updated-dependencies:
- dependency-name: com.github.jk1.dependency-license-report
  dependency-type: direct:production
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
2021-09-01 09:17:24 +00:00
4fc158d6eb Also decompress error stream if required 2021-05-24 12:29:43 +02:00
5a3514440c
Merge pull request #9 from antville/dependabot/gradle/org.mozilla-rhino-1.7.13
build(deps): bump rhino from 1.7.12 to 1.7.13
2021-05-16 13:25:38 +02:00
84f4a5f396 Merge branch 'helma-🐜' into dependabot/gradle/org.mozilla-rhino-1.7.13 2021-05-16 13:16:19 +02:00
85e8088e40 Clean up upstart files 2021-04-18 19:50:07 +02:00
e0e78b1349 Bump Gradle version 2021-04-18 19:45:34 +02:00
9d5a504702
Merge pull request #10 from antville/dependabot/gradle/commons-codec-commons-codec-1.15
build(deps): bump commons-codec from 1.14 to 1.15
2021-04-05 17:34:36 +02:00
8eb3c53818
Minor fix 2021-04-05 12:21:03 +02:00
9b63e208d9
Add myself as default assignee 2021-04-05 12:05:09 +02:00
d3c325cef4 Add Java dependency for Test app to Gradle
Version 1.2 of subethasmtp is the closest available version (1.2.1)

⚠️ Modules were not tested after upgrade
2021-04-05 11:55:20 +02:00
e54b36bb2a Add Java dependency for HopKit to Gradle
Version 2.4.0 of Bean Scripting Framework is the closest available version (Oct 2006)

⚠️ Modules were not tested after upgrade
2021-04-05 11:41:19 +02:00
34b3a5d578 Add comment to unresolved deps 2021-04-05 11:25:48 +02:00
dependabot[bot]
6ed340675a
build(deps): bump commons-codec from 1.14 to 1.15
Bumps [commons-codec](https://github.com/apache/commons-codec) from 1.14 to 1.15.
- [Release notes](https://github.com/apache/commons-codec/releases)
- [Changelog](https://github.com/apache/commons-codec/blob/master/RELEASE-NOTES.txt)
- [Commits](https://github.com/apache/commons-codec/compare/commons-codec-1.14...rel/commons-codec-1.15)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-05 09:24:36 +00:00
dependabot[bot]
7f23ded63d
build(deps): bump rhino from 1.7.12 to 1.7.13
Bumps [rhino](https://github.com/mozilla/rhino) from 1.7.12 to 1.7.13.
- [Release notes](https://github.com/mozilla/rhino/releases)
- [Changelog](https://github.com/mozilla/rhino/blob/master/RELEASE-NOTES.md)
- [Commits](https://github.com/mozilla/rhino/commits)

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-05 09:24:32 +00:00
e8d9f05b72 Add Java dependency for MP3 module to Gradle
Version 0.5.4 of jid3lib should be the correct version

⚠️ Modules were not tested after upgrade
2021-04-05 11:22:09 +02:00
a7fece6218 Add Java dependency for HtmlDocument module to Gradle
Version 1.1-beta-8 of Jaxen should be the correct version

⚠️ Modules were not tested after upgrade
2021-04-05 11:16:42 +02:00
ed5aac7f66 Add Java dependency for HtmlDocument module to Gradle
Version 1.6.1 of Dom4J should be the correct version

⚠️ Modules were not tested after upgrade
2021-04-05 11:03:44 +02:00
9e2bf074b7 Add Java dependency for search module to Gradle
Version 2.2.0 of Lucene should be the correct version

⚠️ Modules were not tested after upgrade
2021-04-05 10:55:52 +02:00
aea04da690 Add Java dependency for charts module to Gradle
Version 2.5.7 of JXL is closest available version (2.4.3)

⚠️ Modules were not tested after upgrade
2021-04-05 10:49:51 +02:00
2f8160526c Add Java dependency for SSH module to Gradle
Build 208 of ganymed-ssh2 is closest available version (Aug 2005)

⚠️ Modules were not tested after upgrade
2021-04-05 10:49:12 +02:00
ac02b90699 Make Git ignore .idea dir 2021-04-05 10:46:45 +02:00
8b990e29ca
Merge pull request #8 from antville/dependabot/gradle/commons-net-commons-net-3.8.0
build(deps): bump commons-net from 3.6 to 3.8.0
2021-04-04 21:01:29 +02:00
926f62ec57
Merge pull request #5 from antville/dependabot/gradle/xerces-xercesImpl-2.12.1
build(deps): bump xercesImpl from 2.12.0 to 2.12.1
2021-04-04 21:00:41 +02:00
47abd0e404
Merge pull request #7 from antville/dependabot/gradle/com.github.jk1.dependency-license-report-1.16
build(deps): bump com.github.jk1.dependency-license-report from 1.13 to 1.16
2021-04-04 21:00:24 +02:00
ae2c1c6221
Bump Java version according to config 2021-04-04 20:56:21 +02:00
dependabot[bot]
b5c6afda24
build(deps): bump commons-net from 3.6 to 3.8.0
Bumps commons-net from 3.6 to 3.8.0.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-04 18:28:10 +00:00
dependabot[bot]
b7a8e68537
build(deps): bump com.github.jk1.dependency-license-report
Bumps com.github.jk1.dependency-license-report from 1.13 to 1.16.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-04 18:28:08 +00:00
dependabot[bot]
425e3671ba
build(deps): bump xercesImpl from 2.12.0 to 2.12.1
Bumps xercesImpl from 2.12.0 to 2.12.1.

Signed-off-by: dependabot[bot] <support@github.com>
2021-04-04 18:28:03 +00:00
7a5e470821
Update dependabot.yml 2021-04-04 20:27:40 +02:00
b31b0dc2a5
Create dependabot.yml 2021-04-04 20:26:17 +02:00
Robert Gaggl
4b9b78bb0f Cherry-pick 390231e8dd 2021-03-06 19:11:48 +01:00
7e39892c4a Require Java 11 2021-03-06 19:01:35 +01:00
Robert Gaggl
62291171e3 res.setCookie() now accepts boolean httponly and secure flags
httponly defaults to true, secure to false
2021-03-06 18:52:18 +01:00
97db46a66c Merge remote-tracking branch 'helma-org/master' into helma-🐜 2021-03-06 18:46:29 +01:00
8305d30bad
fix: typo 2020-06-14 11:46:05 +02:00
Simon Oberhammer
f1fa050ea5 bump version 1.7.4 2018-02-13 15:14:22 +01:00
Simon Oberhammer
e82aa34967 package modules too 2018-02-13 15:14:07 +01:00
Simon Oberhammer
65381e7638 use java8 as target; source could stay 1.5 but i'm bumping this too now 2018-02-13 14:44:56 +01:00
Simon Oberhammer
21739a54d8 update readme (first time after 9 years. yey\!) 2018-02-13 14:44:28 +01:00
Simon Oberhammer
d1fb7d312e neither jsdocs nor javadocs did build and the tools seem to be gone for a long time so drop those tasks from ant file; also removed welcome app from demo since this app no longer exists 2018-02-13 14:35:10 +01:00
Robert Gaggl
81f5e3cd8e res.setCookie() now accepts boolean httponly and secure flags
httponly defaults to true, secure to false
2017-03-27 15:50:01 +02:00
Robert Gaggl
75f0245817 removed activation.jar, this is part of j2se since version 6 2017-03-27 14:45:33 +02:00
Robert Gaggl
021a24a100 updated commons libs:
- codec to 1.10
- fileupload to 1.3.2
- io to 2.5
- logging to 1.2
- net to 3.6
2017-03-27 14:39:34 +02:00
Robert Gaggl
390231e8dd updated to jetty 9.4.3.v20170317 2017-03-27 14:17:46 +02:00
Robert Gaggl
b0ff574e95 updated rhino to 1.7.7.1 and jdk8 2016-12-05 13:47:42 +01:00
63 changed files with 1086 additions and 590 deletions

45
.github/workflows/release.yml vendored Normal file
View file

@ -0,0 +1,45 @@
name: Release
on:
push:
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
runs-on: ubuntu-latest
env:
GH_TOKEN: ${{ github.token }}
LC_TIME: en_US.UTF-8
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew assembleDist
- name: Create release
run: |
gh release create "$GITHUB_REF_NAME" \
--repo "$GITHUB_REPOSITORY" \
--title "$(date +'%d %b %Y')" \
--generate-notes
- name: Upload assets
run: |
gh release upload "$GITHUB_REF_NAME" \
build/distributions/helma-*.* \
--clobber

50
.github/workflows/staging.yml vendored Normal file
View file

@ -0,0 +1,50 @@
name: Staging
on:
workflow_dispatch
env:
SSH_AUTH_SOCK: /tmp/ssh-agent.sock
jobs:
install:
runs-on: ubuntu-latest
environment:
name: staging
url: https://antville-test.click
steps:
- uses: actions/checkout@v4
- name: Set up Java
uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 21
- name: Set up Gradle
uses: gradle/actions/setup-gradle@v3
- name: Build with Gradle
run: ./gradlew installDist
- name: Set up SSH agent
run: |
ssh-agent -a $SSH_AUTH_SOCK > /dev/null
ssh-add - <<< "${{ secrets.SSH_PRIVATE_KEY }}"
mkdir -p ~/.ssh
echo '${{ vars.SSH_CONFIG }}' > ~/.ssh/config
echo '${{ vars.KNOWN_HOSTS }}' > ~/.ssh/known_hosts
- name: Publish to staging server
run: |
rsync build/install/helma/ antville.dev:/ \
--verbose --archive --delete --compress \
--filter '+ launcher.jar' \
--filter '+ lib' \
--filter '+ *.jar' \
--filter '- *' \
- name: Restart Helma
run: ssh antville.dev restart

1
.gitignore vendored
View file

@ -1,4 +1,5 @@
.gradle .gradle
.idea
.settings .settings
build build

1
.java-version Normal file
View file

@ -0,0 +1 @@
11.0

5
.vscode/extensions.json vendored Normal file
View file

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

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

@ -0,0 +1,84 @@
{
// Use IntelliSense to learn about possible attributes.
// Hover to view descriptions of existing attributes.
// For more information, visit: https://go.microsoft.com/fwlink/?linkid=830387
"version": "0.2.0",
"configurations": [
{
"type": "java",
"name": "Current File",
"request": "launch",
"mainClass": "${file}"
},
{
"type": "java",
"name": "ImageInfo",
"request": "launch",
"mainClass": "helma.image.ImageInfo",
"projectName": "helma_"
},
{
"type": "java",
"name": "CommandlineRunner",
"request": "launch",
"mainClass": "helma.main.CommandlineRunner",
"projectName": "helma_"
},
{
"type": "java",
"name": "Server",
"request": "launch",
"mainClass": "helma.main.Server",
"projectName": "helma_"
},
{
"type": "java",
"name": "XmlConverter",
"request": "launch",
"mainClass": "helma.objectmodel.dom.XmlConverter",
"projectName": "helma_"
},
{
"type": "java",
"name": "Crypt",
"request": "launch",
"mainClass": "helma.util.Crypt",
"projectName": "helma_"
},
{
"type": "java",
"name": "HtmlEncoder",
"request": "launch",
"mainClass": "helma.util.HtmlEncoder",
"projectName": "helma_"
},
{
"type": "java",
"name": "Logo",
"request": "launch",
"mainClass": "helma.util.Logo",
"projectName": "helma_"
},
{
"type": "java",
"name": "MarkdownProcessor",
"request": "launch",
"mainClass": "helma.util.MarkdownProcessor",
"projectName": "helma_"
},
{
"type": "java",
"name": "Commandline",
"request": "launch",
"mainClass": "helma.main.launcher.Commandline",
"projectName": "launcher"
},
{
"type": "java",
"name": "Main",
"request": "launch",
"mainClass": "helma.main.launcher.Main",
"projectName": "launcher"
}
]
}

6
.vscode/settings.json vendored Normal file
View file

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

View file

@ -2,7 +2,7 @@
## TL;DR ## TL;DR
- Make sure you have Java 1.6 or higher installed - Make sure you have Java 17 or higher installed
- Download and unpack the [latest release](https://github.com/antville/helma/releases) - Download and unpack the [latest release](https://github.com/antville/helma/releases)
- Invoke `./bin/helma`, resp. `./bin/helma.bat`, depending on your platform - Invoke `./bin/helma`, resp. `./bin/helma.bat`, depending on your platform
- Direct your web browser to <http://localhost:8080> - Direct your web browser to <http://localhost:8080>
@ -21,9 +21,9 @@ Although Helma became a Grande Dame of server-side JavaScript already decades ag
## System Requirements ## System Requirements
You need a Java virtual machine 1.6 or higher to run Helma. You need a Java virtual machine version 17 or higher to run Helma.
Please consult the documentation of your platform how to obtain and install Java. Please consult the documentation of your platform on how to obtain and install Java.
You also can directly download a [Java runtime or development kit](https://www.oracle.com/java/technologies/javase-downloads.html#javasejdk) from Oracle. You also can directly download a [Java runtime or development kit](https://www.oracle.com/java/technologies/javase-downloads.html#javasejdk) from Oracle.
@ -31,7 +31,12 @@ Helma is built with [Gradle](https://gradle.org), the build task depends on the
## Development ## Development
Clone this repository to your machine and start the build process with `./gradlew install`. The build script is going to ask you if you want to update the installation, enter `y`. ### Additional Prerequisites
* [Rsync](https://rsync.samba.org) version ≥ 3.1.0
* [Node.js](https://nodejs.org) LTS version
Clone this repository to your machine and start the build process with `./gradlew install`. The build script is going to ask you if you want to update the installation, enter `yes` or `no`.
> ⚠️ > ⚠️
> Please be aware that this step is going to overwrite files in the installation directory escpecially at a later time when there might be substantial changes. Should this happen by accident you find the previous installation in the `backups` directory. > 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.
@ -40,7 +45,7 @@ Clone this repository to your machine and start the build process with `./gradle
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. 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 through the web interface using the management application that is part of Helma. 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. If all goes well you should be able to connect your browser to <http://localhost:8080> port 8080 on the local machine, that is.
@ -55,7 +60,7 @@ Finally, Helma can be plugged into Servlet containers using Servlet classes that
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: 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 archeological web digging and thanks to the great search engines and archive services out there it is still possible to find useful resources. > 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) - [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/) - [Documentation](http://web.archive.org/web/20100530234322/http://helma.org/documentation/)

View file

@ -1,6 +1,6 @@
plugins { plugins {
id 'application' id 'application'
id 'com.github.jk1.dependency-license-report' version '1.13' id 'com.github.jk1.dependency-license-report' version '2.7'
} }
import org.apache.tools.ant.filters.FixCrLfFilter import org.apache.tools.ant.filters.FixCrLfFilter
@ -18,8 +18,12 @@ allprojects {
apply plugin: 'java' apply plugin: 'java'
compileJava { compileJava {
sourceCompatibility = JavaVersion.VERSION_1_6 sourceCompatibility = JavaVersion.VERSION_17
targetCompatibility = JavaVersion.VERSION_1_6 targetCompatibility = JavaVersion.VERSION_17
}
repositories {
mavenCentral()
} }
} }
@ -28,6 +32,16 @@ version = new Date().format("yyyyMMdd")
tasks.build.dependsOn javadoc, 'jsdoc', 'generateLicenseReport' tasks.build.dependsOn javadoc, 'jsdoc', 'generateLicenseReport'
tasks.compileJava.dependsOn 'processSource' 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')
}
}
}
sourceSets { sourceSets {
main { main {
java { java {
@ -37,11 +51,6 @@ sourceSets {
} }
} }
repositories {
mavenCentral()
jcenter()
}
configurations { configurations {
// Wrapping implementation because it does not allow access to its files // Wrapping implementation because it does not allow access to its files
// (i.e. cannot be resolved) // (i.e. cannot be resolved)
@ -49,19 +58,19 @@ configurations {
} }
dependencies { dependencies {
implementation 'com.google.code.gson:gson:2.8.6' implementation 'com.google.code.gson:gson:2.11.0'
implementation 'com.sun.activation:javax.activation:1.2.0' implementation 'commons-codec:commons-codec:1.17.0'
implementation 'commons-codec:commons-codec:1.14' implementation 'commons-fileupload:commons-fileupload:1.5'
implementation 'commons-fileupload:commons-fileupload:1.4' implementation 'commons-logging:commons-logging:1.3.2'
implementation 'commons-logging:commons-logging:1.2' implementation 'commons-net:commons-net:3.10.0'
implementation 'commons-net:commons-net:3.6'
implementation 'com.sun.mail:javax.mail:1.6.2' implementation 'com.sun.mail:javax.mail:1.6.2'
implementation 'javax.servlet:javax.servlet-api:4.0.1' implementation 'javax.servlet:javax.servlet-api:4.0.1'
implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1' implementation 'org.ccil.cowan.tagsoup:tagsoup:1.2.1'
implementation 'org.eclipse.jetty:jetty-servlet:9.4.27.v20200227' implementation 'org.eclipse.jetty:jetty-servlet:9.4.54.v20240208'
implementation 'org.eclipse.jetty:jetty-xml:9.4.27.v20200227' implementation 'org.eclipse.jetty:jetty-xml:9.4.54.v20240208'
implementation 'org.mozilla:rhino:1.7.12' implementation 'org.mozilla:rhino:1.7.13'
implementation 'xerces:xercesImpl:2.12.0' implementation 'org.sejda.imageio:webp-imageio:0.1.6'
implementation 'xerces:xercesImpl:2.12.2'
implementation 'xmlrpc:xmlrpc:2.0.1' implementation 'xmlrpc:xmlrpc:2.0.1'
} }
@ -69,11 +78,10 @@ def rhinoJar = configurations.library.files.find { jar ->
jar.name.startsWith('rhino') jar.name.startsWith('rhino')
} }
startScripts { startScripts {
applicationName = 'helma' applicationName = 'helma'
classpath = files('../launcher.jar') classpath = files('../launcher.jar')
mainClassName = 'helma.main.launcher.Main' mainClass = 'helma.main.launcher.Main'
defaultJvmOpts = [jettyLogLevel, suppressMacosDockIcon] defaultJvmOpts = [jettyLogLevel, suppressMacosDockIcon]
@ -95,29 +103,33 @@ distributions {
} }
} }
applicationDistribution.from(projectDir) { application {
applicationDistribution.from(projectDir) {
include 'modules/**' include 'modules/**'
include 'LICENSE.md' include 'LICENSE.md'
include 'README.md' include 'README.md'
include 'start.*' include 'start.*'
} }
applicationDistribution.from(javadoc.destinationDir) { applicationDistribution.from(javadoc.destinationDir) {
include '**' include '**'
into 'docs/javadoc' into 'docs/javadoc'
} }
applicationDistribution.from("${project.buildDir}/docs/jsdoc") { applicationDistribution.from("${project.buildDir}/docs/jsdoc") {
include '**' include '**'
into 'docs/jsdoc' into 'docs/jsdoc'
} }
applicationDistribution.from("${project.buildDir}/reports/dependency-license") { applicationDistribution.from("${project.buildDir}/reports/dependency-license") {
include '**' include '**'
into 'licenses' into 'licenses'
}
} }
distTar { distTar {
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
compression = Compression.GZIP compression = Compression.GZIP
filesMatching(textFiles) { filesMatching(textFiles) {
@ -126,6 +138,8 @@ distTar {
} }
distZip { distZip {
dependsOn ':generateLicenseReport', ':javadoc', ':jsdoc'
filesMatching(textFiles) { filesMatching(textFiles) {
filter(FixCrLfFilter.class, eol: FixCrLfFilter.CrLf.newInstance("crlf")) filter(FixCrLfFilter.class, eol: FixCrLfFilter.CrLf.newInstance("crlf"))
} }
@ -133,7 +147,10 @@ distZip {
installDist { installDist {
dependsOn build dependsOn build
if (!System.getenv('CI')) {
finalizedBy 'update' finalizedBy 'update'
}
} }
run { run {
@ -166,11 +183,11 @@ task processSource(type: Sync) {
} }
task update { task update {
def rsyncArgs = ['-a', '--info=progress2', '--exclude', 'backups'] def rsyncArgs = ['--archive', '--filter', '- backups']
def confirm = { def confirm = {
ant.input(message: 'Update this installation?', validargs: 'y,n', addproperty: 'continue') ant.input(message: 'Update this installation?', validargs: 'yes,no', addproperty: 'continue')
return ant.continue == 'y' return ant.continue == 'yes'
} }
onlyIf { confirm() } onlyIf { confirm() }
@ -181,20 +198,29 @@ task update {
mkdir backupDir mkdir backupDir
exec { exec {
// Using rsync instead of a CopyTask because the latter chokes on multi-byte characters // 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 // See https://github.com/gradle/gradle/issues/789
executable 'rsync' executable 'rsync'
args rsyncArgs args rsyncArgs
args "$projectDir/", backupDir args "$projectDir/", backupDir
} }
print "Created backup of ${projectDir} in ${backupDir}"
} }
doLast { doLast {
exec { exec {
// Using rsync instead of installDist task because it does not overwrite the project directory // Using rsync to selectively update the repo directory
executable 'rsync' executable 'rsync'
args '--delete'
args rsyncArgs args rsyncArgs
args '--exclude', 'bin' 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 args "${installDist.destinationDir}/", projectDir
} }
} }
@ -212,11 +238,6 @@ task jsdoc(type: Exec) {
executable 'npx' executable 'npx'
args = ['jsdoc', '-d', "$destination"].plus(sources) args = ['jsdoc', '-d', "$destination"].plus(sources)
// As of writing jsdoc throws the following error:
// Unable to parse /home/tobi/Projects/helma/current/modules/jala/code/Database.js: Unexpected token, expected "(" (844:10)
// Seems to be related to the `for each` syntax but did not find any further references.
ignoreExitValue true
} }
task xgettext(type: JavaExec) { task xgettext(type: JavaExec) {
@ -224,7 +245,7 @@ task xgettext(type: JavaExec) {
group 'i18n' group 'i18n'
classpath = files('launcher.jar') classpath = files('launcher.jar')
main = 'helma.main.launcher.Commandline' mainClass = 'helma.main.launcher.Commandline'
// TODO: Decouple from Antville app // TODO: Decouple from Antville app
args = [ args = [
@ -241,7 +262,7 @@ task po2js(type: JavaExec) {
group 'i18n' group 'i18n'
classpath = files(rhinoJar) classpath = files(rhinoJar)
main = 'org.mozilla.javascript.tools.shell.Main' mainClass = 'org.mozilla.javascript.tools.shell.Main'
// TODO: Decouple from Antville app // TODO: Decouple from Antville app
args = [ args = [
@ -256,7 +277,7 @@ task rhinoShell(type: JavaExec) {
group 'Application' group 'Application'
classpath = files(rhinoJar) classpath = files(rhinoJar)
main = 'org.mozilla.javascript.tools.shell.Main' mainClass = 'org.mozilla.javascript.tools.shell.Main'
standardInput = System.in standardInput = System.in
} }
@ -268,6 +289,6 @@ task commandLine(type: JavaExec) {
group 'Application' group 'Application'
classpath = files('launcher.jar') classpath = files('launcher.jar')
main = 'helma.main.launcher.Commandline' mainClass = 'helma.main.launcher.Commandline'
args '-h', projectDir, function args '-h', projectDir, function
} }

Binary file not shown.

View file

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

309
gradlew vendored
View file

@ -1,78 +1,127 @@
#!/usr/bin/env sh #!/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.
#
############################################################################## ##############################################################################
## #
## Gradle start up script for UN*X # 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/subprojects/plugins/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 # Attempt to set APP_HOME
# Resolve links: $0 may be a link # Resolve links: $0 may be a link
PRG="$0" app_path=$0
# Need this for relative symlinks.
while [ -h "$PRG" ] ; do # Need this for daisy-chained symlinks.
ls=`ls -ld "$PRG"` while
link=`expr "$ls" : '.*-> \(.*\)$'` APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
if expr "$link" : '/.*' > /dev/null; then [ -h "$app_path" ]
PRG="$link" do
else ls=$( ls -ld "$app_path" )
PRG=`dirname "$PRG"`"/$link" link=${ls#*' -> '}
fi case $link in #(
/*) app_path=$link ;; #(
*) app_path=$APP_HOME$link ;;
esac
done done
SAVED="`pwd`"
cd "`dirname \"$PRG\"`/" >/dev/null
APP_HOME="`pwd -P`"
cd "$SAVED" >/dev/null
APP_NAME="Gradle" # This is normally unused
APP_BASE_NAME=`basename "$0"` # shellcheck disable=SC2034
APP_BASE_NAME=${0##*/}
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script. # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
DEFAULT_JVM_OPTS="" APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
# Use the maximum available, or set MAX_FD != -1 to use that value. # Use the maximum available, or set MAX_FD != -1 to use that value.
MAX_FD="maximum" MAX_FD=maximum
warn () { warn () {
echo "$*" echo "$*"
} } >&2
die () { die () {
echo echo
echo "$*" echo "$*"
echo echo
exit 1 exit 1
} } >&2
# OS specific support (must be 'true' or 'false'). # OS specific support (must be 'true' or 'false').
cygwin=false cygwin=false
msys=false msys=false
darwin=false darwin=false
nonstop=false nonstop=false
case "`uname`" in case "$( uname )" in #(
CYGWIN* ) CYGWIN* ) cygwin=true ;; #(
cygwin=true Darwin* ) darwin=true ;; #(
;; MSYS* | MINGW* ) msys=true ;; #(
Darwin* ) NONSTOP* ) nonstop=true ;;
darwin=true
;;
MINGW* )
msys=true
;;
NONSTOP* )
nonstop=true
;;
esac esac
CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
# Determine the Java command to use to start the JVM. # Determine the Java command to use to start the JVM.
if [ -n "$JAVA_HOME" ] ; then if [ -n "$JAVA_HOME" ] ; then
if [ -x "$JAVA_HOME/jre/sh/java" ] ; then if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
# IBM's JDK on AIX uses strange locations for the executables # IBM's JDK on AIX uses strange locations for the executables
JAVACMD="$JAVA_HOME/jre/sh/java" JAVACMD=$JAVA_HOME/jre/sh/java
else else
JAVACMD="$JAVA_HOME/bin/java" JAVACMD=$JAVA_HOME/bin/java
fi fi
if [ ! -x "$JAVACMD" ] ; then if [ ! -x "$JAVACMD" ] ; then
die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
@ -81,92 +130,120 @@ Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi fi
else else
JAVACMD="java" JAVACMD=java
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 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 Please set the JAVA_HOME variable in your environment to match the
location of your Java installation." location of your Java installation."
fi
fi fi
# Increase the maximum file descriptors if we can. # Increase the maximum file descriptors if we can.
if [ "$cygwin" = "false" -a "$darwin" = "false" -a "$nonstop" = "false" ] ; then if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
MAX_FD_LIMIT=`ulimit -H -n` case $MAX_FD in #(
if [ $? -eq 0 ] ; then max*)
if [ "$MAX_FD" = "maximum" -o "$MAX_FD" = "max" ] ; then # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
MAX_FD="$MAX_FD_LIMIT" # shellcheck disable=SC2039,SC3045
fi MAX_FD=$( ulimit -H -n ) ||
ulimit -n $MAX_FD warn "Could not query maximum file descriptor limit"
if [ $? -ne 0 ] ; then esac
warn "Could not set maximum file descriptor limit: $MAX_FD" case $MAX_FD in #(
fi '' | soft) :;; #(
else *)
warn "Could not query maximum file descriptor limit: $MAX_FD_LIMIT" # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
fi # shellcheck disable=SC2039,SC3045
fi ulimit -n "$MAX_FD" ||
warn "Could not set maximum file descriptor limit to $MAX_FD"
# For Darwin, add options to specify how the application appears in the dock
if $darwin; then
GRADLE_OPTS="$GRADLE_OPTS \"-Xdock:name=$APP_NAME\" \"-Xdock:icon=$APP_HOME/media/gradle.icns\""
fi
# For Cygwin, switch paths to Windows format before running java
if $cygwin ; then
APP_HOME=`cygpath --path --mixed "$APP_HOME"`
CLASSPATH=`cygpath --path --mixed "$CLASSPATH"`
JAVACMD=`cygpath --unix "$JAVACMD"`
# We build the pattern for arguments to be converted via cygpath
ROOTDIRSRAW=`find -L / -maxdepth 1 -mindepth 1 -type d 2>/dev/null`
SEP=""
for dir in $ROOTDIRSRAW ; do
ROOTDIRS="$ROOTDIRS$SEP$dir"
SEP="|"
done
OURCYGPATTERN="(^($ROOTDIRS))"
# Add a user-defined pattern to the cygpath arguments
if [ "$GRADLE_CYGPATTERN" != "" ] ; then
OURCYGPATTERN="$OURCYGPATTERN|($GRADLE_CYGPATTERN)"
fi
# Now convert the arguments - kludge to limit ourselves to /bin/sh
i=0
for arg in "$@" ; do
CHECK=`echo "$arg"|egrep -c "$OURCYGPATTERN" -`
CHECK2=`echo "$arg"|egrep -c "^-"` ### Determine if an option
if [ $CHECK -ne 0 ] && [ $CHECK2 -eq 0 ] ; then ### Added a condition
eval `echo args$i`=`cygpath --path --ignore --mixed "$arg"`
else
eval `echo args$i`="\"$arg\""
fi
i=$((i+1))
done
case $i in
(0) set -- ;;
(1) set -- "$args0" ;;
(2) set -- "$args0" "$args1" ;;
(3) set -- "$args0" "$args1" "$args2" ;;
(4) set -- "$args0" "$args1" "$args2" "$args3" ;;
(5) set -- "$args0" "$args1" "$args2" "$args3" "$args4" ;;
(6) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" ;;
(7) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" ;;
(8) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" ;;
(9) set -- "$args0" "$args1" "$args2" "$args3" "$args4" "$args5" "$args6" "$args7" "$args8" ;;
esac esac
fi fi
# Escape application args # Collect all arguments for the java command, stacking in reverse order:
save () { # * args from the command line
for i do printf %s\\n "$i" | sed "s/'/'\\\\''/g;1s/^/'/;\$s/\$/' \\\\/" ; done # * the main class name
echo " " # * -classpath
} # * -D...appname settings
APP_ARGS=$(save "$@") # * --module-path (only if needed)
# * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
# Collect all arguments for the java command, following the shell quoting and substitution rules # For Cygwin or MSYS, switch paths to Windows format before running java
eval set -- $DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS "\"-Dorg.gradle.appname=$APP_BASE_NAME\"" -classpath "\"$CLASSPATH\"" org.gradle.wrapper.GradleWrapperMain "$APP_ARGS" if "$cygwin" || "$msys" ; then
APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
# by default we should be in the correct project dir, but when run from Finder on Mac, the cwd is wrong JAVACMD=$( cygpath --unix "$JAVACMD" )
if [ "$(uname)" = "Darwin" ] && [ "$HOME" = "$PWD" ]; then
cd "$(dirname "$0")" # 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 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" "$@" exec "$JAVACMD" "$@"

76
gradlew.bat vendored
View file

@ -1,4 +1,20 @@
@if "%DEBUG%" == "" @echo off @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
@if "%DEBUG%"=="" @echo off
@rem ########################################################################## @rem ##########################################################################
@rem @rem
@rem Gradle startup script for Windows @rem Gradle startup script for Windows
@ -9,25 +25,29 @@
if "%OS%"=="Windows_NT" setlocal if "%OS%"=="Windows_NT" setlocal
set DIRNAME=%~dp0 set DIRNAME=%~dp0
if "%DIRNAME%" == "" set DIRNAME=. if "%DIRNAME%"=="" set DIRNAME=.
@rem This is normally unused
set APP_BASE_NAME=%~n0 set APP_BASE_NAME=%~n0
set APP_HOME=%DIRNAME% 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. @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= set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
@rem Find java.exe @rem Find java.exe
if defined JAVA_HOME goto findJavaFromJavaHome if defined JAVA_HOME goto findJavaFromJavaHome
set JAVA_EXE=java.exe set JAVA_EXE=java.exe
%JAVA_EXE% -version >NUL 2>&1 %JAVA_EXE% -version >NUL 2>&1
if "%ERRORLEVEL%" == "0" goto init if %ERRORLEVEL% equ 0 goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
@ -35,48 +55,36 @@ goto fail
set JAVA_HOME=%JAVA_HOME:"=% set JAVA_HOME=%JAVA_HOME:"=%
set JAVA_EXE=%JAVA_HOME%/bin/java.exe set JAVA_EXE=%JAVA_HOME%/bin/java.exe
if exist "%JAVA_EXE%" goto init if exist "%JAVA_EXE%" goto execute
echo. echo. 1>&2
echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
echo. echo. 1>&2
echo Please set the JAVA_HOME variable in your environment to match the echo Please set the JAVA_HOME variable in your environment to match the 1>&2
echo location of your Java installation. echo location of your Java installation. 1>&2
goto fail goto fail
:init
@rem Get command-line arguments, handling Windows variants
if not "%OS%" == "Windows_NT" goto win9xME_args
:win9xME_args
@rem Slurp the command line arguments.
set CMD_LINE_ARGS=
set _SKIP=2
:win9xME_args_slurp
if "x%~1" == "x" goto execute
set CMD_LINE_ARGS=%*
:execute :execute
@rem Setup the command line @rem Setup the command line
set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
@rem Execute Gradle @rem Execute Gradle
"%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %CMD_LINE_ARGS% "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
:end :end
@rem End local scope for the variables with windows NT shell @rem End local scope for the variables with windows NT shell
if "%ERRORLEVEL%"=="0" goto mainEnd if %ERRORLEVEL% equ 0 goto mainEnd
:fail :fail
rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
rem the _cmd.exe /c_ return code! rem the _cmd.exe /c_ return code!
if not "" == "%GRADLE_EXIT_CONSOLE%" exit 1 set EXIT_CODE=%ERRORLEVEL%
exit /b 1 if %EXIT_CODE% equ 0 set EXIT_CODE=1
if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
exit /b %EXIT_CODE%
:mainEnd :mainEnd
if "%OS%"=="Windows_NT" endlocal if "%OS%"=="Windows_NT" endlocal

View file

@ -23,7 +23,7 @@
*/ */
// take care of any dependencies // take care of any dependencies
app.addRepository('modules/helma/jxl.jar'); app.addRepository('modules/helma/jxl-2.5.7.jar');
/** /**
* Define the global namespace if not existing * Define the global namespace if not existing

View file

@ -62,17 +62,18 @@ helma.Http = function() {
var responseHandler = function(connection, result) { var responseHandler = function(connection, result) {
var input; var input;
var stream;
try { try {
if (method !== 'DELETE') { stream = connection.getInputStream();
var stream = connection.getInputStream(); } catch (error) {
stream = connection.getErrorStream();
}
if (stream) {
if (connection.getContentEncoding() === 'gzip') { if (connection.getContentEncoding() === 'gzip') {
stream = new java.util.zip.GZIPInputStream(stream); stream = new java.util.zip.GZIPInputStream(stream);
} }
input = new java.io.BufferedInputStream(stream); input = new java.io.BufferedInputStream(stream);
} }
} catch (error) {
input = new java.io.BufferedInputStream(connection.getErrorStream());
}
if (input) { if (input) {
var body = new java.io.ByteArrayOutputStream(); var body = new java.io.ByteArrayOutputStream();
var buf = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024); var buf = java.lang.reflect.Array.newInstance(java.lang.Byte.TYPE, 1024);
@ -90,8 +91,7 @@ helma.Http = function() {
} catch (error) { } catch (error) {
// safe to ignore // safe to ignore
} }
if (binaryMode && (result.code >= 200 && result.code < 300)) { if (binaryMode) {
// only honor binaryMode if the request succeeded
result.content = body.toByteArray(); result.content = body.toByteArray();
} else { } else {
result.content = result.charset ? result.content = result.charset ?

View file

@ -31,8 +31,8 @@
*/ */
// take care of any dependencies // take care of any dependencies
app.addRepository('modules/helma/lucene-core.jar'); app.addRepository('modules/helma/lucene-core-2.2.0.jar');
app.addRepository('modules/helma/lucene-analyzers.jar'); app.addRepository('modules/helma/lucene-analyzers-2.2.0.jar');
if (!global.helma) { if (!global.helma) {

View file

@ -24,7 +24,7 @@
// take care of any dependencies // take care of any dependencies
app.addRepository('modules/helma/File.js'); app.addRepository('modules/helma/File.js');
app.addRepository('modules/helma/ganymed-ssh2.jar'); app.addRepository('modules/helma/ganymed-ssh2-build208.jar');
// define the helma namespace, if not existing // define the helma namespace, if not existing
if (!global.helma) { if (!global.helma) {

View file

@ -0,0 +1,18 @@
dependencies {
runtimeOnly 'ch.ethz.ganymed:ganymed-ssh2:build209'
runtimeOnly 'net.sourceforge.jexcelapi:jxl:2.5.7'
runtimeOnly 'org.apache.lucene:lucene-analyzers:2.2.0'
runtimeOnly 'org.apache.lucene:lucene-core:2.2.0'
}
jar.enabled = false
compileJava.enabled = false
compileTestJava.enabled = false
processResources.enabled = false
processTestResources.enabled = false
test.enabled = false
task deps(type: Copy) {
from sourceSets.main.runtimeClasspath
into '.'
}

BIN
modules/helma/jxl-2.5.7.jar Normal file

Binary file not shown.

Binary file not shown.

21
modules/jala/build.gradle Normal file
View file

@ -0,0 +1,21 @@
dependencies {
runtimeOnly 'dom4j:dom4j:1.1.3'
runtimeOnly 'jaxen:jaxen:1.1-beta-8'
runtimeOnly 'net.sf.javamusictag:jid3lib:0.5.4'
// FIXME: Did not find these two or appropriate replacements for them
//runtime 'id3:de.ueberdosis.mp3info:1.6.0d9'
//runtime 'javadns:org.wonderly:?'
}
jar.enabled = false
compileJava.enabled = false
compileTestJava.enabled = false
processResources.enabled = false
processTestResources.enabled = false
test.enabled = false
task deps(type: Copy) {
from sourceSets.main.runtimeClasspath
into 'lib'
}

View file

@ -841,7 +841,7 @@ jala.db.RamDatabase.prototype.copyTables = function(database, tables) {
tables = jala.db.metadata.getTableNames(dbMetadata); tables = jala.db.metadata.getTableNames(dbMetadata);
} }
for each (var tableName in tables) { for (let tableName of tables) {
// drop the table if it exists // drop the table if it exists
if (this.tableExists(tableName)) { if (this.tableExists(tableName)) {
this.dropTable(tableName); this.dropTable(tableName);

Binary file not shown.

View file

@ -0,0 +1,16 @@
dependencies {
// FIXME: Seems to be not used, anymore?
runtimeOnly 'bsf:bsf:2.4.0'
}
jar.enabled = false
compileJava.enabled = false
compileTestJava.enabled = false
processResources.enabled = false
processTestResources.enabled = false
test.enabled = false
task deps(type: Copy) {
from sourceSets.main.runtimeClasspath
into 'lib'
}

Binary file not shown.

Binary file not shown.

View file

@ -330,7 +330,7 @@ MessageParser.prototype.parseSkinFile = function(file, encoding) {
var processMacros = function(macros) { var processMacros = function(macros) {
var re = gettext_macro.REGEX; var re = gettext_macro.REGEX;
var id, pluralId, name, args, param, key, msg; var id, pluralId, name, args, param, key, msg;
for each (var macro in macros) { for (let macro of macros) {
id = pluralId = null; id = pluralId = null;
name = macro.getName(); name = macro.getName();
param = macro.getNamedParams(); param = macro.getNamedParams();
@ -374,7 +374,7 @@ MessageParser.prototype.parseSkinFile = function(file, encoding) {
if (skin.hasMainskin()) { if (skin.hasMainskin()) {
processMacros(skin.getMacros()); processMacros(skin.getMacros());
} }
for each (var name in skin.getSubskinNames()) { for (let name of skin.getSubskinNames()) {
var subskin = skin.getSubskin(name); var subskin = skin.getSubskin(name);
processMacros(subskin.getMacros()); processMacros(subskin.getMacros());
} }

View file

@ -0,0 +1,16 @@
dependencies {
runtimeOnly 'org.subethamail:subethasmtp-smtp:1.2'
runtimeOnly 'org.subethamail:subethasmtp-wiser:1.2'
}
jar.enabled = false
compileJava.enabled = false
compileTestJava.enabled = false
processResources.enabled = false
processTestResources.enabled = false
test.enabled = false
task deps(type: Copy) {
from sourceSets.main.runtimeClasspath
into 'code'
}

View file

@ -1336,7 +1336,7 @@ jala.Test.DatabaseMgr.prototype.startDatabase = function(dbSourceName, copyTable
// collect the table names of all relational prototypes // collect the table names of all relational prototypes
tables = []; tables = [];
var protos = app.getPrototypes(); var protos = app.getPrototypes();
for each (var proto in protos) { for (let proto of protos) {
var dbMap = proto.getDbMapping(); var dbMap = proto.getDbMapping();
if (dbMap.isRelational()) { if (dbMap.isRelational()) {
tables.push(dbMap.getTableName()); tables.push(dbMap.getTableName());

Binary file not shown.

50
renovate.json Normal file
View file

@ -0,0 +1,50 @@
{
"$schema": "https://docs.renovatebot.com/renovate-schema.json",
"extends": [
"config:recommended",
"mergeConfidence:all-badges",
"npm:unpublishSafe",
":disableRateLimiting",
":pinVersions",
":semanticCommitsDisabled"
],
"osvVulnerabilityAlerts": true,
"vulnerabilityAlerts": {
"labels": ["security", "urgent"],
"automerge": true
},
"labels": ["dependency"],
"packageRules": [
{
"description": "Label Helma core packages",
"matchFiles": ["build.gradle"],
"addLabels": ["core"]
},
{
"description": "Label major version bumps",
"matchUpdateTypes": ["major"],
"addLabels": ["major"]
},
{
"description": "Label packages required at runtime",
"matchDepTypes": ["dependencies"],
"addLabels": ["runtime"]
},
{
"description": "Group Jetty packages",
"matchPackagePrefixes": ["org.eclipse.jetty"],
"groupName": "Jetty packages"
},
{
"description": "Group Lucene packages",
"matchPackagePrefixes": ["org.apache.lucene"],
"groupName": "Lucene packages"
}
]
}

View file

@ -7,3 +7,12 @@ org.apache.tools.ant.DirectoryScanner.removeDefaultExclude('**/.git/**')
org.apache.tools.ant.DirectoryScanner.removeDefaultExclude('**/.gitignore') org.apache.tools.ant.DirectoryScanner.removeDefaultExclude('**/.gitignore')
include 'launcher' include 'launcher'
include 'modules'
include 'jala'
include 'hopKit'
include 'test'
project(':modules').projectDir = file('modules/helma')
project(':jala').projectDir = file('modules/jala')
project(':hopKit').projectDir = file('modules/jala/util/HopKit')
project(':test').projectDir = file('modules/jala/util/Test')

View file

@ -149,7 +149,7 @@ function testOrder(org, pos) {
function cleanup() { function cleanup() {
var persons = root.persons.list(); var persons = root.persons.list();
for each (var person in persons) { for (let person of persons) {
person.remove(); person.remove();
} }
ikea.remove(); ikea.remove();

View file

@ -86,7 +86,7 @@ function testAdd() {
function cleanup() { function cleanup() {
var persons = org.generic.list(); var persons = org.generic.list();
for each (var person in persons) { for (let person of persons) {
person.remove(); person.remove();
} }
org.remove(); org.remove();

View file

@ -143,7 +143,7 @@ function testGroupTransient() {
function cleanup() { function cleanup() {
var orgs = root.organisations.list(); var orgs = root.organisations.list();
for each (var org in orgs) { for (let org of orgs) {
org.remove(); org.remove();
} }
} }

25
src/dist/extras/helma.service vendored Normal file
View file

@ -0,0 +1,25 @@
[Unit]
Description = Helma Object Publisher
After = syslog.target network.target
StartLimitIntervalSec = 0
[Service]
Type = simple
Restart = always
RestartSec = 1
SuccessExitStatus = 143
User = helma
WorkingDirectory = /home/helma
ExecStart = /usr/bin/java -server \
-Dfile.encoding=utf8 \
-Djava.awt.headless=true \
-Xms1024m -Xmx2048m \
-jar launcher.jar \
-w 8080 -x 8081
ExecReload = touch apps.properties && touch server.properties
ExecStop = /bin/kill -15 $MAINPID
[Install]
WantedBy = multi-user.target

View file

@ -6,6 +6,15 @@
# andreas bolka, 2003-11-30 # andreas bolka, 2003-11-30
# #
### BEGIN INIT INFO
# Provides: helma
# Required-Start: postgresql apache2
# Required-Stop:
# Default-Start: 2 3 4 5
# Default-STop: 0 1 6
# Short-Description: Helma Application Server
### END INIT INFO
HELMA_CONFIG=/etc/helma.conf HELMA_CONFIG=/etc/helma.conf
### ###
@ -19,25 +28,27 @@ else
fi fi
# Check for missing files and directories # Check for missing files and directories
if [ ! -x $JAVA_BIN ]; then if [ ! -x $JAVA_BIN ]; then
echo "Config error: JAVA_BIN $JAVA_BIN not found or not executable" echo "Config error: JAVA_BIN $JAVA_BIN not found or not executable"
exit 5 exit 5
fi fi
if [ ! -r $HELMA_INSTALL/launcher.jar ]; then if [ ! -r $HELMA_INSTALL/launcher.jar ]; then
echo "Config error: $HELMA_INSTALL/launcher.jar not found or not readable" echo "Config error: $HELMA_INSTALL/launcher.jar not found or not readable"
exit 5 exit 5
fi fi
if [ ! -d $HELMA_HOME ]; then if [ ! -d $HELMA_HOME ]; then
echo "Config error: HELMA_HOME $HELMA_HOME not found" echo "Config error: HELMA_HOME $HELMA_HOME not found"
exit 5 exit 5
fi fi
# local settins RUN_CMD="su - $HELMA_USER"
RUN_CMD="sudo -u $HELMA_USER $JAVA_BIN" RUN_ARGS="-c $JAVA_BIN $JAVA_OPTS -jar $HELMA_INSTALL/launcher.jar -h $HELMA_HOME $HELMA_ARGS"
RUN_ARGS="$JAVA_OPTS -jar $HELMA_INSTALL/launcher.jar -h $HELMA_HOME $HELMA_ARGS"
case "$1" in case "$1" in
start) start)
echo -n "Starting $HELMA_SERVICE: " echo -n "Starting $HELMA_SERVICE: "
if [ -f $HELMA_PID ]; then if [ -f $HELMA_PID ]; then
@ -46,12 +57,12 @@ start)
fi fi
cd $HELMA_HOME cd $HELMA_HOME
nohup $RUN_CMD $RUN_ARGS > $HELMA_LOG 2>&1 & nohup $RUN_CMD "$RUN_ARGS" > $HELMA_LOG 2>&1 &
echo $! > $HELMA_PID echo $! > $HELMA_PID
echo "$HELMA_SERVICE (pid `cat $HELMA_PID`) started." echo "$HELMA_SERVICE (pid `cat $HELMA_PID`) started."
;; ;;
stop) stop)
echo -n "Shutting down $HELMA_SERVICE: " echo -n "Shutting down $HELMA_SERVICE: "
if [ ! -f $HELMA_PID ]; then if [ ! -f $HELMA_PID ]; then
echo "$HELMA_SERVICE not running" echo "$HELMA_SERVICE not running"
@ -65,20 +76,21 @@ stop)
echo "stopped." echo "stopped."
;; ;;
restart) restart)
$0 stop && $0 start $0 stop && $0 start
;; ;;
reload) reload)
echo -n "Reloading $HELMA_SERVICE: $HELMA_SERVICE" echo -n "Reloading $HELMA_SERVICE: $HELMA_SERVICE"
touch $HELMA_HOME/server.properties touch $HELMA_HOME/server.properties
touch $HELMA_HOME/apps.properties touch $HELMA_HOME/apps.properties
echo "." echo "."
;; ;;
*) *)
echo "Usage: /etc/init.d/helma start|stop|restart|reload" echo "Usage: /etc/init.d/helma start|stop|restart|reload"
exit 1 exit 1
;; ;;
esac esac
exit 0 exit 0

View file

@ -1,72 +1,44 @@
############################################################## #
### # Helma Object Publisher configuration file
### Helma object publisher config file #
### Author: Hannes Wallnoefer, <hannes@helma.at> # Authors:
### Author: Andreas Bolka # Hannes Wallnoefer <hannes@helma.at>,
### # Andreas Bolka
### This file should be placed in /etc/helma.conf. #
### It is read by the Helma service control script, # This file should be placed in /etc/helma.conf.
### usually /etc/init.d/helma. # It is read by the Helma service control script,
### # usually /etc/init.d/helma.
############################################################## #
############################################################## # Full path to Java executable
### The name of this Helma server/service and the JAVA_HOME=/usr/lib/jvm/default-java
### pid file to be used JAVA_BIN=$JAVA_HOME/bin/java
#############################################################
# Options passed to the Java runtime
JAVA_OPTS="-server -Djava.awt.headless=true -Dfile.encoding=utf-8 -Djsse.enableSNIExtension=false"
# The name of this Helma server/service and the pid file to be used
HELMA_SERVICE=helma HELMA_SERVICE=helma
HELMA_PID=/var/run/helma.pid HELMA_PID=/var/run/helma.pid
# Helma install directory. This is where we look for the Helma jar files
# (launcher.jar, lib/* and lib/ext/*)
HELMA_INSTALL=/home/helma
############################################################## # Helma home directory, in case it is different from the Helma install dir.
### Full path to Java executable # This is where Helma will look for properties files and applications.
##############################################################
JAVA_HOME=/usr/lib/j2sdk1.5-sun
JAVA_BIN=$JAVA_HOME/bin/java
##############################################################
### Options passed to the Java runtime
##############################################################
JAVA_OPTS="-Djava.awt.headless=true"
##############################################################
### Helma install directory. This is where we look for
### the Helma jar files (launcher.jar, lib/* and lib/ext/*)
##############################################################
HELMA_INSTALL=/usr/local/helma/helma-1.6.x
##############################################################
### Helma home directory, in case it is different from the
### Helma install dir. This is where Helma will look for
### properties files and applications.
##############################################################
HELMA_HOME=$HELMA_INSTALL HELMA_HOME=$HELMA_INSTALL
# The user Helma should be running as
##############################################################
### The user Helma should be running as
##############################################################
HELMA_USER=helma HELMA_USER=helma
# File to which standard and error output from Helma is redirected
##############################################################
### File to which standard and error output from Helma
### is redirected
##############################################################
HELMA_LOG=$HELMA_HOME/log/helma-out.log HELMA_LOG=$HELMA_HOME/log/helma-out.log
# Helma options. Possible options are:
############################################################## # -f file - Location of server.properties file
### Helma options. Possible options are: # -p port - RMI port
### # -w port - Web server port
### -f file Specify server.properties file # -x port - XML-RPC port
### -p port Specify RMI port number # -jk port - AJP13 port
### -w port Specify port number for embedded Web server
### -x port Specify XML-RPC port number
### -jk port Specify AJP13 port number
###
##############################################################
HELMA_ARGS="-w 8080" HELMA_ARGS="-w 8080"

View file

@ -24,15 +24,13 @@ import javax.servlet.http.Cookie;
* of an HTTP cookie. * of an HTTP cookie.
*/ */
public final class CookieTrans implements Serializable { public final class CookieTrans implements Serializable {
private static final long serialVersionUID = 1811202114296536258L; private String name;
private String value;
String name; private String path;
String value; private String domain;
String path; private boolean isHttpOnly = true;
String domain; private boolean isSecure = false;
int days = -1; private int days = -1;
boolean secure;
boolean httpOnly;
CookieTrans(String name, String value) { CookieTrans(String name, String value) {
this.name = name; this.name = name;
@ -55,9 +53,15 @@ public final class CookieTrans implements Serializable {
this.domain = domain; this.domain = domain;
} }
void setHttpOnly(boolean isHttpOnly) {
this.isHttpOnly = isHttpOnly;
}
void setSecure(boolean isSecure) {
this.isSecure = isSecure;
}
/** /**
*
*
* @return ... * @return ...
*/ */
public String getName() { public String getName() {
@ -65,8 +69,6 @@ public final class CookieTrans implements Serializable {
} }
/** /**
*
*
* @return ... * @return ...
*/ */
public String getValue() { public String getValue() {
@ -74,8 +76,6 @@ public final class CookieTrans implements Serializable {
} }
/** /**
*
*
* @return ... * @return ...
*/ */
public int getDays() { public int getDays() {
@ -83,8 +83,6 @@ public final class CookieTrans implements Serializable {
} }
/** /**
*
*
* @return ... * @return ...
*/ */
public String getPath() { public String getPath() {
@ -92,28 +90,24 @@ public final class CookieTrans implements Serializable {
} }
/** /**
*
*
* @return ... * @return ...
*/ */
public String getDomain() { public String getDomain() {
return domain; return domain;
} }
public boolean isSecure() { /**
return secure; * @return ...
*/
public boolean getHttpOnly() {
return isHttpOnly;
} }
void isSecure(boolean secure) { /**
this.secure = secure; * @return ...
} */
public boolean getSecure() {
public boolean isHttpOnly() { return isSecure;
return httpOnly;
}
void isHttpOnly(boolean httpOnly) {
this.httpOnly = httpOnly;
} }
/** /**
@ -147,8 +141,8 @@ public final class CookieTrans implements Serializable {
c.setDomain(defaultDomain); c.setDomain(defaultDomain);
} }
c.setHttpOnly(httpOnly); c.setHttpOnly(isHttpOnly);
c.setSecure(secure); c.setSecure(isSecure);
return c; return c;
} }

View file

@ -143,7 +143,7 @@ public class ResponseBean implements Serializable {
* @param value the cookie value * @param value the cookie value
*/ */
public void setCookie(String key, String value) { public void setCookie(String key, String value) {
res.setCookie(key, value, -1, null, null); res.setCookie(key, value, -1, null, null, true, false);
} }
/** /**
@ -156,7 +156,7 @@ public class ResponseBean implements Serializable {
* @param days number of days the cookie should be stored * @param days number of days the cookie should be stored
*/ */
public void setCookie(String key, String value, int days) { public void setCookie(String key, String value, int days) {
res.setCookie(key, value, days, null, null); res.setCookie(key, value, days, null, null, true, false);
} }
/** /**
@ -171,7 +171,42 @@ public class ResponseBean implements Serializable {
* @param path the URL path to apply the cookie to * @param path the URL path to apply the cookie to
*/ */
public void setCookie(String key, String value, int days, String path) { public void setCookie(String key, String value, int days, String path) {
res.setCookie(key, value, days, path, null); res.setCookie(key, value, days, path, null, true, false);
}
/**
* Set a HTTP cookie with the name and value that is only applied to
* the URLs matching the given path and is stored by the
* HTTP client for the given number of days. A days value of 0 means the
* cookie should be immediately discarded.
*
* @param key the cookie name
* @param value the cookie value
* @param days number of days the cookie should be stored
* @param path the URL path to apply the cookie to
* @param domain domain
* @param isHttpOnly marks the cookie as HttpOnly
*/
public void setCookie(String key, String value, int days, String path, String domain, boolean isHttpOnly) {
res.setCookie(key, value, days, path, domain, isHttpOnly, false);
}
/**
* Set a HTTP cookie with the name and value that is only applied to
* the URLs matching the given path and is stored by the
* HTTP client for the given number of days. A days value of 0 means the
* cookie should be immediately discarded.
*
* @param key the cookie name
* @param value the cookie value
* @param days number of days the cookie should be stored
* @param path the URL path to apply the cookie to
* @param domain domain
* @param isHttpOnly marks the cookie as HttpOnly
* @param isSecure limits the cookie to secure protocols
*/
public void setCookie(String key, String value, int days, String path, String domain, boolean isHttpOnly, boolean isSecure) {
res.setCookie(key, value, days, path, domain, isHttpOnly, isSecure);
} }
/** /**
@ -187,7 +222,7 @@ public class ResponseBean implements Serializable {
* @param domain domain * @param domain domain
*/ */
public void setCookie(String key, String value, int days, String path, String domain) { public void setCookie(String key, String value, int days, String path, String domain) {
res.setCookie(key, value, days, path, domain); res.setCookie(key, value, days, path, domain, true, false);
} }
/** /**
@ -197,7 +232,7 @@ public class ResponseBean implements Serializable {
* @param key the name of the cookie to be discarded * @param key the name of the cookie to be discarded
*/ */
public void unsetCookie(String key) { public void unsetCookie(String key) {
res.setCookie(key, "", 0, null, null); res.setCookie(key, "", 0, null, null, true, false);
} }
/** /**
@ -245,9 +280,9 @@ public class ResponseBean implements Serializable {
} }
/** /**
* add an HTML formatted debug message to the end of the page. * add HTML formatted debug messages to the end of the page.
* *
* @param message the message * @param messages the list of messages
*/ */
public void debug(String... messages) { public void debug(String... messages) {
if (messages == null) { if (messages == null) {

View file

@ -384,7 +384,7 @@ public final class ResponseTrans extends Writer implements Serializable {
} }
/** /**
* Replace special characters with entities, including <, > and ", thus allowing * Replace special characters with entities, including {@code <}, {@code >} and {@code "}, thus allowing
* no HTML tags. * no HTML tags.
*/ */
public synchronized void encode(Object what) { public synchronized void encode(Object what) {
@ -415,7 +415,7 @@ public final class ResponseTrans extends Writer implements Serializable {
} }
/** /**
* Replace special characters with entities, including <, > and ", thus allowing * Replace special characters with entities, including {@code <}, {@code >} and {@code "}, thus allowing
* no HTML tags. * no HTML tags.
*/ */
public synchronized void encodeXml(Object what) { public synchronized void encodeXml(Object what) {
@ -974,8 +974,10 @@ public final class ResponseTrans extends Writer implements Serializable {
* @param days the cookie's lifespan in days * @param days the cookie's lifespan in days
* @param path the URL path to apply the cookie to * @param path the URL path to apply the cookie to
* @param domain the domain to apply the cookie to * @param domain the domain to apply the cookie to
* @param isHttpOnly marks the cookie as HttpOnly
* @param isSecure limits the cookie for use with secure protocols
*/ */
public void setCookie(String key, String value, int days, String path, String domain) { public void setCookie(String key, String value, int days, String path, String domain, boolean isHttpOnly, boolean isSecure) {
CookieTrans c = null; CookieTrans c = null;
if (cookies == null) { if (cookies == null) {
@ -1001,11 +1003,11 @@ public final class ResponseTrans extends Writer implements Serializable {
c.setDomain(domain); c.setDomain(domain);
if (!"false".equalsIgnoreCase(app.getProperty("cookies.httpOnly"))) { if (!"false".equalsIgnoreCase(app.getProperty("cookies.httpOnly"))) {
c.isHttpOnly(true); c.setHttpOnly(true);
} }
if ("true".equalsIgnoreCase(app.getProperty("cookies.secure"))) { if ("true".equalsIgnoreCase(app.getProperty("cookies.secure"))) {
c.isSecure(true); c.setSecure(true);
} }
} }

View file

@ -192,7 +192,7 @@ public final class TypeManager {
long lastScan = lastRepoScan.containsKey(repository) ? long lastScan = lastRepoScan.containsKey(repository) ?
((Long) lastRepoScan.get(repository)).longValue() : 0; ((Long) lastRepoScan.get(repository)).longValue() : 0;
if (repository.lastModified() != lastScan) { if (repository.lastModified() != lastScan) {
lastRepoScan.put(repository, new Long(repository.lastModified())); lastRepoScan.put(repository, Long.valueOf(repository.lastModified()));
checkRepository(repository, false); checkRepository(repository, false);
} }
} }

View file

@ -514,7 +514,7 @@ public class ImageWrapper {
/** /**
* Reduces the colors used in the image. Necessary before saving as GIF. * Reduces the colors used in the image. Necessary before saving as GIF.
* *
* @param colors colors the number of colors to use, usually <= 256. * @param colors colors the number of colors to use, usually {@literal <}= 256.
*/ */
public void reduceColors(int colors) { public void reduceColors(int colors) {
reduceColors(colors, false); reduceColors(colors, false);
@ -523,7 +523,7 @@ public class ImageWrapper {
/** /**
* Reduces the colors used in the image. Necessary before saving as GIF. * Reduces the colors used in the image. Necessary before saving as GIF.
* *
* @param colors colors the number of colors to use, usually <= 256. * @param colors colors the number of colors to use, usually {@literal <}= 256.
* @param dither ... * @param dither ...
*/ */
public void reduceColors(int colors, boolean dither) { public void reduceColors(int colors, boolean dither) {
@ -534,7 +534,7 @@ public class ImageWrapper {
* Reduce the colors used in this image. Useful and necessary before saving * Reduce the colors used in this image. Useful and necessary before saving
* the image as GIF file. * the image as GIF file.
* *
* @param colors the number of colors to use, usually <= 256. * @param colors the number of colors to use, usually {@literal <}= 256.
* @param dither ... * @param dither ...
* @param alphaToBitmask ... * @param alphaToBitmask ...
*/ */

View file

@ -473,10 +473,10 @@ public class ApplicationManager implements XmlRpcHandler {
} }
// bind to Jetty HTTP server // bind to Jetty HTTP server
if (ApplicationManager.this.jetty != null) { if (jetty != null) {
if(ApplicationManager.this.context == null) { if (context == null) {
ApplicationManager.this.context = new ContextHandlerCollection(); context = new ContextHandlerCollection();
ApplicationManager.this.jetty.getHttpServer().setHandler(ApplicationManager.this.context); jetty.getHttpServer().setHandler(context);
} }
// if there is a static direcory specified, mount it // if there is a static direcory specified, mount it
@ -501,9 +501,8 @@ public class ApplicationManager implements XmlRpcHandler {
Class servletClass = servletClassName == null ? Class servletClass = servletClassName == null ?
EmbeddedServletClient.class : Class.forName(servletClassName); EmbeddedServletClient.class : Class.forName(servletClassName);
ServletHolder holder = new ServletHolder(servletClass); ServletHolder holder = new ServletHolder(servletClass);
appContext.addServlet(holder, "/*"); //$NON-NLS-1$ holder.setInitParameter("application", appName);
appContext.addServlet(holder, "/*");
holder.setInitParameter("application", appName); //$NON-NLS-1$
if (this.cookieDomain != null) { if (this.cookieDomain != null) {
holder.setInitParameter("cookieDomain", this.cookieDomain); //$NON-NLS-1$ holder.setInitParameter("cookieDomain", this.cookieDomain); //$NON-NLS-1$
@ -529,9 +528,9 @@ public class ApplicationManager implements XmlRpcHandler {
holder.setInitParameter("debug", this.debug); //$NON-NLS-1$ holder.setInitParameter("debug", this.debug); //$NON-NLS-1$
} }
if (this.protectedStaticDir != null) { if (protectedStaticDir != null) {
File protectedContent = getAbsoluteFile(this.protectedStaticDir); File protectedContent = getAbsoluteFile(protectedStaticDir);
this.appContext.setResourceBase(protectedContent.getPath()); appContext.setResourceBase(protectedContent.getPath());
getLogger().info("Serving protected static from " + getLogger().info("Serving protected static from " +
protectedContent.getPath()); protectedContent.getPath());
} }

View file

@ -76,13 +76,13 @@ public final class TransientProperty implements IProperty, Serializable {
return svalue; return svalue;
case BOOLEAN: case BOOLEAN:
return new Boolean(bvalue); return Boolean.valueOf(bvalue);
case INTEGER: case INTEGER:
return new Long(lvalue); return Long.valueOf(lvalue);
case FLOAT: case FLOAT:
return new Double(dvalue); return Double.valueOf(dvalue);
case DATE: case DATE:
return new Date(lvalue); return new Date(lvalue);

View file

@ -93,7 +93,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
break; break;
case INTEGER: case INTEGER:
value = new Long(in.readLong()); value = Long.valueOf(in.readLong());
break; break;
@ -103,7 +103,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
break; break;
case FLOAT: case FLOAT:
value = new Double(in.readDouble()); value = Double.valueOf(in.readDouble());
break; break;
@ -231,7 +231,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
*/ */
public void setIntegerValue(long l) { public void setIntegerValue(long l) {
type = INTEGER; type = INTEGER;
value = new Long(l); value = Long.valueOf(l);
dirty = true; dirty = true;
} }
@ -242,7 +242,7 @@ public final class Property implements IProperty, Serializable, Cloneable, Compa
*/ */
public void setFloatValue(double d) { public void setFloatValue(double d) {
type = FLOAT; type = FLOAT;
value = new Double(d); value = Double.valueOf(d);
dirty = true; dirty = true;
} }

View file

@ -240,7 +240,7 @@ public class Transactor {
public void registerConnection(DbSource src, Connection con) { public void registerConnection(DbSource src, Connection con) {
sqlConnections.put(src, con); sqlConnections.put(src, con);
// we assume a freshly created connection is ok. // we assume a freshly created connection is ok.
testedConnections.put(src, new Long(System.currentTimeMillis())); testedConnections.put(src, Long.valueOf(System.currentTimeMillis()));
} }
/** /**
@ -262,7 +262,7 @@ public class Transactor {
stmt.execute("SELECT 1"); stmt.execute("SELECT 1");
} }
stmt.close(); stmt.close();
testedConnections.put(src, new Long(now)); testedConnections.put(src, Long.valueOf(now));
} catch (SQLException sx) { } catch (SQLException sx) {
try { try {
con.close(); con.close();

View file

@ -225,9 +225,9 @@ public final class XmlDatabaseReader extends DefaultHandler implements XmlConsta
prop.setStringValue(charValue); prop.setStringValue(charValue);
} }
} else if ("float".equals(elementType)) { } else if ("float".equals(elementType)) {
prop.setFloatValue((new Double(charValue)).doubleValue()); prop.setFloatValue((Double.valueOf(charValue)).doubleValue());
} else if ("integer".equals(elementType)) { } else if ("integer".equals(elementType)) {
prop.setIntegerValue((new Long(charValue)).longValue()); prop.setIntegerValue((Long.valueOf(charValue)).longValue());
} else { } else {
prop.setStringValue(charValue); prop.setStringValue(charValue);
} }

View file

@ -299,9 +299,9 @@ public final class XmlReader extends DefaultHandler implements XmlConstants {
currentNode.setString(elementName, charValue); currentNode.setString(elementName, charValue);
} }
} else if ("float".equals(elementType)) { } else if ("float".equals(elementType)) {
currentNode.setFloat(elementName, (new Double(charValue)).doubleValue()); currentNode.setFloat(elementName, (Double.valueOf(charValue)).doubleValue());
} else if ("integer".equals(elementType)) { } else if ("integer".equals(elementType)) {
currentNode.setInteger(elementName, (new Long(charValue)).longValue()); currentNode.setInteger(elementName, (Long.valueOf(charValue)).longValue());
} else { } else {
currentNode.setString(elementName, charValue); currentNode.setString(elementName, charValue);
} }

View file

@ -879,7 +879,7 @@ public class HopObject extends ScriptableObject implements Wrapper, PropertyReco
if (d == null) { if (d == null) {
return null; return null;
} else { } else {
Object[] args = { new Long(d.getTime()) }; Object[] args = { Long.valueOf(d.getTime()) };
try { try {
return cx.newObject(core.global, "Date", args); return cx.newObject(core.global, "Date", args);
} catch (JavaScriptException nafx) { } catch (JavaScriptException nafx) {

View file

@ -100,7 +100,7 @@ public final class JSAdapter implements Scriptable, Function {
public Object get(int index, Scriptable start) { public Object get(int index, Scriptable start) {
Function func = getAdapteeFunction(GET_PROP); Function func = getAdapteeFunction(GET_PROP);
if (func != null) { if (func != null) {
return call(func, new Object[] { new Integer(index) }); return call(func, new Object[] { Integer.valueOf(index) });
} else { } else {
start = getAdaptee(); start = getAdaptee();
return start.get(index, start); return start.get(index, start);
@ -121,7 +121,7 @@ public final class JSAdapter implements Scriptable, Function {
public boolean has(int index, Scriptable start) { public boolean has(int index, Scriptable start) {
Function func = getAdapteeFunction(HAS_PROP); Function func = getAdapteeFunction(HAS_PROP);
if (func != null) { if (func != null) {
Object res = call(func, new Object[] { new Integer(index) }); Object res = call(func, new Object[] { Integer.valueOf(index) });
return Context.toBoolean(res); return Context.toBoolean(res);
} else { } else {
start = getAdaptee(); start = getAdaptee();
@ -147,7 +147,7 @@ public final class JSAdapter implements Scriptable, Function {
if (start == this) { if (start == this) {
Function func = getAdapteeFunction(PUT_PROP); Function func = getAdapteeFunction(PUT_PROP);
if( func != null) { if( func != null) {
call(func, new Object[] { new Integer(index), value }); call(func, new Object[] { Integer.valueOf(index), value });
} else { } else {
start = getAdaptee(); start = getAdaptee();
start.put(index, start, value); start.put(index, start, value);
@ -169,7 +169,7 @@ public final class JSAdapter implements Scriptable, Function {
public void delete(int index) { public void delete(int index) {
Function func = getAdapteeFunction(DEL_PROP); Function func = getAdapteeFunction(DEL_PROP);
if (func != null) { if (func != null) {
call(func, new Object[] { new Integer(index) }); call(func, new Object[] { Integer.valueOf(index) });
} else { } else {
getAdaptee().delete(index); getAdaptee().delete(index);
} }
@ -296,7 +296,7 @@ public final class JSAdapter implements Scriptable, Function {
// map a property id. Property id can only be an Integer or String // map a property id. Property id can only be an Integer or String
private Object mapToId(Object tmp) { private Object mapToId(Object tmp) {
if (tmp instanceof Double) { if (tmp instanceof Double) {
return new Integer(((Double)tmp).intValue()); return Integer.valueOf(((Double)tmp).intValue());
} else { } else {
return Context.toString(tmp); return Context.toString(tmp);
} }

View file

@ -106,7 +106,7 @@ public class PathWrapper extends ScriptableObject {
Object[] ids = new Object[path.size()]; Object[] ids = new Object[path.size()];
for (int i=0; i<ids.length; i++) { for (int i=0; i<ids.length; i++) {
ids[i] = new Integer(i); ids[i] = Integer.valueOf(i);
} }
return ids; return ids;

View file

@ -93,8 +93,8 @@ public final class RhinoCore implements ScopeProvider {
// optimization level for rhino engine, ranges from -1 to 9 // optimization level for rhino engine, ranges from -1 to 9
int optLevel = 0; int optLevel = 0;
// language version - default to JS 1.8 // language version - default to ES6
int languageVersion = 180; int languageVersion = 200;
// debugger/tracer flags // debugger/tracer flags
boolean hasDebugger = false; boolean hasDebugger = false;
@ -569,7 +569,7 @@ public final class RhinoCore implements ScopeProvider {
return arg; return arg;
if (arg instanceof Date) { if (arg instanceof Date) {
Date d = (Date) arg; Date d = (Date) arg;
Object[] args = { new Long(d.getTime()) }; Object[] args = { Long.valueOf(d.getTime()) };
return Context.getCurrentContext().newObject(global, "Date", args); return Context.getCurrentContext().newObject(global, "Date", args);
} }
return Context.toObject(arg, global); return Context.toObject(arg, global);
@ -618,9 +618,9 @@ public final class RhinoCore implements ScopeProvider {
} else if (arg instanceof Number) { } else if (arg instanceof Number) {
Number n = (Number) arg; Number n = (Number) arg;
if (arg instanceof Float || arg instanceof Long) { if (arg instanceof Float || arg instanceof Long) {
return new Double(n.doubleValue()); return Double.valueOf(n.doubleValue());
} else if (!(arg instanceof Double)) { } else if (!(arg instanceof Double)) {
return new Integer(n.intValue()); return Integer.valueOf(n.intValue());
} }
} else if (arg instanceof INode) { } else if (arg instanceof INode) {
// interpret HopObject as object/dict // interpret HopObject as object/dict
@ -1146,7 +1146,7 @@ public final class RhinoCore implements ScopeProvider {
// Convert java.util.Date objects to JavaScript Dates // Convert java.util.Date objects to JavaScript Dates
if (obj instanceof Date) { if (obj instanceof Date) {
Object[] args = { new Long(((Date) obj).getTime()) }; Object[] args = { Long.valueOf(((Date) obj).getTime()) };
try { try {
return cx.newObject(global, "Date", args); return cx.newObject(global, "Date", args);
} catch (JavaScriptException nafx) { } catch (JavaScriptException nafx) {

View file

@ -106,7 +106,7 @@ public class Profiler implements Debugger {
Scriptable thisObj, Object[] args) { Scriptable thisObj, Object[] args) {
long time = System.nanoTime(); long time = System.nanoTime();
timer.push(new Long(time)); timer.push(Long.valueOf(time));
} }
/** /**

View file

@ -216,6 +216,23 @@ public class DatabaseObject {
} }
} }
public RowSet executePreparedRetrieval(PreparedStatement statement) {
ResultSet resultSet = null;
try {
resultSet = statement.executeQuery();
return new RowSet(statement.toString(), this, statement, resultSet);
} catch (SQLException e) {
lastError = e;
try {
if (statement != null) statement.close();
} catch (Exception ignored) {
}
statement = null;
return null;
}
}
public int executeCommand(String sql) { public int executeCommand(String sql) {
int count = 0; int count = 0;
@ -439,7 +456,7 @@ public class DatabaseObject {
// First return system or or prototype properties // First return system or or prototype properties
if (propertyName.equals("length")) { if (propertyName.equals("length")) {
return new Integer(colNames.size()); return Integer.valueOf(colNames.size());
} else { } else {
if (resultSet == null) { if (resultSet == null) {
lastError = new SQLException("Attempt to access a released result set"); lastError = new SQLException("Attempt to access a released result set");
@ -498,12 +515,12 @@ public class DatabaseObject {
case Types.BIGINT: case Types.BIGINT:
case Types.SMALLINT: case Types.SMALLINT:
case Types.INTEGER: case Types.INTEGER:
return new Long(resultSet.getLong(index)); return Long.valueOf(resultSet.getLong(index));
case Types.REAL: case Types.REAL:
case Types.FLOAT: case Types.FLOAT:
case Types.DOUBLE: case Types.DOUBLE:
return new Double(resultSet.getDouble(index)); return Double.valueOf(resultSet.getDouble(index));
case Types.DECIMAL: case Types.DECIMAL:
case Types.NUMERIC: case Types.NUMERIC:
@ -513,9 +530,9 @@ public class DatabaseObject {
} }
if (num.scale() > 0) { if (num.scale() > 0) {
return new Double(num.doubleValue()); return Double.valueOf(num.doubleValue());
} else { } else {
return new Long(num.longValue()); return Long.valueOf(num.longValue());
} }
case Types.VARBINARY: case Types.VARBINARY:

View file

@ -554,8 +554,13 @@ public abstract class AbstractServletClient extends HttpServlet {
// If protected session cookies are enabled we also force a new session // If protected session cookies are enabled we also force a new session
// if the existing session id doesn't match the client's ip address // if the existing session id doesn't match the client's ip address
StringBuffer buffer = new StringBuffer(); StringBuffer buffer = new StringBuffer();
String ip = request.getHeader("X-Forwarded-For");
if (ip != null && ip.length() != 0) {
addIPAddress(buffer, ip);
} else {
addIPAddress(buffer, request.getRemoteAddr()); addIPAddress(buffer, request.getRemoteAddr());
addIPAddress(buffer, request.getHeader("X-Forwarded-For")); }
// Not sure, if this line can be removed
addIPAddress(buffer, request.getHeader("Client-ip")); addIPAddress(buffer, request.getHeader("Client-ip"));
if (reqtrans.getSession() == null || !reqtrans.getSession().startsWith(buffer.toString())) { if (reqtrans.getSession() == null || !reqtrans.getSession().startsWith(buffer.toString())) {
createSession(response, buffer.toString(), reqtrans, domain); createSession(response, buffer.toString(), reqtrans, domain);
@ -748,7 +753,7 @@ public abstract class AbstractServletClient extends HttpServlet {
* <strong>IMPLEMENTATION NOTE</strong>: URL decoding is performed * <strong>IMPLEMENTATION NOTE</strong>: URL decoding is performed
* individually on the parsed name and value elements, rather than on * individually on the parsed name and value elements, rather than on
* the entire query string ahead of time, to properly deal with the case * the entire query string ahead of time, to properly deal with the case
* where the name or value includes an encoded "=" or "&" character * where the name or value includes an encoded {@code =} or {@code &} character
* that would otherwise be interpreted as a delimiter. * that would otherwise be interpreted as a delimiter.
* *
* NOTE: byte array data is modified by this method. Caller beware. * NOTE: byte array data is modified by this method. Caller beware.

View file

@ -450,27 +450,27 @@ public class CronJob {
cal.setTime(date); cal.setTime(date);
// try and short-circuit as fast as possible. // try and short-circuit as fast as possible.
Integer theYear = new Integer(cal.get(Calendar.YEAR)); Integer theYear = Integer.valueOf(cal.get(Calendar.YEAR));
if (!year.contains(ALL_VALUE) && !year.contains(theYear)) if (!year.contains(ALL_VALUE) && !year.contains(theYear))
return false; return false;
Integer theMonth = new Integer(cal.get(Calendar.MONTH)); Integer theMonth = Integer.valueOf(cal.get(Calendar.MONTH));
if (!month.contains(ALL_VALUE) && !month.contains(theMonth)) if (!month.contains(ALL_VALUE) && !month.contains(theMonth))
return false; return false;
Integer theDay = new Integer(cal.get(Calendar.DAY_OF_MONTH)); Integer theDay = Integer.valueOf(cal.get(Calendar.DAY_OF_MONTH));
if (!day.contains(ALL_VALUE) && !day.contains(theDay)) if (!day.contains(ALL_VALUE) && !day.contains(theDay))
return false; return false;
Integer theWeekDay = new Integer(cal.get(Calendar.DAY_OF_WEEK)); Integer theWeekDay = Integer.valueOf(cal.get(Calendar.DAY_OF_WEEK));
if (!weekday.contains(ALL_VALUE) && !weekday.contains(theWeekDay)) if (!weekday.contains(ALL_VALUE) && !weekday.contains(theWeekDay))
return false; return false;
Integer theHour = new Integer(cal.get(Calendar.HOUR_OF_DAY)); Integer theHour = Integer.valueOf(cal.get(Calendar.HOUR_OF_DAY));
if (!hour.contains(ALL_VALUE) && !hour.contains(theHour)) if (!hour.contains(ALL_VALUE) && !hour.contains(theHour))
return false; return false;
Integer theMinute = new Integer(cal.get(Calendar.MINUTE)); Integer theMinute = Integer.valueOf(cal.get(Calendar.MINUTE));
if (!minute.contains(ALL_VALUE) && !minute.contains(theMinute)) if (!minute.contains(ALL_VALUE) && !minute.contains(theMinute))
return false; return false;
@ -484,7 +484,7 @@ public class CronJob {
public void addYear(int year) public void addYear(int year)
{ {
this.year.remove(ALL_VALUE); this.year.remove(ALL_VALUE);
this.year.add(new Integer(year)); this.year.add(Integer.valueOf(year));
} }
/** /**
@ -492,7 +492,7 @@ public class CronJob {
*/ */
public void removeYear(int year) public void removeYear(int year)
{ {
this.year.remove(new Integer(year)); this.year.remove(Integer.valueOf(year));
} }
/** /**
@ -520,7 +520,7 @@ public class CronJob {
public void addMonth(int month) public void addMonth(int month)
{ {
this.month.remove(ALL_VALUE); this.month.remove(ALL_VALUE);
this.month.add(new Integer(month)); this.month.add(Integer.valueOf(month));
} }
/** /**
@ -530,7 +530,7 @@ public class CronJob {
*/ */
public void removeMonth(int month) public void removeMonth(int month)
{ {
this.month.remove(new Integer(month)); this.month.remove(Integer.valueOf(month));
} }
/** /**
@ -556,7 +556,7 @@ public class CronJob {
public void addDay(int day) public void addDay(int day)
{ {
this.day.remove(ALL_VALUE); this.day.remove(ALL_VALUE);
this.day.add(new Integer(day)); this.day.add(Integer.valueOf(day));
} }
/** /**
@ -564,7 +564,7 @@ public class CronJob {
*/ */
public void removeDay(int day) public void removeDay(int day)
{ {
this.day.remove(new Integer(day)); this.day.remove(Integer.valueOf(day));
} }
/** /**
@ -592,7 +592,7 @@ public class CronJob {
public void addWeekday(int weekday) public void addWeekday(int weekday)
{ {
this.weekday.remove(ALL_VALUE); this.weekday.remove(ALL_VALUE);
this.weekday.add(new Integer(weekday)); this.weekday.add(Integer.valueOf(weekday));
} }
/** /**
@ -602,7 +602,7 @@ public class CronJob {
*/ */
public void removeWeekday(int weekday) public void removeWeekday(int weekday)
{ {
this.weekday.remove(new Integer(weekday)); this.weekday.remove(Integer.valueOf(weekday));
} }
/** /**
@ -628,7 +628,7 @@ public class CronJob {
public void addHour(int hour) public void addHour(int hour)
{ {
this.hour.remove(ALL_VALUE); this.hour.remove(ALL_VALUE);
this.hour.add(new Integer(hour)); this.hour.add(Integer.valueOf(hour));
} }
/** /**
@ -636,7 +636,7 @@ public class CronJob {
*/ */
public void removeHour(int hour) public void removeHour(int hour)
{ {
this.hour.remove(new Integer(hour)); this.hour.remove(Integer.valueOf(hour));
} }
/** /**
@ -662,7 +662,7 @@ public class CronJob {
public void addMinute(int minute) public void addMinute(int minute)
{ {
this.minute.remove(ALL_VALUE); this.minute.remove(ALL_VALUE);
this.minute.add(new Integer(minute)); this.minute.add(Integer.valueOf(minute));
} }
/** /**
@ -670,7 +670,7 @@ public class CronJob {
*/ */
public void removeMinute(int minute) public void removeMinute(int minute)
{ {
this.minute.remove(new Integer(minute)); this.minute.remove(Integer.valueOf(minute));
} }
/** /**

View file

@ -127,7 +127,7 @@ public final class HtmlEncoder {
/** /**
* Do "smart" encodging on a string. This means that valid HTML entities and tags, * Do "smart" encodging on a string. This means that valid HTML entities and tags,
* Helma macros and HTML comments are passed through unescaped, while * Helma macros and HTML comments are passed through unescaped, while
* other occurrences of '<', '>' and '&' are encoded to HTML entities. * other occurrences of {@code <}, {@code >} and {@code &} are encoded to HTML entities.
*/ */
public final static String encode(String str) { public final static String encode(String str) {
if (str == null) { if (str == null) {
@ -151,7 +151,7 @@ public final class HtmlEncoder {
/** /**
* Do "smart" encodging on a string. This means that valid HTML entities and tags, * Do "smart" encodging on a string. This means that valid HTML entities and tags,
* Helma macros and HTML comments are passed through unescaped, while * Helma macros and HTML comments are passed through unescaped, while
* other occurrences of '<', '>' and '&' are encoded to HTML entities. * other occurrences of {@code <}, {@code >} and {@code &} are encoded to HTML entities.
*/ */
public final static void encode(String str, StringBuffer ret) { public final static void encode(String str, StringBuffer ret) {
encode(str, ret, false, null); encode(str, ret, false, null);
@ -160,7 +160,7 @@ public final class HtmlEncoder {
/** /**
* Do "smart" encodging on a string. This means that valid HTML entities and tags, * Do "smart" encodging on a string. This means that valid HTML entities and tags,
* Helma macros and HTML comments are passed through unescaped, while * Helma macros and HTML comments are passed through unescaped, while
* other occurrences of '<', '>' and '&' are encoded to HTML entities. * other occurrences of {@code <}, {@code >} and {@code &} are encoded to HTML entities.
* *
* @param str the string to encode * @param str the string to encode
* @param ret the string buffer to encode to * @param ret the string buffer to encode to