|
1 | | -<!-- |
2 | | - Copyright 2017 Google Inc. |
3 | | -
|
4 | | - Licensed under the Apache License, Version 2.0 (the "License"); |
5 | | - you may not use this file except in compliance with the License. |
6 | | - You may obtain a copy of the License at |
7 | | -
|
8 | | - http://www.apache.org/licenses/LICENSE-2.0 |
9 | | -
|
10 | | - Unless required by applicable law or agreed to in writing, software |
11 | | - distributed under the License is distributed on an "AS IS" BASIS, |
12 | | - WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
13 | | - See the License for the specific language governing permissions and |
14 | | - limitations under the License. |
15 | | ---> |
| 1 | +<!-- Copyright 2017 Google Inc. Licensed under the Apache License, Version |
| 2 | + 2.0 (the "License"); you may not use this file except in compliance with |
| 3 | + the License. You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0 |
| 4 | + Unless required by applicable law or agreed to in writing, software distributed |
| 5 | + under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES |
| 6 | + OR CONDITIONS OF ANY KIND, either express or implied. See the License for |
| 7 | + the specific language governing permissions and limitations under the License. --> |
16 | 8 | <project> |
17 | | - <modelVersion>4.0.0</modelVersion> |
18 | | - <packaging>war</packaging> |
19 | | - <version>1.0-SNAPSHOT</version> |
20 | | - <groupId>com.example.flexible</groupId> |
21 | | - <artifactId>flexible-postgres</artifactId> |
| 9 | + <modelVersion>4.0.0</modelVersion> |
| 10 | + <packaging>war</packaging> |
| 11 | + <version>1.0-SNAPSHOT</version> |
| 12 | + <groupId>com.example.flexible</groupId> |
| 13 | + <artifactId>flexible-postgres</artifactId> |
22 | 14 |
|
23 | | - <parent> |
24 | | - <artifactId>appengine-flexible</artifactId> |
25 | | - <groupId>com.google.cloud</groupId> |
26 | | - <version>1.0.0</version> |
27 | | - <relativePath>..</relativePath> |
28 | | - </parent> |
| 15 | + <parent> |
| 16 | + <artifactId>appengine-flexible</artifactId> |
| 17 | + <groupId>com.google.cloud</groupId> |
| 18 | + <version>1.0.0</version> |
| 19 | + <relativePath>..</relativePath> |
| 20 | + </parent> |
29 | 21 |
|
30 | | -<!-- [START properties] --> |
31 | | - <properties> |
32 | | -<!-- |
33 | | - INSTANCE_CONNECTION_NAME from Cloud Console > SQL > Instance Details > Properties |
34 | | - or `gcloud sql instances describe <instance> | grep connectionName` |
35 | | ---> |
36 | | - <INSTANCE_CONNECTION_NAME>Project:Region:Instance</INSTANCE_CONNECTION_NAME> |
37 | | - <user>root</user> |
38 | | - <password>myPassword</password> |
39 | | - <database>sqldemo</database> |
40 | | -<!-- [START_EXCLUDE silent] --> |
41 | | - <maven.compiler.target>1.8</maven.compiler.target> |
42 | | - <maven.compiler.source>1.8</maven.compiler.source> |
| 22 | + <!-- [START properties] --> |
| 23 | + <properties> |
| 24 | + <!-- INSTANCE_CONNECTION_NAME from Cloud Console > SQL > Instance Details |
| 25 | + > Properties or `gcloud sql instances describe <instance> | grep connectionName` --> |
| 26 | + <INSTANCE_CONNECTION_NAME>newagent-25039:asia-northeast1:la</INSTANCE_CONNECTION_NAME> |
| 27 | + <user>postgres</user> |
| 28 | + <password>la123456</password> |
| 29 | + <database>la</database> |
| 30 | + <sqlURL>jdbc:postgresql://google/${database}?useSSL=false&socketFactoryArg=${INSTANCE_CONNECTION_NAME}&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=${user}&password=${password}</sqlURL> |
| 31 | + <!-- [START_EXCLUDE silent] --> |
| 32 | + <maven.compiler.target>1.8</maven.compiler.target> |
| 33 | + <maven.compiler.source>1.8</maven.compiler.source> |
43 | 34 |
|
44 | | - <failOnMissingWebXml>false</failOnMissingWebXml> <!-- REQUIRED --> |
| 35 | + <failOnMissingWebXml>false</failOnMissingWebXml> <!-- REQUIRED --> |
45 | 36 |
|
46 | | - <jetty>9.4.4.v20170414</jetty> |
47 | | -<!-- [END_EXCLUDE] --> |
48 | | - <sqlURL>jdbc:postgresql://google/${database}?useSSL=false&socketFactoryArg=${INSTANCE_CONNECTION_NAME}&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=${user}&password=${password}</sqlURL> |
49 | | - </properties> |
50 | | -<!-- [END properties] --> |
| 37 | + <jetty>9.4.4.v20170414</jetty> |
| 38 | + <!-- [END_EXCLUDE] --> |
| 39 | + <sqlURL>jdbc:postgresql://google/${database}?useSSL=false&socketFactoryArg=${INSTANCE_CONNECTION_NAME}&socketFactory=com.google.cloud.sql.postgres.SocketFactory&user=${user}&password=${password}</sqlURL> |
| 40 | + </properties> |
| 41 | + <!-- [END properties] --> |
51 | 42 |
|
52 | | - <dependencies> |
53 | | - <dependency> |
54 | | - <groupId>com.google.api-client</groupId> |
55 | | - <artifactId>google-api-client</artifactId> |
56 | | - <version>1.23.0</version> |
57 | | - </dependency> |
58 | | - <dependency> |
59 | | - <groupId>com.google.api-client</groupId> |
60 | | - <artifactId>google-api-client-appengine</artifactId> |
61 | | - <version>1.23.0</version> |
62 | | - </dependency> |
63 | | - <dependency> |
64 | | - <groupId>com.google.api-client</groupId> |
65 | | - <artifactId>google-api-client-servlet</artifactId> |
66 | | - <version>1.23.0</version> |
67 | | - </dependency> |
68 | | - <dependency> |
69 | | - <groupId>javax.servlet</groupId> |
70 | | - <artifactId>javax.servlet-api</artifactId> |
71 | | - <version>3.1.0</version> |
72 | | - <type>jar</type> |
73 | | - <scope>provided</scope> |
74 | | - </dependency> |
75 | | - <!-- [START dependencies] --> |
76 | | - <dependency> |
77 | | - <groupId>org.postgresql</groupId> |
78 | | - <artifactId>postgresql</artifactId> |
79 | | - <version>42.1.4.jre7</version> |
80 | | - </dependency> |
| 43 | + <dependencies> |
| 44 | + <dependency> |
| 45 | + <groupId>com.google.api-client</groupId> |
| 46 | + <artifactId>google-api-client</artifactId> |
| 47 | + <version>1.23.0</version> |
| 48 | + </dependency> |
| 49 | + <dependency> |
| 50 | + <groupId>com.google.api-client</groupId> |
| 51 | + <artifactId>google-api-client-appengine</artifactId> |
| 52 | + <version>1.23.0</version> |
| 53 | + </dependency> |
| 54 | + <dependency> |
| 55 | + <groupId>com.google.api-client</groupId> |
| 56 | + <artifactId>google-api-client-servlet</artifactId> |
| 57 | + <version>1.23.0</version> |
| 58 | + </dependency> |
| 59 | + <dependency> |
| 60 | + <groupId>javax.servlet</groupId> |
| 61 | + <artifactId>javax.servlet-api</artifactId> |
| 62 | + <version>3.1.0</version> |
| 63 | + <type>jar</type> |
| 64 | + <scope>provided</scope> |
| 65 | + </dependency> |
| 66 | + <!-- [START dependencies] --> |
| 67 | + <dependency> |
| 68 | + <groupId>org.postgresql</groupId> |
| 69 | + <artifactId>postgresql</artifactId> |
| 70 | + <version>42.1.4.jre7</version> |
| 71 | + </dependency> |
81 | 72 |
|
82 | | - <dependency> |
83 | | - <groupId>com.google.cloud.sql</groupId> |
84 | | - <artifactId>postgres-socket-factory</artifactId> |
85 | | - <version>1.0.4</version> |
86 | | - </dependency> |
87 | | - <!-- [END dependencies] --> |
88 | | - </dependencies> |
89 | | - <build> |
90 | | - <resources> |
91 | | - <resource> |
92 | | - <directory>src/main/resources</directory> |
93 | | - <filtering>true</filtering> |
94 | | - </resource> |
95 | | - </resources> |
96 | | - <!-- for hot reload of the web application --> |
97 | | - <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory> |
98 | | - <plugins> |
| 73 | + <dependency> |
| 74 | + <groupId>com.google.cloud.sql</groupId> |
| 75 | + <artifactId>postgres-socket-factory</artifactId> |
| 76 | + <version>1.0.4</version> |
| 77 | + </dependency> |
| 78 | + <!-- [END dependencies] --> |
| 79 | + </dependencies> |
| 80 | + <build> |
| 81 | + <resources> |
| 82 | + <resource> |
| 83 | + <directory>src/main/resources</directory> |
| 84 | + <filtering>true</filtering> |
| 85 | + </resource> |
| 86 | + </resources> |
| 87 | + <!-- for hot reload of the web application --> |
| 88 | + <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory> |
| 89 | + <plugins> |
99 | 90 |
|
100 | | - <plugin> |
101 | | - <groupId>com.google.cloud.tools</groupId> |
102 | | - <artifactId>appengine-maven-plugin</artifactId> |
103 | | - <version>1.3.1</version> |
104 | | - </plugin> |
| 91 | + <plugin> |
| 92 | + <groupId>com.google.cloud.tools</groupId> |
| 93 | + <artifactId>appengine-maven-plugin</artifactId> |
| 94 | + <version>1.3.1</version> |
| 95 | + </plugin> |
105 | 96 |
|
106 | | - <plugin> |
107 | | - <groupId>org.eclipse.jetty</groupId> |
108 | | - <artifactId>jetty-maven-plugin</artifactId> |
109 | | - <version>${jetty}</version> |
110 | | - </plugin> |
111 | | - </plugins> |
112 | | - </build> |
| 97 | + <plugin> |
| 98 | + <groupId>org.eclipse.jetty</groupId> |
| 99 | + <artifactId>jetty-maven-plugin</artifactId> |
| 100 | + <version>${jetty}</version> |
| 101 | + </plugin> |
| 102 | + </plugins> |
| 103 | + </build> |
113 | 104 | </project> |
0 commit comments