Skip to content

Commit

Permalink
Updating firebase-event-proxy/pom.xml and parent pom.xml. (#239)
Browse files Browse the repository at this point in the history
* 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
  • Loading branch information
misterwilliam authored and lesv committed May 16, 2016
1 parent 0945a2f commit b7a60d0
Show file tree
Hide file tree
Showing 6 changed files with 32 additions and 86 deletions.
81 changes: 14 additions & 67 deletions appengine/firebase-event-proxy/gae-firebase-event-proxy/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -10,21 +10,24 @@
See the License for the specific language governing permissions and
limitations under the License.
-->
<?xml version="1.0" encoding="UTF-8"?>
<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">

<project>
<modelVersion>4.0.0</modelVersion>
<packaging>war</packaging>
<version>1.0-SNAPSHOT</version>

<groupId>com.example.GaeFirebaseEventProxy</groupId>
<artifactId>GaeFirebaseEventProxy</artifactId>
<groupId>com.example.gaefirebaseeventproxy</groupId>
<artifactId>gaefirebaseeventproxy</artifactId>

<parent>
<groupId>com.google.cloud</groupId>
<artifactId>doc-samples</artifactId>
<version>1.0.0</version>
<relativePath>../../..</relativePath>
</parent>

<properties>
<app.id>gae-firebase-event-proxy</app.id>
<app.version>1</app.version>
<appengine.version>1.9.36</appengine.version>
<gcloud.plugin.version>2.0.9.74.v20150814</gcloud.plugin.version>
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
<maven.compiler.showDeprecation>true</maven.compiler.showDeprecation>
</properties>
Expand All @@ -38,7 +41,7 @@
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-1.0-sdk</artifactId>
<version>${appengine.version}</version>
<version>${appengine.sdk.version}</version>
</dependency>
<dependency>
<groupId>javax.servlet</groupId>
Expand Down Expand Up @@ -71,13 +74,13 @@
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-testing</artifactId>
<version>${appengine.version}</version>
<version>${appengine.sdk.version}</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-api-stubs</artifactId>
<version>${appengine.version}</version>
<version>${appengine.sdk.version}</version>
<scope>test</scope>
</dependency>
</dependencies>
Expand All @@ -86,71 +89,15 @@
<!-- for hot reload of the web application-->
<outputDirectory>${project.build.directory}/${project.build.finalName}/WEB-INF/classes</outputDirectory>
<plugins>
<plugin>
<groupId>org.codehaus.mojo</groupId>
<artifactId>versions-maven-plugin</artifactId>
<version>2.1</version>
<executions>
<execution>
<phase>compile</phase>
<goals>
<goal>display-dependency-updates</goal>
<goal>display-plugin-updates</goal>
</goals>
</execution>
</executions>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<version>3.1</version>
<artifactId>maven-compiler-plugin</artifactId>
<configuration>
<source>1.7</source>
<target>1.7</target>
</configuration>
</plugin>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.4</version>
<configuration>
<archiveClasses>true</archiveClasses>
<webResources>
<!-- in order to interpolate version from pom into appengine-web.xml -->
<resource>
<directory>${basedir}/src/main/webapp/WEB-INF</directory>
<filtering>true</filtering>
<targetPath>WEB-INF</targetPath>
</resource>
</webResources>
</configuration>
</plugin>

<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>appengine-maven-plugin</artifactId>
<version>${appengine.version}</version>
<version>${appengine.sdk.version}</version>
<configuration>
<enableJarClasses>false</enableJarClasses>
<version>${app.version}</version>
<!-- Comment in the below snippet to bind to all IPs instead of just localhost -->
<!-- address>0.0.0.0</address>
<port>8080</port -->
<!-- Comment in the below snippet to enable local debugging with a remote debugger
like those included with Eclipse or IntelliJ -->
<!-- jvmFlags>
<jvmFlag>-agentlib:jdwp=transport=dt_socket,address=8000,server=y,suspend=n</jvmFlag>
</jvmFlags -->
</configuration>
</plugin>
<plugin>
<groupId>com.google.appengine</groupId>
<artifactId>gcloud-maven-plugin</artifactId>
<version>${gcloud.plugin.version}</version>
<configuration>
<set_default>true</set_default>
</configuration>
</plugin>
</plugins>
</build>
</project>
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,17 @@
* limitations under the License.
*/

package com.example.GaeFirebaseEventProxy;
package com.example.gaefirebaseeventproxy;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.firebase.client.AuthData;
import com.firebase.client.DataSnapshot;
import com.firebase.client.Firebase;
import com.firebase.client.FirebaseError;
import com.firebase.client.ValueEventListener;
import com.firebase.security.token.TokenGenerator;
import com.google.appengine.api.utils.SystemProperty;

import java.io.FileInputStream;
import java.io.IOException;
Expand All @@ -27,16 +37,6 @@
import java.util.Properties;
import java.util.logging.Logger;

import com.fasterxml.jackson.core.JsonProcessingException;
import com.fasterxml.jackson.databind.ObjectMapper;
import com.firebase.client.AuthData;
import com.firebase.client.DataSnapshot;
import com.firebase.client.Firebase;
import com.firebase.client.FirebaseError;
import com.firebase.client.ValueEventListener;
import com.firebase.security.token.TokenGenerator;
import com.google.appengine.api.utils.SystemProperty;

public class FirebaseEventProxy {

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

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

// Authenticate with Firebase
firebase.authWithCustomToken(this.firebaseAuthToken, new Firebase.AuthResultHandler() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
* limitations under the License.
*/

package com.example.GaeFirebaseEventProxy;
package com.example.gaefirebaseeventproxy;

import java.util.logging.Logger;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="utf-8"?>
<!--
Copyright 2015 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -10,8 +11,6 @@
See the License for the specific language governing permissions and
limitations under the License.
-->

<?xml version="1.0" encoding="utf-8"?>
<appengine-web-app xmlns="http://appengine.google.com/ns/1.0">
<application>${app.id}</application>
<version>${app.version}</version>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--
Copyright 2015 Google Inc. All Rights Reserved.
Licensed under the Apache License, Version 2.0 (the "License");
Expand All @@ -10,15 +11,13 @@
See the License for the specific language governing permissions and
limitations under the License.
-->

<?xml version="1.0" encoding="UTF-8"?>
<web-app version="2.5"
xmlns="http://java.sun.com/xml/ns/javaee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd">

<listener>
<listener-class>com.example.GaeFirebaseEventProxy.ServletContextListenerImpl</listener-class>
<listener-class>com.example.gaefirebaseeventproxy.ServletContextListenerImpl</listener-class>
</listener>
<welcome-file-list>
<welcome-file>index.jsp</welcome-file>
Expand Down
1 change: 1 addition & 0 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,7 @@
<module>appengine/datastore/indexes</module>
<module>appengine/datastore/indexes-exploding</module>
<module>appengine/datastore/indexes-perfect</module>
<module>appengine/firebase-event-proxy/gae-firebase-event-proxy</module>
<module>appengine/guestbook-objectify</module>
<module>appengine/helloworld</module>
<module>appengine/images</module>
Expand Down

0 comments on commit b7a60d0

Please sign in to comment.