-
Notifications
You must be signed in to change notification settings - Fork 1
/
build.gradle
77 lines (67 loc) · 2.1 KB
/
build.gradle
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
buildscript {
repositories {
jcenter()
}
dependencies {
classpath 'com.bmuschko:gradle-tomcat-plugin:2.5'
}
}
repositories {
jcenter()
mavenCentral()
}
apply plugin: 'java'
apply plugin: 'war'
apply plugin: 'eclipse-wtp'
apply plugin: 'com.bmuschko.tomcat'
description 'JSF Java web application with Eclipse'
project.webAppDirName = 'src/main/WebContent'
defaultTasks 'clean', 'war', 'tomcatRun'
dependencies {
compile group: 'org.slf4j', name: 'slf4j-api', version: '1.7.26'
compile group: 'ch.qos.logback', name: 'logback-classic', version: '1.2.3'
testCompile group: 'junit', name: 'junit', version: '4.12'
compile 'com.sun.faces:jsf-api:2.2.18'
compile 'com.sun.faces:jsf-impl:2.2.18'
compile 'javax.servlet:jstl:1.2'
compile 'org.jboss.weld.servlet:weld-servlet-shaded:3.1.0.Final'
providedCompile 'javax.servlet:servlet-api:2.5'
def tomcatVersion = '9.0.16'
tomcat "org.apache.tomcat.embed:tomcat-embed-core:${tomcatVersion}",
"org.apache.tomcat.embed:tomcat-embed-logging-juli:9.0.0.M6",
"org.apache.tomcat.embed:tomcat-embed-jasper:${tomcatVersion}"
}
wrapper {
gradleVersion = '5.2.1'
}
tasks.withType(JavaCompile) {
sourceCompatibility = JavaVersion.VERSION_1_8
targetCompatibility = sourceCompatibility
options.debugOptions.debugLevel = 'lines,vars,source'
options.encoding = java.nio.charset.StandardCharsets.UTF_8
options.warnings = true
options.deprecation = true
options.compilerArgs += ['-Xlint:all', '-Werror']
}
eclipse {
jdt {
sourceCompatibility=1.8
targetCompatibility=1.8
}
wtp {
// https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.eclipse.model.EclipseWtpComponent.html
component {
contextPath = 'jsfdemo'
}
// https://docs.gradle.org/current/dsl/org.gradle.plugins.ide.eclipse.model.EclipseWtpFacet.html
facet {
facet name: 'jst.java', version: '1.8'
facet name: 'jst.web', version: '3.0'
}
}
}
tomcat {
httpProtocol = 'org.apache.coyote.http11.Http11Nio2Protocol'
ajpProtocol = 'org.apache.coyote.ajp.AjpNio2Protocol'
httpPort = 8081
}