-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathee8-jetty.xml
More file actions
160 lines (154 loc) · 6.76 KB
/
ee8-jetty.xml
File metadata and controls
160 lines (154 loc) · 6.76 KB
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
<?xml version="1.0" encoding="UTF-8"?>
<project xmlns="http://maven.apache.org/POM/4.0.0"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 https://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!--
Jetty 12 부터는 groupId와 artifactId가 바뀌어서 따로 별도 설정 pom을 분리했음.
ee8 버전을 사용하면 Jetty 12에서도 Servlet 4를 사용할 수 있음.
-->
<parent>
<groupId>org.fp024</groupId>
<artifactId>study-dependencies-parent</artifactId>
<version>1.0.0-BUILD-SNAPSHOT</version>
<relativePath>pom.xml</relativePath>
</parent>
<artifactId>study-dependencies-parent-with-ee8-jetty</artifactId>
<name>${project.artifactId}</name>
<packaging>pom</packaging>
<properties>
<jetty.version>${jetty12.version}</jetty.version>
</properties>
<profiles>
<!-- Jetty 기본 웹 애플리케이션 실행 -->
<profile>
<id>jetty-run</id>
<!--
여기서 activeByDefault를 true 지정해버리면 이 프로필에 속한 properties가 무조건 우선 된다.
상위의 tomcat-run 프로필을 설정해서 실행하더라도 jstl-scope.type 속성 값이 provided로 덮어씌어 져버림.
혼란 방지를 위해 설정 제거해놔야겠다.
그래도 불편한 점이 생기긴함.. jetty 실행시 프로필을 꼭 지정해야함.
-->
<!--
<activation>
<activeByDefault>true</activeByDefault>
</activation>
-->
<properties>
<jstl-scope.type>compile</jstl-scope.type>
</properties>
<build>
<plugins>
<!-- Jetty 서버 구동 -->
<!-- 도움말 자세히보기: mvnw jetty:help -Ddetail=true -Dgoal=run -->
<plugin>
<!-- https://eclipse.dev/jetty/documentation/jetty-12/programming-guide/index.html#jetty-maven-plugin -->
<!-- 문서에는 언급이 따로 없음. -->
<!-- https://eclipse.dev/jetty/documentation/jetty-12/programming-guide/index.html#pg-migration-11-to-12 -->
<!-- 여기서는 가이드가 있긴한데.. 여전히 groupId가 잘못된 것 같은데...😅
org.eclipse.jetty.ee{8,9,10}:jetty-ee{8,9,10}-jetty-maven-plugin 가 아니고,
org.eclipse.jetty.ee{8,9,10}:jetty-ee{8,9,10}-maven-plugin 가 되야하는 것이 아닌지?
-->
<groupId>org.eclipse.jetty.ee8</groupId>
<artifactId>jetty-ee8-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<httpConnector>
<!--host>localhost</host-->
<port>${jetty.port}</port>
</httpConnector>
<webApp>
<contextPath>${jetty-context-path}</contextPath>
<descriptor>${web-xml-location}</descriptor>
<sessionHandler>
<sessionIdPathParameterName>none</sessionIdPathParameterName>
</sessionHandler>
</webApp>
<deployMode>EMBED</deployMode>
<stopKey>CTRL+C</stopKey>
<stopPort>8999</stopPort>
<!-- 9.x 설정: <scanIntervalSeconds> 대신 <scan> 사용 -->
<!--
변경 감지 자동 재시작시 ContextLoaderListener가 제대로 실행되지 않는 오류가 발생한다.
설정을 -1로하여 자동 재시작이 일어나지 않도록 한다.
-->
<scan>${jetty-auto-deploy-seconds}</scan>
<scanTargetPatterns>
<scanTargetPattern>
<directory>src/main/webapp/WEB-INF</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<excludes>
<exclude>**/*.jsp</exclude>
</excludes>
</scanTargetPattern>
</scanTargetPatterns>
</configuration>
</plugin>
</plugins>
</build>
</profile>
<!-- Jetty - Scouter를 활성화하여 웹 애플리케이션 실행 -->
<profile>
<id>jetty-run-with-scouter</id>
<properties>
<jstl-scope.type>provided</jstl-scope.type>
</properties>
<build>
<plugins>
<!-- Jetty 서버 구동 -->
<!-- 도움말 자세히보기: mvnw jetty:help -Ddetail=true -Dgoal=run -->
<plugin>
<!-- https://www.eclipse.org/jetty/documentation/jetty-10/programming-guide/index.html#jetty-maven-plugin -->
<groupId>org.eclipse.jetty.ee8</groupId>
<artifactId>jetty-ee8-maven-plugin</artifactId>
<version>${jetty.version}</version>
<configuration>
<httpConnector>
<!--host>localhost</host-->
<port>${jetty.port}</port>
</httpConnector>
<!-- jvmArgs는 FORK 모드에서만 동작한다. -->
<jvmArgs><!--
-->-javaagent:${scouter.agent.lib} <!--
-->--add-opens=java.base/java.lang=ALL-UNNAMED <!--
-->-Djdk.attach.allowAttachSelf=true <!--
-->-Dscouter.config=${project.basedir}/../../${scouter.config.file} <!--
--></jvmArgs>
<webApp>
<contextPath>${jetty-context-path}</contextPath>
<descriptor>${web-xml-location}</descriptor>
<sessionHandler>
<sessionIdPathParameterName>none</sessionIdPathParameterName>
</sessionHandler>
</webApp>
<deployMode>FORK</deployMode>
<stopKey>CTRL+C</stopKey>
<stopPort>8999</stopPort>
<!-- 9.x 설정: <scanIntervalSeconds> 대신 <scan> 사용 -->
<!--
변경 감지 자동 재시작시 ContextLoaderListener가 제대로 실행되지 않는 오류가 발생한다.
설정을 -1로하여 자동 재시작이 일어나지 않도록 한다.
-->
<scan>${jetty-auto-deploy-seconds}</scan>
<scanTargetPatterns>
<scanTargetPattern>
<directory>src/main/webapp/WEB-INF</directory>
<includes>
<include>**/*.properties</include>
<include>**/*.xml</include>
</includes>
<excludes>
<exclude>**/*.jsp</exclude>
</excludes>
</scanTargetPattern>
</scanTargetPatterns>
</configuration>
</plugin>
</plugins>
</build>
</profile>
</profiles>
</project>