|
| 1 | +<?xml version="1.0" encoding="UTF-8"?> |
| 2 | +<!-- |
| 3 | +Copyright 2019 Google LLC |
| 4 | +
|
| 5 | +Licensed under the Apache License, Version 2.0 (the "License"); |
| 6 | +you may not use this file except in compliance with the License. |
| 7 | +You may obtain a copy of the License at |
| 8 | +
|
| 9 | + http://www.apache.org/licenses/LICENSE-2.0 |
| 10 | +
|
| 11 | +Unless required by applicable law or agreed to in writing, software |
| 12 | +distributed under the License is distributed on an "AS IS" BASIS, |
| 13 | +WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 14 | +See the License for the specific language governing permissions and |
| 15 | +limitations under the License. |
| 16 | +--> |
| 17 | +<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 http://maven.apache.org/xsd/maven-4.0.0.xsd"> |
| 18 | + <modelVersion>4.0.0</modelVersion> |
| 19 | + <groupId>com.example.appengine</groupId> |
| 20 | + <artifactId>kotlin-ktor</artifactId> |
| 21 | + <version>0.0.1</version> |
| 22 | + |
| 23 | + <!-- |
| 24 | + The parent pom defines common style checks and testing strategies for our samples. |
| 25 | + Removing or replacing it should not affect the execution of the samples in anyway. |
| 26 | + --> |
| 27 | + <parent> |
| 28 | + <groupId>com.google.cloud.samples</groupId> |
| 29 | + <artifactId>shared-configuration</artifactId> |
| 30 | + <version>1.0.11</version> |
| 31 | + </parent> |
| 32 | + |
| 33 | + <properties> |
| 34 | + <kotlin.code.style>official</kotlin.code.style> |
| 35 | + <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
| 36 | + <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> |
| 40 | + </properties> |
| 41 | + |
| 42 | + <repositories> |
| 43 | + <repository> |
| 44 | + <id>repo1</id> |
| 45 | + <url>https://jcenter.bintray.com</url> |
| 46 | + <releases><enabled>true</enabled></releases> |
| 47 | + <snapshots><enabled>true</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>true</enabled></snapshots> |
| 54 | + </repository> |
| 55 | + </repositories> |
| 56 | + |
| 57 | + <dependencies> |
| 58 | + <dependency> |
| 59 | + <groupId>org.jetbrains.kotlin</groupId> |
| 60 | + <artifactId>kotlin-stdlib-jdk8</artifactId> |
| 61 | + <version>1.3.30</version> |
| 62 | + </dependency> |
| 63 | + <dependency> |
| 64 | + <groupId>io.ktor</groupId> |
| 65 | + <artifactId>ktor-server-netty</artifactId> |
| 66 | + <version>1.1.3</version> |
| 67 | + </dependency> |
| 68 | + <dependency> |
| 69 | + <groupId>ch.qos.logback</groupId> |
| 70 | + <artifactId>logback-classic</artifactId> |
| 71 | + <version>1.2.3</version> |
| 72 | + </dependency> |
| 73 | + <dependency> |
| 74 | + <groupId>io.ktor</groupId> |
| 75 | + <artifactId>ktor-server-core</artifactId> |
| 76 | + <version>1.1.3</version> |
| 77 | + </dependency> |
| 78 | + <dependency> |
| 79 | + <groupId>io.ktor</groupId> |
| 80 | + <artifactId>ktor-server-host-common</artifactId> |
| 81 | + <version>1.1.3</version> |
| 82 | + </dependency> |
| 83 | + <dependency> |
| 84 | + <groupId>io.ktor</groupId> |
| 85 | + <artifactId>ktor-server-tests</artifactId> |
| 86 | + <version>1.1.3</version> |
| 87 | + <scope>test</scope> |
| 88 | + </dependency> |
| 89 | + </dependencies> |
| 90 | + |
| 91 | + <build> |
| 92 | + <sourceDirectory>${project.basedir}/src</sourceDirectory> |
| 93 | + <testSourceDirectory>${project.basedir}/test</testSourceDirectory> |
| 94 | + <resources> |
| 95 | + <resource> |
| 96 | + <directory>${project.basedir}/resources</directory> |
| 97 | + </resource> |
| 98 | + </resources> |
| 99 | + <plugins> |
| 100 | + <plugin> |
| 101 | + <groupId>org.apache.maven.plugins</groupId> |
| 102 | + <artifactId>maven-surefire-plugin</artifactId> |
| 103 | + </plugin> |
| 104 | + <plugin> |
| 105 | + <artifactId>maven-compiler-plugin</artifactId> |
| 106 | + <configuration><source>1.8</source><target>1.8</target></configuration> |
| 107 | + </plugin> |
| 108 | + <plugin> |
| 109 | + <artifactId>kotlin-maven-plugin</artifactId> |
| 110 | + <groupId>org.jetbrains.kotlin</groupId> |
| 111 | + <version>1.3.30</version> |
| 112 | + <executions> |
| 113 | + <execution> |
| 114 | + <id>compile</id> |
| 115 | + <goals><goal>compile</goal></goals> |
| 116 | + <configuration> |
| 117 | + <experimentalCoroutines>enable</experimentalCoroutines> |
| 118 | + </configuration> |
| 119 | + </execution> |
| 120 | + <execution> |
| 121 | + <id>test-compile</id> |
| 122 | + <goals><goal>test-compile</goal></goals> |
| 123 | + <configuration> |
| 124 | + <experimentalCoroutines>enable</experimentalCoroutines> |
| 125 | + </configuration> |
| 126 | + </execution> |
| 127 | + </executions> |
| 128 | + </plugin> |
| 129 | + <plugin> |
| 130 | + <groupId>org.apache.maven.plugins</groupId> |
| 131 | + <artifactId>maven-jar-plugin</artifactId> |
| 132 | + <version>2.6</version> |
| 133 | + <configuration> |
| 134 | + <archive> |
| 135 | + <manifest> |
| 136 | + <addClasspath>true</addClasspath> |
| 137 | + <mainClass>${main.class}</mainClass> |
| 138 | + </manifest> |
| 139 | + </archive> |
| 140 | + </configuration> |
| 141 | + </plugin> |
| 142 | + <plugin> |
| 143 | + <groupId>org.apache.maven.plugins</groupId> |
| 144 | + <artifactId>maven-assembly-plugin</artifactId> |
| 145 | + <version>2.6</version> |
| 146 | + <executions> |
| 147 | + <execution> |
| 148 | + <id>make-assembly</id> |
| 149 | + <phase>package</phase> |
| 150 | + <goals> <goal>single</goal> </goals> |
| 151 | + <configuration> |
| 152 | + <archive> |
| 153 | + <manifest> |
| 154 | + <mainClass>${main.class}</mainClass> |
| 155 | + </manifest> |
| 156 | + </archive> |
| 157 | + <descriptorRefs> |
| 158 | + <descriptorRef>jar-with-dependencies</descriptorRef> |
| 159 | + </descriptorRefs> |
| 160 | + </configuration> |
| 161 | + </execution> |
| 162 | + </executions> |
| 163 | + </plugin> |
| 164 | + <!-- Add App Engine plugin --> |
| 165 | + <plugin> |
| 166 | + <groupId>com.google.cloud.tools</groupId> |
| 167 | + <artifactId>appengine-maven-plugin</artifactId> |
| 168 | + <version>2.0.0-rc6</version> |
| 169 | + <configuration> |
| 170 | + <version>kotlin-ktor</version> |
| 171 | + <!-- Ktor generator moved from Maven convention of src/main/* to simply th top level project directory --> |
| 172 | + <appEngineDirectory>./</appEngineDirectory> |
| 173 | + <!-- Tell App Engine plugin to use the Fat JAR with all of the dependencies --> |
| 174 | + <artifact>${project.build.directory}/${project.build.finalName}-jar-with-dependencies.jar</artifact> |
| 175 | + </configuration> |
| 176 | + </plugin> |
| 177 | + </plugins> |
| 178 | + </build> |
| 179 | +</project> |
0 commit comments