-
Notifications
You must be signed in to change notification settings - Fork 263
/
build.gradle.kts
736 lines (623 loc) · 27.3 KB
/
build.gradle.kts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
/*
* Licensed to the Apache Software Foundation (ASF) under one
* or more contributor license agreements. See the NOTICE file
* distributed with this work for additional information
* regarding copyright ownership. The ASF licenses this file
* to you 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
*
* http://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.
*/
import java.io.FileOutputStream
import java.nio.charset.StandardCharsets
import java.nio.file.Files
import java.util.*
import java.util.stream.Collectors
plugins {
`freemarker-root`
`maven-publish`
signing
id("biz.aQute.bnd.builder") version "7.0.0"
id("eclipse")
}
group = "org.freemarker"
val fmExt = freemarkerRoot
tasks.withType<JavaCompile>().configureEach {
options.encoding = "UTF-8"
}
tasks.withType<Jar>().configureEach {
// make contents of freemarker.jar reproducible
isPreserveFileTimestamps = false
isReproducibleFileOrder = true
filePermissions {
unix("rw-r--r--")
}
dirPermissions {
unix("rwxr-xr-x")
}
}
freemarkerRoot {
// FreeMarker 2.x build is unusual in that instead of using a nested Gradle project for each logical module,
// it uses a source set for each. This is because FreeMarker 2.x is a single monolithic artifact for historical
// reasons.
configureSourceSet(SourceSet.MAIN_SOURCE_SET_NAME) { enableTests() }
configureSourceSet("javaxServlet") { enableTests() }
configureSourceSet("jython20")
configureSourceSet("jython22")
configureSourceSet("jython25") { enableTests() }
configureSourceSet("core9", "9") { enableTests() }
configureSourceSet("core16", "16") {
enableTests();
addDependencySourceSet("core9");
}
configureGeneratedSourceSet("jakartaServlet") {
val jakartaSourceGenerators = generateJakartaSources("javaxServlet")
val testSourceSet = enableTests("17").get().sources
val jakartaTestSourceGenerators = generateJakartaSources(
"javaxServletTest",
SourceSet.TEST_SOURCE_SET_NAME,
testSourceSet
)
(jakartaSourceGenerators + jakartaTestSourceGenerators).forEach { task ->
task.configure {
packageMappings.set(mapOf(
"freemarker.ext.jsp" to "freemarker.ext.jakarta.jsp",
"freemarker.ext.servlet" to "freemarker.ext.jakarta.servlet",
"freemarker.cache" to "freemarker.ext.jakarta.servlet",
))
noAutoReplacePackages.set(setOf("freemarker.cache"))
replacements.set(mapOf(
"package freemarker.cache" to "package freemarker.ext.jakarta.servlet",
"freemarker.cache.WebappTemplateLoader" to "freemarker.ext.jakarta.servlet.WebappTemplateLoader",
"javax.servlet" to "jakarta.servlet",
"javax.el" to "jakarta.el",
"http://java.sun.com/jsp/jstl/core" to "jakarta.tags.core",
"http://java.sun.com/jsp/jstl/functions" to "jakarta.tags.functions",
))
}
}
}
}
val compileJavacc = tasks.register<freemarker.build.CompileJavaccTask>("compileJavacc") {
sourceDirectory.set(file("freemarker-core/src/main/javacc"))
destinationDirectory.set(project.layout.buildDirectory.map { it.dir("generated").dir("javacc") })
javaccVersion.set("7.0.12")
fileNameOverrides.addAll(
"ParseException.java",
"TokenMgrError.java"
)
val basePath = "freemarker/core"
replacePattern(
"${basePath}/FMParser.java",
"enum",
"ENUM"
)
replacePattern(
"${basePath}/FMParserConstants.java",
"public interface FMParserConstants",
"interface FMParserConstants"
)
replacePattern(
"${basePath}/Token.java",
"public class Token",
"class Token"
)
// FIXME: This does nothing at the moment.
replacePattern(
"${basePath}/SimpleCharStream.java",
"public final class SimpleCharStream",
"final class SimpleCharStream"
)
}
sourceSets.main.get().java.srcDir(compileJavacc)
fun buildInfoFile(): File
= project.layout.buildDirectory.get().asFile.resolve("buildinfo").resolve(".buildinfo")
tasks.sourcesJar.configure {
from(compileJavacc.flatMap { it.sourceDirectory })
from(files("LICENSE", "NOTICE")) {
into("META-INF")
}
exclude("freemarker/core/_Java9Impl.java")
exclude("freemarker/core/_Java16Impl.java")
// Depend on the createBuildInfo task and include the generated file
dependsOn(createBuildInfo)
from(buildInfoFile())
}
tasks.javadocJar.configure {
from(files("src/dist/javadoc"))
from(files("NOTICE")) {
into("META-INF")
}
}
tasks.jar.configure {
from(files("src/dist/jar"))
}
configurations {
register("combinedClasspath") {
extendsFrom(named("jython25CompileClasspath").get())
extendsFrom(named("javaxServletCompileClasspath").get())
}
register("javadocClasspath") {
extendsFrom(named("combinedClasspath").get())
extendsFrom(named("jakartaServletCompileClasspath").get())
}
}
// This source set is only needed, because the OSGI plugin supports only a single sourceSet.
// We are deleting it, because otherwise it would fool IDEs that a source root has multiple owners.
val otherSourceSetsRef = fmExt
.allConfiguredSourceSetNames
.map { names -> names.map { name -> sourceSets.named(name).get() } }
val osgiSourceSet = sourceSets
.create("osgi") {
val otherSourceSets = otherSourceSetsRef.get()
java.setSrcDirs(otherSourceSets.flatMap { s -> s.java.srcDirs })
resources.setSrcDirs(otherSourceSets.flatMap { s -> s.resources.srcDirs })
}
.apply {
val osgiClasspath = configurations.named("combinedClasspath").get()
compileClasspath = osgiClasspath
runtimeClasspath = osgiClasspath
}
.also {
sourceSets.remove(it)
tasks.named(it.classesTaskName).configure {
description = "Do not run this task! This task exists only as a work around for the OSGI plugin."
enabled = false
}
}
tasks.named<Jar>(JavaPlugin.JAR_TASK_NAME) {
configure<aQute.bnd.gradle.BundleTaskExtension> {
bndfile.set(file("osgi.bnd"))
setSourceSet(osgiSourceSet)
val otherSourceSets = otherSourceSetsRef
.get()
.flatMap { sourceSet -> sourceSet.output.files }
.toSet()
classpath(osgiSourceSet.compileClasspath.filter { file -> file !in otherSourceSets })
properties.putAll(fmExt.versionDef.versionProperties)
properties.put("moduleOrg", project.group.toString())
properties.put("moduleName", project.name)
}
}
tasks.named<Javadoc>(JavaPlugin.JAVADOC_TASK_NAME) {
val coreExcludes = setOf(
"LocalContext.java",
"CollectionAndSequence.java",
"Comment.java",
"DebugBreak.java",
"Expression.java",
"LibraryLoad.java",
"Macro.java",
"ReturnInstruction.java",
"StringArraySequence.java",
"TemplateElement.java",
"TemplateObject.java",
"TextBlock.java",
"ReturnInstruction.java",
"TokenMgrError.java"
)
val logExcludes = setOf(
"SLF4JLoggerFactory.java",
"CommonsLoggingLoggerFactory.java"
)
val compileJavaccDestDir = compileJavacc.get().destinationDirectory.get().asFile
setSource(source.filter { f ->
val fileName = f.name
val parentDirName = f.parentFile?.name
!(f.startsWith(compileJavaccDestDir) ||
fileName.startsWith("_") && fileName.endsWith(".java") ||
fileName == "SunInternalXalanXPathSupport.java" ||
parentDirName == "core" && coreExcludes.contains(fileName) ||
parentDirName == "template" && fileName == "EmptyMap.java" ||
parentDirName == "log" && logExcludes.contains(fileName)
)
})
javadocTool.set(javaToolchains.javadocToolFor {
languageVersion.set(JavaLanguageVersion.of(fmExt.javadocJavaVersion))
})
(options as StandardJavadocDocletOptions).apply {
val displayVersion = fmExt.versionDef.displayVersion
val javadocEncoding = StandardCharsets.UTF_8
locale = "en_US"
encoding = javadocEncoding.name()
windowTitle = "FreeMarker ${displayVersion} API"
links("https://docs.oracle.com/en/java/javase/16/docs/api/")
author(true)
version(true)
docEncoding = javadocEncoding.name()
charSet = javadocEncoding.name()
docTitle = "FreeMarker ${displayVersion}"
// There are too many to check
addStringOption("Xdoclint:-missing", "-quiet")
}
classpath = files(configurations.named("javadocClasspath"))
}
fun registerManualTask(taskName: String, localeValue: String, offlineValue: Boolean) {
val manualTaskRef = tasks.register<freemarker.build.ManualBuildTask>(taskName) {
inputDirectory.set(file("freemarker-manual/src/main/docgen/${localeValue}"))
offline.set(offlineValue)
locale.set(localeValue)
}
tasks.named(LifecycleBasePlugin.BUILD_TASK_NAME) { dependsOn(manualTaskRef) }
}
registerManualTask("manualOffline", "en_US", true)
registerManualTask("manualOnline", "en_US", false)
publishing {
repositories {
maven {
val snapshot = fmExt.versionDef.version.endsWith("-SNAPSHOT")
val defaultDeployUrl = if (snapshot) "https://repository.apache.org/content/repositories/snapshots" else "https://repository.apache.org/service/local/staging/deploy/maven2"
setUrl(providers.gradleProperty("freemarkerDeployUrl").getOrElse(defaultDeployUrl))
name = providers.gradleProperty("freemarkerDeployServerId").getOrElse("apache.releases.https")
val apacheUser = providers.gradleProperty("freemarker.deploy.apache.user")
.getOrElse("")
if (apacheUser.isNotEmpty()) {
credentials {
username = apacheUser
password = providers.gradleProperty("freemarker.deploy.apache.password")
.getOrElse("")
}
}
}
maven {
name = "local"
setUrl(layout.buildDirectory.map { it.dir("local-deployment") })
}
}
publications {
val mainPublication = create<MavenPublication>("main") {
from(components.getByName("java"))
pom {
withXml {
val headerComment = asElement().ownerDocument.createComment("""
Licensed to the Apache Software Foundation (ASF) under one
or more contributor license agreements. See the NOTICE file
distributed with this work for additional information
regarding copyright ownership. The ASF licenses this file
to you 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
http://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.
""".trimIndent().prependIndent(" ")
)
asElement().insertBefore(headerComment, asElement().firstChild)
}
packaging = "jar"
name.set("Apache FreeMarker")
description.set("""
Google App Engine compliant variation of FreeMarker.
FreeMarker is a "template engine"; a generic tool to generate text output based on templates.
""".trimIndent().prependIndent(" ") + "\n "
)
url.set("https://freemarker.apache.org/")
organization {
name.set("Apache Software Foundation")
url.set("http://apache.org")
}
licenses {
license {
name.set("Apache License, Version 2.0")
url.set("http://www.apache.org/licenses/LICENSE-2.0.txt")
distribution.set("repo")
}
}
scm {
connection.set("scm:git:https://git-wip-us.apache.org/repos/asf/freemarker.git")
developerConnection.set("scm:git:https://git-wip-us.apache.org/repos/asf/freemarker.git")
url.set("https://git-wip-us.apache.org/repos/asf?p=freemarker.git")
tag.set("v${fmExt.versionDef.version}")
}
issueManagement {
system.set("jira")
url.set("https://issues.apache.org/jira/browse/FREEMARKER/")
}
mailingLists {
mailingList {
name.set("FreeMarker developer list")
post.set("dev@freemarker.apache.org")
subscribe.set("dev-subscribe@freemarker.apache.org")
unsubscribe.set("dev-unsubscribe@freemarker.apache.org")
archive.set("http://mail-archives.apache.org/mod_mbox/freemarker-dev/")
}
mailingList {
name.set("FreeMarker commit and Jira notifications list")
post.set("notifications@freemarker.apache.org")
subscribe.set("notifications-subscribe@freemarker.apache.org")
unsubscribe.set("notifications-unsubscribe@freemarker.apache.org")
archive.set("http://mail-archives.apache.org/mod_mbox/freemarker-notifications/")
}
mailingList {
name.set("FreeMarker management private")
post.set("private@freemarker.apache.org")
}
}
}
}
if (fmExt.signMethod.needSignature()) {
fmExt.signMethod.configure(signing)
signing.sign(mainPublication)
}
}
}
tasks.withType<PublishToMavenRepository>().configureEach {
if (repository.name != "local") {
doFirst {
if (fmExt.versionService.developmentBuild) {
throw IllegalStateException("Cannot deploy to ${repository.name} in a development build." +
" Start the build with -PdevelopmentBuild=false")
}
}
}
}
val distArchiveBaseName = "apache-${name}"
val distDir = layout.buildDirectory.map { it.dir("distributions") }
fun registerDistSupportTasks(archiveTask: TaskProvider<Tar>) {
val signTask = tasks.register<freemarker.build.SignatureTask>("${archiveTask.name}Signature") {
signatureConfiguration.set(fmExt.signMethod)
inputFile.set(archiveTask.flatMap { task -> task.archiveFile })
}
val checksumTask = tasks.register<freemarker.build.ChecksumFileTask>("${archiveTask.name}Checksum") {
inputFile.set(signTask.flatMap(freemarker.build.SignatureTask::inputFile))
}
tasks.named(LifecycleBasePlugin.BUILD_TASK_NAME) {
dependsOn(archiveTask)
dependsOn(checksumTask)
if (fmExt.signMethod.needSignature()) {
dependsOn(signTask)
}
}
}
fun registerCommonFiles(tar: Tar) {
tar.from("README.md") {
filter { content -> content.replace("{version}", fmExt.versionDef.displayVersion) }
}
tar.from(files("NOTICE", "RELEASE-NOTES"))
}
val distBin = tasks.register<Tar>("distBin") {
compression = Compression.GZIP
archiveBaseName.set(distArchiveBaseName)
destinationDirectory.set(distDir)
archiveAppendix.set("bin")
registerCommonFiles(this)
from("src/dist/bin") {
exclude("rat-excludes")
}
val jarFile = tasks.named<Jar>("jar").flatMap { jar -> jar.archiveFile }
from(jarFile) {
rename { _ -> "freemarker.jar" }
}
from(tasks.named("manualOffline")) {
into("documentation/_html")
}
from(tasks.named(JavaPlugin.JAVADOC_TASK_NAME)) {
into("documentation/_html/api")
}
}
registerDistSupportTasks(distBin)
val createBuildInfo = tasks.register("createBuildInfo") {
doLast {
val buildInfoFile = buildInfoFile()
buildInfoFile.parentFile.mkdirs()
val props = Properties().apply {
// see https://reproducible-builds.org/docs/jvm/
setProperty("buildinfo.version", "1.0-SNAPSHOT")
setProperty("java.version", System.getProperty("java.version"))
setProperty("java.vendor", System.getProperty("java.vendor"))
setProperty("os.name", System.getProperty("os.name"))
setProperty("source.scm.uri", "scm:git:https://git-wip-us.apache.org/repos/asf/freemarker.git")
setProperty("source.scm.tag", "v${fmExt.versionDef.version}")
setProperty("build-tool", "gradle")
setProperty("build.setup", "https://github.com/apache/freemarker/blob/2.3-gae/README.md#building-freemarker")
}
FileOutputStream(buildInfoFile).use { outputStream ->
props.store(outputStream, " Build environment information recorded for reproducible builds")
}
}
}
val distSrc = tasks.register<Tar>("distSrc") {
compression = Compression.GZIP
archiveBaseName.set(distArchiveBaseName)
destinationDirectory.set(distDir)
archiveAppendix.set("src")
registerCommonFiles(this)
from(files("LICENSE"))
from(projectDir) {
includeEmptyDirs = false
include(
"src/**",
"*/src/**",
"**/*.kts",
"*.txt",
"osgi.bnd",
"rat-excludes",
"gradlew.bat",
"gradle.properties",
"gradle/**"
)
exclude(
"/build",
"/*/build",
"/gradle/wrapper/gradle-wrapper.jar",
"**/*.bak",
"**/*.~*",
"*/*.*~"
)
}
from(projectDir) {
include(
"gradlew"
)
filePermissions {
unix("rwxr-xr-x")
}
}
dependsOn(createBuildInfo)
from(buildInfoFile())
}
registerDistSupportTasks(distSrc)
fun readExcludeFile(excludeFile: File): List<String> {
Files.lines(excludeFile.toPath()).use { lines ->
return lines
.map { it.trim() }
.filter { !it.startsWith("#") && !it.isEmpty() }
.collect(Collectors.toList())
}
}
tasks.named<org.nosphere.apache.rat.RatTask>("rat") {
inputDir.set(projectDir)
excludes.addAll(readExcludeFile(file("rat-excludes")))
}
fun registerDistRatTask(taskName: String, excludeFile: File, srcArchiveTaskRef: TaskProvider<Tar>) {
val inputTaskName = "${taskName}Prep"
val ratInputTask = tasks.register<Sync>(inputTaskName) {
dependsOn(srcArchiveTaskRef)
destinationDir = layout.buildDirectory.get().asFile.resolve("rat-prep").resolve(taskName)
from(tarTree(srcArchiveTaskRef.flatMap { it.archiveFile }))
}
val ratTask = tasks.register<org.nosphere.apache.rat.RatTask>(taskName) {
dependsOn(ratInputTask)
group = LifecycleBasePlugin.VERIFICATION_GROUP
description = "RAT report for the output of ${srcArchiveTaskRef.name}"
inputDir.set(layout.dir(ratInputTask.map { it.destinationDir }))
excludes.addAll(readExcludeFile(excludeFile))
}
tasks.named(LifecycleBasePlugin.CHECK_TASK_NAME) {
dependsOn(ratTask)
}
}
registerDistRatTask("ratDistBin", file("src/dist/bin/rat-excludes"), distBin)
registerDistRatTask("ratDistSrc", file("rat-excludes"), distSrc)
eclipse {
classpath {
// Eclipse sees only a single classpath,
// so make a best effort for a combined classpath.
plusConfigurations = listOf(
configurations["combinedClasspath"],
configurations["core9CompileClasspath"],
configurations["core16CompileClasspath"],
configurations["testUtilsCompileClasspath"],
configurations["javaxServletTestCompileClasspath"]
)
}
}
val jettyVersion = "9.4.53.v20231009"
val slf4jVersion = "1.6.1"
val springVersion = "5.3.31"
val tagLibsVersion = "1.2.5"
val jakartaJettyVersion = "11.0.19"
val jakartaSpringVersion = "6.1.2"
val jettySlf4jVersion = "2.0.9"
val jettyLogbackClassicVersion = "1.3.14"
configurations {
compileOnly {
exclude(group = "xml-apis", module = "xml-apis")
}
"javaxServletTestImplementation" {
extendsFrom(compileClasspath.get())
// Exclude classes that are also coming from Jetty, which we use for testing:
exclude(group = "javax.servlet.jsp")
exclude(group = "javax.servlet", module = "servlet-api")
exclude(group = "javax.el", module = "el-api")
}
}
dependencies {
val xalan = "xalan:xalan:2.7.0"
compileOnly("jaxen:jaxen:1.0-FCS")
compileOnly("saxpath:saxpath:1.0-FCS")
compileOnly(xalan)
compileOnly("jdom:jdom:1.0b8")
compileOnly("ant:ant:1.6.5") // FIXME: This could be moved to "jython20CompileOnly"
compileOnly("rhino:js:1.6R1")
compileOnly("avalon-logkit:avalon-logkit:2.0")
compileOnly("org.slf4j:slf4j-api:${slf4jVersion}")
compileOnly("org.slf4j:log4j-over-slf4j:${slf4jVersion}")
compileOnly("org.slf4j:jcl-over-slf4j:${slf4jVersion}") // FIXME: This seems to be unused
compileOnly("commons-logging:commons-logging:1.1.1") // FIXME: This seems to be unused
compileOnly("org.zeroturnaround:javarebel-sdk:1.2.2")
compileOnly("org.dom4j:dom4j:2.1.3") {
// Excluding "pull-parser" to avoid test failures due to SAX parser conflict.
exclude(group = "pull-parser", module = "pull-parser")
}
testImplementation(xalan)
"jakartaServletCompileOnly"("jakarta.servlet:jakarta.servlet-api:5.0.0")
"jakartaServletCompileOnly"("jakarta.servlet.jsp:jakarta.servlet.jsp-api:3.0.0")
"jakartaServletCompileOnly"("jakarta.el:jakarta.el-api:4.0.0")
"javaxServletCompileOnly"("javax.servlet:javax.servlet-api:3.0.1")
"javaxServletCompileOnly"("javax.servlet.jsp:jsp-api:2.2")
"javaxServletCompileOnly"("javax.el:el-api:2.2")
"javaxServletTestImplementation"("org.eclipse.jetty:jetty-server:${jettyVersion}")
"javaxServletTestImplementation"("org.eclipse.jetty:jetty-webapp:${jettyVersion}")
"javaxServletTestImplementation"("org.eclipse.jetty:jetty-util:${jettyVersion}")
"javaxServletTestImplementation"("org.eclipse.jetty:apache-jsp:${jettyVersion}")
// Jetty also contains the servlet-api and jsp-api and el-api classes
// JSP JSTL (not included in Jetty):
"javaxServletTestImplementation"("org.apache.taglibs:taglibs-standard-impl:${tagLibsVersion}")
"javaxServletTestImplementation"("org.apache.taglibs:taglibs-standard-spec:${tagLibsVersion}")
"javaxServletTestImplementation"("org.springframework:spring-core:${springVersion}") {
exclude(group = "commons-logging", module = "commons-logging")
}
"javaxServletTestImplementation"("org.springframework:spring-test:${springVersion}") {
exclude(group = "commons-logging", module = "commons-logging")
}
"javaxServletTestImplementation"("org.springframework:spring-web:${springVersion}") {
exclude(group = "commons-logging", module = "commons-logging")
}
"javaxServletTestImplementation"("com.github.hazendaz:displaytag:2.5.3") {
exclude(group = "org.slf4j", module = "slf4j-api")
}
"javaxServletTestRuntimeOnly"("org.slf4j:slf4j-api:${jettySlf4jVersion}")
"javaxServletTestRuntimeOnly"("org.slf4j:log4j-over-slf4j:${jettySlf4jVersion}")
"javaxServletTestRuntimeOnly"("org.slf4j:jcl-over-slf4j:${jettySlf4jVersion}")
"javaxServletTestRuntimeOnly"("ch.qos.logback:logback-classic:${jettyLogbackClassicVersion}")
"jakartaServletTestImplementation"("org.eclipse.jetty:jetty-server:${jakartaJettyVersion}")
"jakartaServletTestImplementation"("org.eclipse.jetty:jetty-annotations:${jakartaJettyVersion}")
"jakartaServletTestImplementation"("org.eclipse.jetty:jetty-webapp:${jakartaJettyVersion}")
"jakartaServletTestImplementation"("org.eclipse.jetty:jetty-util:${jakartaJettyVersion}")
"jakartaServletTestImplementation"("org.eclipse.jetty:apache-jsp:${jakartaJettyVersion}")
// Jetty also contains the servlet-api and jsp-api and el-api classes
"jakartaServletTestImplementation"("jakarta.servlet:jakarta.servlet-api:6.0.0")
"jakartaServletTestImplementation"("jakarta.servlet.jsp:jakarta.servlet.jsp-api:3.0.0")
"jakartaServletTestImplementation"("jakarta.el:jakarta.el-api:4.0.0")
"jakartaServletTestImplementation"("com.github.hazendaz:displaytag:3.0.0-M2")
"jakartaServletTestImplementation"("org.springframework:spring-core:${jakartaSpringVersion}") {
exclude(group = "commons-logging", module = "commons-logging")
}
"jakartaServletTestImplementation"("org.springframework:spring-test:${jakartaSpringVersion}") {
exclude(group = "commons-logging", module = "commons-logging")
}
"jakartaServletTestImplementation"("org.springframework:spring-web:${jakartaSpringVersion}") {
exclude(group = "commons-logging", module = "commons-logging")
}
"jakartaServletTestRuntimeOnly"("org.slf4j:slf4j-api:${jettySlf4jVersion}")
"jakartaServletTestRuntimeOnly"("org.slf4j:log4j-over-slf4j:${jettySlf4jVersion}")
"jakartaServletTestRuntimeOnly"("org.slf4j:jcl-over-slf4j:${jettySlf4jVersion}")
"jakartaServletTestRuntimeOnly"("ch.qos.logback:logback-classic:${jettyLogbackClassicVersion}")
"jython20CompileOnly"("jython:jython:2.1")
"jython22CompileOnly"(sourceSets["jython20"].output)
"jython22CompileOnly"("org.python:jython:2.2.1")
"jython25CompileOnly"(sourceSets["jython20"].output)
"jython25CompileOnly"("org.python:jython:2.5.0")
"testUtilsImplementation"(sourceSets.main.get().output)
"testUtilsImplementation"("com.google.code.findbugs:annotations:3.0.0")
"testUtilsImplementation"(libs.junit)
"testUtilsImplementation"("org.hamcrest:hamcrest-library:1.3")
"testUtilsImplementation"("ch.qos.logback:logback-classic:1.1.2")
"testUtilsImplementation"("commons-io:commons-io:2.7")
"testUtilsImplementation"("com.google.guava:guava:29.0-jre")
"testUtilsImplementation"("commons-collections:commons-collections:3.1")
"testUtilsImplementation"("commons-lang:commons-lang:2.6")
}