Author: krasserm Date: Fri Apr 9 08:32:10 2010 New Revision: 932298 URL: http://svn.apache.org/viewvc?rev=932298&view=rev Log: improvements to application configuration and minor edits
Added: camel/trunk/examples/camel-example-gauth/src/main/resources/appengine-web.xml (with props) Removed: camel/trunk/examples/camel-example-gauth/src/main/webapp/WEB-INF/appengine-web.xml Modified: camel/trunk/examples/camel-example-gae/pom.xml camel/trunk/examples/camel-example-gauth/pom.xml camel/trunk/examples/camel-example-gauth/src/main/java/org/apache/camel/example/gauth/TutorialRouteBuilder.java camel/trunk/examples/camel-example-gauth/src/main/resources/context-camel.xml camel/trunk/examples/camel-example-gauth/src/main/resources/context.properties camel/trunk/examples/camel-example-gauth/src/main/webapp/WEB-INF/jsp/top.jsp camel/trunk/examples/camel-example-gauth/src/main/webapp/index.html Modified: camel/trunk/examples/camel-example-gae/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-gae/pom.xml?rev=932298&r1=932297&r2=932298&view=diff ============================================================================== --- camel/trunk/examples/camel-example-gae/pom.xml (original) +++ camel/trunk/examples/camel-example-gae/pom.xml Fri Apr 9 08:32:10 2010 @@ -42,4 +42,18 @@ </dependency> </dependencies> + <repositories> + <repository> + <id>camel.internal.maven.repository</id> + <name>Camel Maven Repository</name> + <url>http://svn.apache.org/repos/asf/camel/m2-repo</url> + <releases> + <enabled>true</enabled> + </releases> + <snapshots> + <enabled>false</enabled> + </snapshots> + </repository> + </repositories> + </project> Modified: camel/trunk/examples/camel-example-gauth/pom.xml URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-gauth/pom.xml?rev=932298&r1=932297&r2=932298&view=diff ============================================================================== --- camel/trunk/examples/camel-example-gauth/pom.xml (original) +++ camel/trunk/examples/camel-example-gauth/pom.xml Fri Apr 9 08:32:10 2010 @@ -15,6 +15,12 @@ <packaging>war</packaging> <properties> + <!-- application properties --> + <gae.application.name>replaceme</gae.application.name> + <gae.consumer.key>replaceme</gae.consumer.key> + <gae.consumer.secret>replaceme</gae.consumer.secret> + + <!-- dependency versions --> <gdata-version>1.41.1</gdata-version> </properties> @@ -66,7 +72,50 @@ <scope>test</scope> </dependency> </dependencies> - + + <build> + <plugins> + <plugin> + <groupId>org.apache.maven.plugins</groupId> + <artifactId>maven-war-plugin</artifactId> + <configuration> + <webResources> + <!-- + Copied from root pom.xml because it is not combined + with custom resource configuration below. + --> + <resource> + <directory>${project.build.outputDirectory}</directory> + <includes> + <include>META-INF/LICENSE*</include> + <include>META-INF/NOTICE*</include> + <include>META-INF/DEPENDENCIES*</include> + </includes> + </resource> + <resource> + <directory>src/main/resources</directory> + <targetPath>WEB-INF</targetPath> + <filtering>true</filtering> + <includes> + <include>appengine-web.xml</include> + </includes> + </resource> + </webResources> + </configuration> + </plugin> + </plugins> + + <resources> + <resource> + <directory>src/main/resources</directory> + <filtering>true</filtering> + <excludes> + <exclude>appengine-web.xml</exclude> + </excludes> + </resource> + </resources> + </build> + <repositories> <repository> <id>camel.internal.maven.repository</id> Modified: camel/trunk/examples/camel-example-gauth/src/main/java/org/apache/camel/example/gauth/TutorialRouteBuilder.java URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-gauth/src/main/java/org/apache/camel/example/gauth/TutorialRouteBuilder.java?rev=932298&r1=932297&r2=932298&view=diff ============================================================================== --- camel/trunk/examples/camel-example-gauth/src/main/java/org/apache/camel/example/gauth/TutorialRouteBuilder.java (original) +++ camel/trunk/examples/camel-example-gauth/src/main/java/org/apache/camel/example/gauth/TutorialRouteBuilder.java Fri Apr 9 08:32:10 2010 @@ -22,10 +22,16 @@ import org.apache.camel.builder.RouteBui public class TutorialRouteBuilder extends RouteBuilder { + private String application; + + public void setApplication(String application) { + this.application = application; + } + @Override public void configure() throws Exception { - String encodedCallback = URLEncoder.encode("https://ipfcloud.appspot.com/camel/handler", "UTF-8"); + String encodedCallback = URLEncoder.encode(String.format("https://%s.appspot.com/camel/handler", application), "UTF-8"); String encodedScope = URLEncoder.encode("http://www.google.com/calendar/feeds/", "UTF-8"); from("ghttp:///authorize") Added: camel/trunk/examples/camel-example-gauth/src/main/resources/appengine-web.xml URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-gauth/src/main/resources/appengine-web.xml?rev=932298&view=auto ============================================================================== --- camel/trunk/examples/camel-example-gauth/src/main/resources/appengine-web.xml (added) +++ camel/trunk/examples/camel-example-gauth/src/main/resources/appengine-web.xml Fri Apr 9 08:32:10 2010 @@ -0,0 +1,28 @@ +<?xml version="1.0" encoding="utf-8"?> + +<!-- + Licensed to the Apache Software Foundation (ASF) under one or more + contributor license agreements. See the NOTICE file distributed with + this work for additional information regarding copyright ownership. + The ASF licenses this file to You under the Apache License, Version 2.0 + (the "License"); you may not use this file except in compliance with + the License. You may obtain a copy of the License at + + http://www.apache.org/licenses/LICENSE-2.0 + + Unless required by applicable law or agreed to in writing, software + distributed under the License is distributed on an "AS IS" BASIS, + WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. +--> + +<appengine-web-app xmlns="http://appengine.google.com/ns/1.0"> + <application>${gae.application.name}</application> + <version>1</version> + + <system-properties> + <property name="java.util.logging.config.file" value="WEB-INF/logging.properties"/> + </system-properties> + +</appengine-web-app> \ No newline at end of file Propchange: camel/trunk/examples/camel-example-gauth/src/main/resources/appengine-web.xml ------------------------------------------------------------------------------ svn:eol-style = native Modified: camel/trunk/examples/camel-example-gauth/src/main/resources/context-camel.xml URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-gauth/src/main/resources/context-camel.xml?rev=932298&r1=932297&r2=932298&view=diff ============================================================================== --- camel/trunk/examples/camel-example-gauth/src/main/resources/context-camel.xml (original) +++ camel/trunk/examples/camel-example-gauth/src/main/resources/context-camel.xml Fri Apr 9 08:32:10 2010 @@ -38,6 +38,7 @@ http://camel.apache.org/schema/spring/ca <bean id="tutorialRouteBuilder" class="org.apache.camel.example.gauth.TutorialRouteBuilder"> + <property name="application" value="${application.name}" /> </bean> <bean id="gauth" class="org.apache.camel.component.gae.auth.GAuthComponent"> Modified: camel/trunk/examples/camel-example-gauth/src/main/resources/context.properties URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-gauth/src/main/resources/context.properties?rev=932298&r1=932297&r2=932298&view=diff ============================================================================== --- camel/trunk/examples/camel-example-gauth/src/main/resources/context.properties (original) +++ camel/trunk/examples/camel-example-gauth/src/main/resources/context.properties Fri Apr 9 08:32:10 2010 @@ -15,5 +15,6 @@ ## limitations under the License. ## ------------------------------------------------------------------------ -consumer.key=replaceme -consumer.secret=replaceme +application.name=${gae.application.name} +consumer.key=${gae.consumer.key} +consumer.secret=${gae.consumer.secret} Modified: camel/trunk/examples/camel-example-gauth/src/main/webapp/WEB-INF/jsp/top.jsp URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-gauth/src/main/webapp/WEB-INF/jsp/top.jsp?rev=932298&r1=932297&r2=932298&view=diff ============================================================================== --- camel/trunk/examples/camel-example-gauth/src/main/webapp/WEB-INF/jsp/top.jsp (original) +++ camel/trunk/examples/camel-example-gauth/src/main/webapp/WEB-INF/jsp/top.jsp Fri Apr 9 08:32:10 2010 @@ -7,8 +7,8 @@ <html> <head> -<title>Apache Camel OAuth Tutorial</title> +<title>Apache Camel OAuth Demo</title> </head> <body> <img src="/images/camel.png" /> -<h1>OAuth Tutorial</h1> +<h1>OAuth Demo</h1> Modified: camel/trunk/examples/camel-example-gauth/src/main/webapp/index.html URL: http://svn.apache.org/viewvc/camel/trunk/examples/camel-example-gauth/src/main/webapp/index.html?rev=932298&r1=932297&r2=932298&view=diff ============================================================================== --- camel/trunk/examples/camel-example-gauth/src/main/webapp/index.html (original) +++ camel/trunk/examples/camel-example-gauth/src/main/webapp/index.html Fri Apr 9 08:32:10 2010 @@ -3,9 +3,10 @@ <head> <meta http-equiv="expires" content="0"> <meta http-equiv="content-type" content="text/html; charset=UTF-8"> -<title>Apache Camel OAuth Tutorial</title> +<meta name="google-site-verification" content="z2esQ0OoQR1frF3eLqJrREBglGhc4YnFocgTrjUHf4E" /> +<title>Apache Camel OAuth Demo</title> </head> <body> -<a href="/oauth/calendar">Apache Camel OAuth Tutorial</a> +<a href="/oauth/calendar">Apache Camel OAuth Demo</a> </body> </html>