Skip to content

Commit 716e5f2

Browse files
authored
Update standalone module dependencies for Tomcat 10, etc. (#175)
1 parent a30c9d5 commit 716e5f2

File tree

8 files changed

+41
-30
lines changed

8 files changed

+41
-30
lines changed

standalone/README.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
1-
A simple LabKey module to illustrate how to build outside of the LabKey enlistment.
1+
A simple LabKey module to illustrate how to build outside the LabKey enlistment.
22

33
This simple module was created using LabKey's 'createModule' command and then
4-
removing a few things. It does not include any JSP or XSD files. To include
4+
removing a few things. It does not include any JSP or XSD files. To include
55
these, you may need additional tasks for creating additional Jar files, or you
6-
can use the LabKey Gradle plugins. The file `withPlugins_build.gradle` provides
6+
can use the LabKey Gradle plugins. The file `withPlugins_build.gradle` provides
77
an example of how to use the plugins with a standalone module.
88

99
For more details see:

standalone/build.gradle

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
// This is a sample gradle file for creating a stand-alone Java module that can be deployed in a LabKey server
2-
// instance. This file applies some of the LabKey Gradle plugins and thus assumes the module layout described
3-
// in the LabKey documentation
4-
// (https://labkey.org/Documentation/wiki-page.view?name=moduleDirectoryStructures)
2+
// instance. This file applies some of the LabKey Gradle plugins and thus assumes the module layout described
3+
// in the LabKey documentation (https://labkey.org/Documentation/wiki-page.view?name=moduleDirectoryStructures).
54
// For simplicity, the source code does not include JSP files that would be compiled and collected into a JSP jar file
65
// or XSD files that would be transformed into XMLBeans objects and include in the main jar.
76
//
87
// You can refer to the gradlePlugins source code (https://github.com/LabKey/gradlePlugin) for more details on the
9-
// full build process implemented for modules within the LabKey source tree.
8+
// full build process implemented for modules within the LabKey source tree.
109
//
1110
// To build this module, run:
1211
// ./gradlew module

standalone/gradle.properties

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,17 +1,17 @@
11
# Location of the repository for various artifacts used in the build
22
artifactory_contextUrl=https://labkey.jfrog.io/artifactory
33

4-
# Exact version will vary based on the version of LabKey being built on
5-
gradlePluginsVersion=1.42.1
4+
# Exact version will vary based on the target LabKey version
5+
gradlePluginsVersion=2.2.2
66

77
# versions of artifacts required as dependencies
88
#uncomment the version number and set to the desired labkeyVersion
9-
#labkeyVersion=23.7-SNAPSHOT
10-
labkeyClientApiVersion=5.3.0
9+
#labkeyVersion=24.3-SNAPSHOT
10+
labkeyClientApiVersion=6.0.0
1111

12-
# used by the LabKey Jsp Gradle plugin for declaring dependencies
13-
apacheTomcatVersion=9.0.83
14-
servletApiVersion=4.0.1
12+
# used by the LabKey JSP Gradle plugin for declaring dependencies
13+
apacheTomcatVersion=10.1.18
14+
servletApiVersion=6.0.0
1515

16-
# Example external dependency used in build file
16+
# Not actually used... just an example to show how to declare an external dependency in the build file
1717
commonsBeanutilsVersion=1.9.4
-16.9 KB
Binary file not shown.
Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
distributionBase=GRADLE_USER_HOME
22
distributionPath=wrapper/dists
3-
distributionUrl=https\://services.gradle.org/distributions/gradle-8.0.1-bin.zip
3+
distributionUrl=https\://services.gradle.org/distributions/gradle-8.5-bin.zip
4+
networkTimeout=10000
5+
validateDistributionUrl=true
46
zipStoreBase=GRADLE_USER_HOME
57
zipStorePath=wrapper/dists

standalone/gradlew

Lines changed: 22 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555
# Darwin, MinGW, and NonStop.
5656
#
5757
# (3) This script is generated from the Groovy template
58-
# https://github.com/gradle/gradle/blob/master/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
58+
# https://github.com/gradle/gradle/blob/HEAD/subprojects/plugins/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
5959
# within the Gradle project.
6060
#
6161
# You can find Gradle at https://github.com/gradle/gradle/.
@@ -80,13 +80,11 @@ do
8080
esac
8181
done
8282

83-
APP_HOME=$( cd "${APP_HOME:-./}" && pwd -P ) || exit
84-
85-
APP_NAME="Gradle"
83+
# This is normally unused
84+
# shellcheck disable=SC2034
8685
APP_BASE_NAME=${0##*/}
87-
88-
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
89-
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
86+
# Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
87+
APP_HOME=$( cd "${APP_HOME:-./}" > /dev/null && pwd -P ) || exit
9088

9189
# Use the maximum available, or set MAX_FD != -1 to use that value.
9290
MAX_FD=maximum
@@ -133,22 +131,29 @@ location of your Java installation."
133131
fi
134132
else
135133
JAVACMD=java
136-
which java >/dev/null 2>&1 || die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
134+
if ! command -v java >/dev/null 2>&1
135+
then
136+
die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
137137
138138
Please set the JAVA_HOME variable in your environment to match the
139139
location of your Java installation."
140+
fi
140141
fi
141142

142143
# Increase the maximum file descriptors if we can.
143144
if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
144145
case $MAX_FD in #(
145146
max*)
147+
# In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
148+
# shellcheck disable=SC2039,SC3045
146149
MAX_FD=$( ulimit -H -n ) ||
147150
warn "Could not query maximum file descriptor limit"
148151
esac
149152
case $MAX_FD in #(
150153
'' | soft) :;; #(
151154
*)
155+
# In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
156+
# shellcheck disable=SC2039,SC3045
152157
ulimit -n "$MAX_FD" ||
153158
warn "Could not set maximum file descriptor limit to $MAX_FD"
154159
esac
@@ -193,11 +198,15 @@ if "$cygwin" || "$msys" ; then
193198
done
194199
fi
195200

196-
# Collect all arguments for the java command;
197-
# * $DEFAULT_JVM_OPTS, $JAVA_OPTS, and $GRADLE_OPTS can contain fragments of
198-
# shell script including quotes and variable substitutions, so put them in
199-
# double quotes to make sure that they get re-expanded; and
200-
# * put everything else in single quotes, so that it's not re-expanded.
201+
202+
# Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
203+
DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
204+
205+
# Collect all arguments for the java command:
206+
# * DEFAULT_JVM_OPTS, JAVA_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
207+
# and any embedded shellness will be escaped.
208+
# * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
209+
# treated as '${Hostname}' itself on the command line.
201210

202211
set -- \
203212
"-Dorg.gradle.appname=$APP_BASE_NAME" \

standalone/gradlew.bat

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ if "%OS%"=="Windows_NT" setlocal
2626

2727
set DIRNAME=%~dp0
2828
if "%DIRNAME%"=="" set DIRNAME=.
29+
@rem This is normally unused
2930
set APP_BASE_NAME=%~n0
3031
set APP_HOME=%DIRNAME%
3132

standalone/module.properties

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
ModuleClass: org.labkey.standalone.StandaloneModule
2-
RequiredServerVersion: 21.3
2+
RequiredServerVersion: 24.3
33
Label: Example Standalone LabKey module
44
Description: A simple example of a module that can be built outside of a LabKey enlistment.
55
URL: http://example.com/FIXME

0 commit comments

Comments
 (0)