@@ -31,151 +31,133 @@ limitations under the License.
3131 </parent >
3232
3333 <properties >
34+ <maven .compiler.target>11</maven .compiler.target>
35+ <maven .compiler.source>11</maven .compiler.source>
36+ <ktor_version >2.0.0</ktor_version >
3437 <kotlin .code.style>official</kotlin .code.style>
38+ <kotlin_version >1.6.21</kotlin_version >
39+ <logback_version >1.2.3</logback_version >
3540 <project .build.sourceEncoding>UTF-8</project .build.sourceEncoding>
3641 <kotlin .compiler.incremental>true</kotlin .compiler.incremental>
37- <main .class>io.ktor.server.netty.EngineMain</main .class>
38- <maven .compiler.target>11</maven .compiler.target>
39- <maven .compiler.source>11</maven .compiler.source>
42+ <main .class>com.example.appengine.ApplicationKt</main .class>
4043 </properties >
4144
4245 <repositories >
4346 <repository >
44- <id >repo1</id >
45- <url >https://jcenter.bintray.com</url >
46- <releases ><enabled >true</enabled ></releases >
47- <snapshots ><enabled >false</enabled ></snapshots >
48- </repository >
49- <repository >
50- <id >repo2</id >
51- <url >https://kotlin.bintray.com/ktor</url >
52- <releases ><enabled >true</enabled ></releases >
53- <snapshots ><enabled >false</enabled ></snapshots >
47+ <id >ktor_eap</id >
48+ <url >https://maven.pkg.jetbrains.space/public/p/ktor/eap</url >
49+ <releases >
50+ <enabled >true</enabled >
51+ </releases >
52+ <snapshots >
53+ <enabled >true</enabled >
54+ </snapshots >
5455 </repository >
5556 </repositories >
5657
57- <dependencyManagement >
58- <dependencies >
59- <dependency >
60- <groupId >io.ktor</groupId >
61- <artifactId >ktor-bom</artifactId >
62- <version >1.6.8</version >
63- <type >pom</type >
64- <scope >import</scope >
65- </dependency >
66- </dependencies >
67- </dependencyManagement >
68-
6958 <dependencies >
7059 <dependency >
71- <groupId >org.jetbrains.kotlin</groupId >
72- <artifactId >kotlin-stdlib-jdk8</artifactId >
73- <version >1.6.21</version >
74- </dependency >
75- <dependency >
76- <groupId >io.ktor</groupId >
77- <artifactId >ktor-server-netty</artifactId >
78- </dependency >
79- <dependency >
80- <groupId >ch.qos.logback</groupId >
81- <artifactId >logback-classic</artifactId >
82- <version >1.3.0-alpha11</version >
60+ <groupId >io.ktor</groupId >
61+ <artifactId >ktor-server-core-jvm</artifactId >
62+ <version >${ktor_version} </version >
8363 </dependency >
8464 <dependency >
85- <groupId >io.ktor</groupId >
86- <artifactId >ktor-server-core</artifactId >
65+ <groupId >io.ktor</groupId >
66+ <artifactId >ktor-server-netty-jvm</artifactId >
67+ <version >${ktor_version} </version >
8768 </dependency >
8869 <dependency >
89- <groupId >io.ktor</groupId >
90- <artifactId >ktor-server-host-common</artifactId >
70+ <groupId >ch.qos.logback</groupId >
71+ <artifactId >logback-classic</artifactId >
72+ <version >${logback_version} </version >
9173 </dependency >
9274 <dependency >
93- <groupId >io.ktor</groupId >
94- <artifactId >ktor-server-tests</artifactId >
95- <scope >test</scope >
75+ <groupId >io.ktor</groupId >
76+ <artifactId >ktor-server-tests-jvm</artifactId >
77+ <version >${ktor_version} </version >
78+ <scope >test</scope >
9679 </dependency >
9780 <dependency >
98- <groupId >org.jetbrains.kotlin</groupId >
99- <artifactId >kotlin-test-junit</artifactId >
100- <version >1.6.21 </version >
101- <scope >test</scope >
81+ <groupId >org.jetbrains.kotlin</groupId >
82+ <artifactId >kotlin-test-junit</artifactId >
83+ <version >${kotlin_version} </version >
84+ <scope >test</scope >
10285 </dependency >
103-
104- </dependencies >
105-
106- <build >
107- <sourceDirectory >${project.basedir} /src</sourceDirectory >
108- <testSourceDirectory >${project.basedir} /test</testSourceDirectory >
86+ </dependencies >
87+ <build >
88+ <sourceDirectory >${project.basedir} /src/main/kotlin</sourceDirectory >
89+ <testSourceDirectory >${project.basedir} /src/test/kotlin</testSourceDirectory >
10990 <resources >
110- <resource >
111- <directory >${project.basedir} /resources</directory >
112- </resource >
91+ <resource >
92+ <directory >${project.basedir} /src/main /resources</directory >
93+ </resource >
11394 </resources >
95+
11496 <plugins >
115- <plugin >
116- <groupId >org.apache.maven.plugins</groupId >
117- <artifactId >maven-surefire-plugin</artifactId >
118- </plugin >
119- <plugin >
120- <artifactId >maven-compiler-plugin</artifactId >
121- <configuration ><source >1.8</source ><target >1.8</target ></configuration >
122- </plugin >
123- <plugin >
124- <artifactId >kotlin-maven-plugin</artifactId >
125- <groupId >org.jetbrains.kotlin</groupId >
126- <version >1.6.21</version >
127- <executions >
128- <execution >
129- <id >compile</id >
130- <goals ><goal >compile</goal ></goals >
97+ <plugin >
98+ <artifactId >kotlin-maven-plugin</artifactId >
99+ <groupId >org.jetbrains.kotlin</groupId >
100+ <version >${kotlin_version} </version >
131101 <configuration >
132- < experimentalCoroutines >enable</ experimentalCoroutines >
102+ < jvmTarget >1.8</ jvmTarget >
133103 </configuration >
134- </execution >
135- <execution >
136- <id >test-compile</id >
137- <goals ><goal >test-compile</goal ></goals >
104+ <executions >
105+ <execution >
106+ <id >compile</id >
107+ <phase >compile</phase >
108+ <goals >
109+ <goal >compile</goal >
110+ </goals >
111+ </execution >
112+ <execution >
113+ <id >test-compile</id >
114+ <phase >test-compile</phase >
115+ <goals >
116+ <goal >test-compile</goal >
117+ </goals >
118+ </execution >
119+ </executions >
120+ </plugin >
121+ <plugin >
122+ <groupId >org.codehaus.mojo</groupId >
123+ <artifactId >exec-maven-plugin</artifactId >
124+ <version >1.2.1</version >
125+ <executions >
126+ <execution >
127+ <goals >
128+ <goal >java</goal >
129+ </goals >
130+ </execution >
131+ </executions >
138132 <configuration >
139- < experimentalCoroutines >enable</ experimentalCoroutines >
133+ < mainClass > ${main.class} </ mainClass >
140134 </configuration >
141- </execution >
142- </executions >
143- </plugin >
144- <plugin >
145- <groupId >org.apache.maven.plugins</groupId >
146- <artifactId >maven-jar-plugin</artifactId >
147- <version >3.2.2</version >
148- <configuration >
149- <archive >
150- <manifest >
151- <addClasspath >true</addClasspath >
152- <mainClass >${main.class} </mainClass >
153- </manifest >
154- </archive >
155- </configuration >
156- </plugin >
157- <plugin >
158- <groupId >org.apache.maven.plugins</groupId >
159- <artifactId >maven-assembly-plugin</artifactId >
160- <version >3.3.0</version >
161- <executions >
162- <execution >
163- <id >make-assembly</id >
164- <phase >package</phase >
165- <goals > <goal >single</goal > </goals >
135+ </plugin >
136+ <plugin >
137+ <groupId >org.apache.maven.plugins</groupId >
138+ <artifactId >maven-assembly-plugin</artifactId >
139+ <version >2.6</version >
166140 <configuration >
167- <archive >
168- <manifest >
169- <mainClass >${main.class} </mainClass >
170- </manifest >
171- </archive >
172- <descriptorRefs >
173- <descriptorRef >jar-with-dependencies</descriptorRef >
174- </descriptorRefs >
141+ <descriptorRefs >
142+ <descriptorRef >jar-with-dependencies</descriptorRef >
143+ </descriptorRefs >
144+ <archive >
145+ <manifest >
146+ <addClasspath >true</addClasspath >
147+ <mainClass >${main.class} </mainClass >
148+ </manifest >
149+ </archive >
175150 </configuration >
176- </execution >
177- </executions >
178- </plugin >
151+ <executions >
152+ <execution >
153+ <id >assemble-all</id >
154+ <phase >package</phase >
155+ <goals >
156+ <goal >single</goal >
157+ </goals >
158+ </execution >
159+ </executions >
160+ </plugin >
179161 <!-- Add App Engine plugin -->
180162 <plugin >
181163 <groupId >com.google.cloud.tools</groupId >
0 commit comments