|
1 | 1 | <!--
|
2 |
| - Copyright 2016 Google Inc. All Rights Reserved. |
| 2 | + Copyright 2016 Google Inc. |
3 | 3 |
|
4 | 4 | Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | you may not use this file except in compliance with the License.
|
|
27 | 27 | <relativePath>../..</relativePath>
|
28 | 28 | </parent>
|
29 | 29 |
|
| 30 | +<!-- [START properties] --> |
30 | 31 | <properties>
|
| 32 | +<!-- INSTANCE_CONNECTION_NAME from Cloud Console > SQL > Instance Details > Properties |
| 33 | + or `gcloud sql instances describe <instance> | grep connectionName` |
| 34 | + project:region:instance for Cloud SQL 2nd Generation |
| 35 | +--> |
| 36 | + <INSTANCE_CONNECTION_NAME></INSTANCE_CONNECTION_NAME> |
| 37 | + <user>root</user> |
| 38 | + <password></password> |
| 39 | + <database>sqldemo</database> |
| 40 | +<!-- [START_EXCLUDE] --> |
31 | 41 | <maven.compiler.target>1.8</maven.compiler.target>
|
32 | 42 | <maven.compiler.source>1.8</maven.compiler.source>
|
33 | 43 |
|
34 | 44 | <appengine.maven.plugin>1.0.0</appengine.maven.plugin>
|
35 | 45 | <jetty.maven.plugin>9.3.8.v20160314</jetty.maven.plugin>
|
36 | 46 |
|
37 | 47 | <failOnMissingWebXml>false</failOnMissingWebXml> <!-- REQUIRED -->
|
| 48 | +<!-- [END_EXCLUDE] --> |
| 49 | + <sqlURL>jdbc:mysql://google/${database}?cloudSqlInstance=${INSTANCE_CONNECTION_NAME}&socketFactory=com.google.cloud.sql.mysql.SocketFactory&user=${user}&password=${password}&useSSL=false</sqlURL> |
38 | 50 | </properties>
|
| 51 | +<!-- [END properties] --> |
39 | 52 |
|
40 | 53 | <dependencies>
|
41 | 54 | <dependency>
|
|
46 | 59 | <scope>provided</scope>
|
47 | 60 | </dependency>
|
48 | 61 | <!-- [START dependencies] -->
|
| 62 | + <dependency> <!-- http://dev.mysql.com/doc/connector-j/en/ --> |
| 63 | + <groupId>mysql</groupId> |
| 64 | + <artifactId>mysql-connector-java</artifactId> |
| 65 | + <version>6.0.5</version> |
| 66 | + </dependency> |
49 | 67 | <dependency>
|
50 | 68 | <groupId>com.google.cloud.sql</groupId>
|
51 |
| - <artifactId>mysql-socket-factory</artifactId> |
| 69 | + <artifactId>mysql-socket-factory-connector-j-6</artifactId> |
52 | 70 | <version>1.0.2</version>
|
53 | 71 | </dependency>
|
54 | 72 | <!-- [END dependencies] -->
|
55 | 73 | </dependencies>
|
56 | 74 | <build>
|
| 75 | + <resources> |
| 76 | + <resource> |
| 77 | + <directory>src/main/resources</directory> |
| 78 | + <filtering>true</filtering> |
| 79 | + </resource> |
| 80 | + </resources> |
57 | 81 | <!-- for hot reload of the web application -->
|
58 | 82 | <outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
|
59 | 83 | <plugins>
|
| 84 | + |
| 85 | +<!-- |
| 86 | + <plugin> |
| 87 | + <groupId>org.apache.maven.plugins</groupId> |
| 88 | + <artifactId>maven-war-plugin</artifactId> |
| 89 | + <version>3.0.0</version> |
| 90 | + <configuration> |
| 91 | + <webResources> |
| 92 | + <resource> |
| 93 | + <directory>${basedir}/src/main/appengine</directory> |
| 94 | + <filtering>true</filtering> |
| 95 | + <targetPath></targetPath> |
| 96 | + </resource> |
| 97 | + </webResources> |
| 98 | + </configuration> |
| 99 | + </plugin> |
| 100 | + --> |
| 101 | + |
| 102 | + |
60 | 103 | <plugin>
|
61 | 104 | <groupId>com.google.cloud.tools</groupId>
|
62 | 105 | <artifactId>appengine-maven-plugin</artifactId>
|
63 | 106 | <version>${appengine.maven.plugin}</version>
|
64 |
| - <configuration> |
65 |
| - </configuration> |
66 | 107 | </plugin>
|
67 | 108 |
|
68 | 109 | <plugin>
|
|
0 commit comments