Skip to content

Commit b7a60d0

Browse files
misterwilliamlesv
authored andcommitted
Updating firebase-event-proxy/pom.xml and parent pom.xml. (GoogleCloudPlatform#239)
* Updating firebase-event-proxy/pom.xml so that it is more like other pom's and references the parent pom.xml. Adding firebase-event-proxy to parent pom.xml * Fixing checkstyle issues
1 parent 0945a2f commit b7a60d0

File tree

6 files changed

+32
-86
lines changed

6 files changed

+32
-86
lines changed

appengine/firebase-event-proxy/gae-firebase-event-proxy/pom.xml

Lines changed: 14 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -10,21 +10,24 @@
1010
See the License for the specific language governing permissions and
1111
limitations under the License.
1212
-->
13-
<?xml version="1.0" encoding="UTF-8"?>
14-
<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">
15-
13+
<project>
1614
<modelVersion>4.0.0</modelVersion>
1715
<packaging>war</packaging>
1816
<version>1.0-SNAPSHOT</version>
1917

20-
<groupId>com.example.GaeFirebaseEventProxy</groupId>
21-
<artifactId>GaeFirebaseEventProxy</artifactId>
18+
<groupId>com.example.gaefirebaseeventproxy</groupId>
19+
<artifactId>gaefirebaseeventproxy</artifactId>
20+
21+
<parent>
22+
<groupId>com.google.cloud</groupId>
23+
<artifactId>doc-samples</artifactId>
24+
<version>1.0.0</version>
25+
<relativePath>../../..</relativePath>
26+
</parent>
2227

2328
<properties>
2429
<app.id>gae-firebase-event-proxy</app.id>
2530
<app.version>1</app.version>
26-
<appengine.version>1.9.36</appengine.version>
27-
<gcloud.plugin.version>2.0.9.74.v20150814</gcloud.plugin.version>
2831
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
2932
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
3033
</properties>
@@ -38,7 +41,7 @@
3841
<dependency>
3942
<groupId>com.google.appengine</groupId>
4043
<artifactId>appengine-api-1.0-sdk</artifactId>
41-
<version>${appengine.version}</version>
44+
<version>${appengine.sdk.version}</version>
4245
</dependency>
4346
<dependency>
4447
<groupId>javax.servlet</groupId>
@@ -71,13 +74,13 @@
7174
<dependency>
7275
<groupId>com.google.appengine</groupId>
7376
<artifactId>appengine-testing</artifactId>
74-
<version>${appengine.version}</version>
77+
<version>${appengine.sdk.version}</version>
7578
<scope>test</scope>
7679
</dependency>
7780
<dependency>
7881
<groupId>com.google.appengine</groupId>
7982
<artifactId>appengine-api-stubs</artifactId>
80-
<version>${appengine.version}</version>
83+
<version>${appengine.sdk.version}</version>
8184
<scope>test</scope>
8285
</dependency>
8386
</dependencies>
@@ -86,71 +89,15 @@
8689
<!-- for hot reload of the web application-->
8790
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
8891
<plugins>
89-
<plugin>
90-
<groupId>org.codehaus.mojo</groupId>
91-
<artifactId>versions-maven-plugin</artifactId>
92-
<version>2.1</version>
93-
<executions>
94-
<execution>
95-
<phase>compile</phase>
96-
<goals>
97-
<goal>display-dependency-updates</goal>
98-
<goal>display-plugin-updates</goal>
99-
</goals>
100-
</execution>
101-
</executions>
102-
</plugin>
103-
<plugin>
104-
<groupId>org.apache.maven.plugins</groupId>
105-
<version>3.1</version>
106-
<artifactId>maven-compiler-plugin</artifactId>
107-
<configuration>
108-
<source>1.7</source>
109-
<target>1.7</target>
110-
</configuration>
111-
</plugin>
112-
<plugin>
113-
<groupId>org.apache.maven.plugins</groupId>
114-
<artifactId>maven-war-plugin</artifactId>
115-
<version>2.4</version>
116-
<configuration>
117-
<archiveClasses>true</archiveClasses>
118-
<webResources>
119-
<!-- in order to interpolate version from pom into appengine-web.xml -->
120-
<resource>
121-
<directory>${basedir}/src/main/webapp/WEB-INF</directory>
122-
<filtering>true</filtering>
123-
<targetPath>WEB-INF</targetPath>
124-
</resource>
125-
</webResources>
126-
</configuration>
127-
</plugin>
128-
12992
<plugin>
13093
<groupId>com.google.appengine</groupId>
13194
<artifactId>appengine-maven-plugin</artifactId>
132-
<version>${appengine.version}</version>
95+
<version>${appengine.sdk.version}</version>
13396
<configuration>
13497
<enableJarClasses>false</enableJarClasses>
13598
<version>${app.version}</version>
136-
<!-- Comment in the below snippet to bind to all IPs instead of just localhost -->
137-
<!-- address>0.0.0.0</address>
138-
<port>8080</port -->
139-
<!-- Comment in the below snippet to enable local debugging with a remote debugger
140-
like those included with Eclipse or IntelliJ -->
141-
<!-- jvmFlags>
142-
<jvmFlag>-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n</jvmFlag>
143-
</jvmFlags -->
14499
</configuration>
145100
</plugin>
146-
<plugin>
147-
<groupId>com.google.appengine</groupId>
148-
<artifactId>gcloud-maven-plugin</artifactId>
149-
<version>${gcloud.plugin.version}</version>
150-
<configuration>
151-
<set_default>true</set_default>
152-
</configuration>
153-
</plugin>
154101
</plugins>
155102
</build>
156103
</project>

appengine/firebase-event-proxy/gae-firebase-event-proxy/src/main/java/com/example/GaeFirebaseEventProxy/FirebaseEventProxy.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,17 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.GaeFirebaseEventProxy;
17+
package com.example.gaefirebaseeventproxy;
18+
19+
import com.fasterxml.jackson.core.JsonProcessingException;
20+
import com.fasterxml.jackson.databind.ObjectMapper;
21+
import com.firebase.client.AuthData;
22+
import com.firebase.client.DataSnapshot;
23+
import com.firebase.client.Firebase;
24+
import com.firebase.client.FirebaseError;
25+
import com.firebase.client.ValueEventListener;
26+
import com.firebase.security.token.TokenGenerator;
27+
import com.google.appengine.api.utils.SystemProperty;
1828

1929
import java.io.FileInputStream;
2030
import java.io.IOException;
@@ -27,16 +37,6 @@
2737
import java.util.Properties;
2838
import java.util.logging.Logger;
2939

30-
import com.fasterxml.jackson.core.JsonProcessingException;
31-
import com.fasterxml.jackson.databind.ObjectMapper;
32-
import com.firebase.client.AuthData;
33-
import com.firebase.client.DataSnapshot;
34-
import com.firebase.client.Firebase;
35-
import com.firebase.client.FirebaseError;
36-
import com.firebase.client.ValueEventListener;
37-
import com.firebase.security.token.TokenGenerator;
38-
import com.google.appengine.api.utils.SystemProperty;
39-
4040
public class FirebaseEventProxy {
4141

4242
private static final Logger log = Logger.getLogger(FirebaseEventProxy.class.getName());
@@ -49,8 +49,8 @@ public FirebaseEventProxy() {
4949
}
5050

5151
public void start() {
52-
String FIREBASE_LOCATION = "https://gae-fb-proxy.firebaseio.com/";
53-
Firebase firebase = new Firebase(FIREBASE_LOCATION);
52+
String firebaseLocation = "https://gae-fb-proxy.firebaseio.com/";
53+
Firebase firebase = new Firebase(firebaseLocation);
5454

5555
// Authenticate with Firebase
5656
firebase.authWithCustomToken(this.firebaseAuthToken, new Firebase.AuthResultHandler() {

appengine/firebase-event-proxy/gae-firebase-event-proxy/src/main/java/com/example/GaeFirebaseEventProxy/ServletContextListenerImpl.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@
1414
* limitations under the License.
1515
*/
1616

17-
package com.example.GaeFirebaseEventProxy;
17+
package com.example.gaefirebaseeventproxy;
1818

1919
import java.util.logging.Logger;
2020

appengine/firebase-event-proxy/gae-firebase-event-proxy/src/main/webapp/WEB-INF/appengine-web.xml

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" encoding="utf-8"?>
12
<!--
23
Copyright 2015 Google Inc. All Rights Reserved.
34
Licensed under the Apache License, Version 2.0 (the "License");
@@ -10,8 +11,6 @@
1011
See the License for the specific language governing permissions and
1112
limitations under the License.
1213
-->
13-
14-
<?xml version="1.0" encoding="utf-8"?>
1514
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
1615
<application>${app.id}</application>
1716
<version>${app.version}</version>

appengine/firebase-event-proxy/gae-firebase-event-proxy/src/main/webapp/WEB-INF/web.xml

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
<?xml version="1.0" encoding="UTF-8"?>
12
<!--
23
Copyright 2015 Google Inc. All Rights Reserved.
34
Licensed under the Apache License, Version 2.0 (the "License");
@@ -10,15 +11,13 @@
1011
See the License for the specific language governing permissions and
1112
limitations under the License.
1213
-->
13-
14-
<?xml version="1.0" encoding="UTF-8"?>
1514
<web-app version="2.5"
1615
xmlns="http://java.sun.com/xml/ns/javaee"
1716
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
1817
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">
1918

2019
<listener>
21-
<listener-class>com.example.GaeFirebaseEventProxy.ServletContextListenerImpl</listener-class>
20+
<listener-class>com.example.gaefirebaseeventproxy.ServletContextListenerImpl</listener-class>
2221
</listener>
2322
<welcome-file-list>
2423
<welcome-file>index.jsp</welcome-file>

pom.xml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@
5252
<module>appengine/datastore/indexes</module>
5353
<module>appengine/datastore/indexes-exploding</module>
5454
<module>appengine/datastore/indexes-perfect</module>
55+
<module>appengine/firebase-event-proxy/gae-firebase-event-proxy</module>
5556
<module>appengine/guestbook-objectify</module>
5657
<module>appengine/helloworld</module>
5758
<module>appengine/images</module>

0 commit comments

Comments
 (0)