You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@rave.apache.org by ja...@apache.org on 2012/12/30 16:48:36 UTC
svn commit: r1426955 [1/2] - in /rave/trunk: ./
rave-custom-project-archetype/ rave-custom-project-archetype/src/
rave-custom-project-archetype/src/main/
rave-custom-project-archetype/src/main/resources/
rave-custom-project-archetype/src/main/resources...
Author: jasha
Date: Sun Dec 30 15:48:35 2012
New Revision: 1426955
URL: http://svn.apache.org/viewvc?rev=1426955&view=rev
Log:
RAVE-864 Add Maven archetype for generating a custom Rave project
Added:
rave/trunk/rave-custom-project-archetype/ (with props)
rave/trunk/rave-custom-project-archetype/pom.xml
rave/trunk/rave-custom-project-archetype/src/
rave/trunk/rave-custom-project-archetype/src/main/
rave/trunk/rave-custom-project-archetype/src/main/resources/
rave/trunk/rave-custom-project-archetype/src/main/resources/META-INF/
rave/trunk/rave-custom-project-archetype/src/main/resources/META-INF/maven/
rave/trunk/rave-custom-project-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/pom.xml
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/dist/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/dist/conf/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/dist/conf/tomcat-users.xml
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/java/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/java/CustomUserService.java
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/applicationContext-security.xml
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/tags/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/tags/custom_css.tag
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/web.xml
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/static/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/static/css/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/static/css/custom.css
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/java/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/java/CustomUserServiceTest.java
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/resources/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/resources/log4j.xml
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/pom.xml
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/src/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/src/main/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/src/main/webapp/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/src/main/webapp/WEB-INF/
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/src/main/webapp/WEB-INF/web.xml
rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/pom.xml
rave/trunk/rave-custom-project-archetype/src/test/
rave/trunk/rave-custom-project-archetype/src/test/resources/
rave/trunk/rave-custom-project-archetype/src/test/resources/projects/
rave/trunk/rave-custom-project-archetype/src/test/resources/projects/basic/
rave/trunk/rave-custom-project-archetype/src/test/resources/projects/basic/archetype.properties
rave/trunk/rave-custom-project-archetype/src/test/resources/projects/basic/goal.txt
Modified:
rave/trunk/pom.xml
rave/trunk/rave-integration-tests/pom.xml
rave/trunk/rave-portal/pom.xml
Modified: rave/trunk/pom.xml
URL: http://svn.apache.org/viewvc/rave/trunk/pom.xml?rev=1426955&r1=1426954&r2=1426955&view=diff
==============================================================================
--- rave/trunk/pom.xml (original)
+++ rave/trunk/pom.xml Sun Dec 30 15:48:35 2012
@@ -83,6 +83,7 @@
$mvn filesync:generate -Dmaven.filesync.override=true -->
<maven.filesync.override>false</maven.filesync.override>
+ <cargo.version>1.3.1</cargo.version>
<!-- default empty javaagent
if needed you can specify it on the command line with -Djavaagent="..." -->
<javaagent />
@@ -697,6 +698,7 @@
<module>rave-demo-gadgets</module>
<module>rave-portal</module>
<module>rave-integration-tests</module>
+ <module>rave-custom-project-archetype</module>
</modules>
<profiles>
<profile>
Propchange: rave/trunk/rave-custom-project-archetype/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Sun Dec 30 15:48:35 2012
@@ -0,0 +1,5 @@
+.project
+.settings
+.classpath
+*.iml
+target
Added: rave/trunk/rave-custom-project-archetype/pom.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/pom.xml?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/pom.xml (added)
+++ rave/trunk/rave-custom-project-archetype/pom.xml Sun Dec 30 15:48:35 2012
@@ -0,0 +1,168 @@
+<?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.
+ -->
+<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">
+ <modelVersion>4.0.0</modelVersion>
+
+ <parent>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-project</artifactId>
+ <version>0.19-SNAPSHOT</version>
+ </parent>
+
+ <artifactId>rave-custom-project-archetype</artifactId>
+ <packaging>maven-archetype</packaging>
+
+ <name>Apache Rave :: rave-custom-project-archetype</name>
+ <description>An Archetype to create a custom Apache Rave project</description>
+
+ <properties>
+ <customproject.app.groupId>org.apache.rave.custom</customproject.app.groupId>
+ <customproject.app.artifactId>myproject</customproject.app.artifactId>
+ <customproject.app.version>1.01.00</customproject.app.version>
+ <customproject.app.name>My Custom Rave Project</customproject.app.name>
+ </properties>
+
+ <!--
+ Replace some property values in the archetype pom upon generation of the archetype, see
+ http://stackoverflow.com/questions/7223031/how-to-embed-archetype-project-version-in-maven-archetype
+ -->
+ <build>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ <includes>
+ <include>archetype-resources/pom.xml</include>
+ </includes>
+ </resource>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>false</filtering>
+ <excludes>
+ <exclude>archetype-resources/pom.xml</exclude>
+ </excludes>
+ </resource>
+ </resources>
+
+ <extensions>
+ <extension>
+ <groupId>org.apache.maven.archetype</groupId>
+ <artifactId>archetype-packaging</artifactId>
+ <version>2.2</version>
+ </extension>
+ </extensions>
+
+ <pluginManagement>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-resources-plugin</artifactId>
+ <version>2.6</version>
+ <configuration>
+ <escapeString>\</escapeString>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ <plugins>
+ <plugin>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.2</version>
+ <extensions>true</extensions>
+ </plugin>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <version>1.7</version>
+ <executions>
+ <execution>
+ <id>generate-and-install-gettingstarted</id>
+ <phase>install</phase>
+ <configuration>
+ <tasks>
+ <echo message="$$$$$$$$$$ Deleting the existing custom Rave project if it exists. $$$$$$$$$$"/>
+ <delete dir="${project.build.directory}/${customproject.app.artifactId}"/>
+
+ <echo message="$$$$$$$$$$ Generating a custom Rave project from the archetype $$$$$$$$$$"/>
+ <java classname="org.codehaus.classworlds.Launcher" dir="${project.build.directory}"
+ fork="true" failonerror="true">
+ <permissions>
+ <grant class="java.security.AllPermission"/>
+ <grant class="java.io.FilePermission" name="${maven.home}/bin/m2.conf"
+ actions="read"/>
+ <grant class="java.util.PropertyPermission" name="*" actions="read,write"/>
+ </permissions>
+ <sysproperty key="classworlds.conf" value="${maven.home}/bin/m2.conf"/>
+ <sysproperty key="maven.home" value="${maven.home}"/>
+ <classpath>
+ <fileset dir="${maven.home}/boot">
+ <include name="**/*.jar"/>
+ </fileset>
+ </classpath>
+ <arg value="org.apache.maven.plugins:maven-archetype-plugin:2.2:generate"/>
+ <arg value="-DarchetypeGroupId=org.apache.rave"/>
+ <arg value="-DarchetypeArtifactId=rave-custom-project-archetype"/>
+ <arg value="-DarchetypeVersion=${project.version}"/>
+ <arg value="-DgroupId=${customproject.app.groupId}"/>
+ <arg value="-DartifactId=${customproject.app.artifactId}"/>
+ <arg value="-Dversion=${customproject.app.version}"/>
+ <arg value="-DprojectName=${customproject.app.name}"/>
+ </java>
+
+ <echo message="$$$$$$$$$$ Installing custom Rave project $$$$$$$$$$"/>
+ <java classname="org.codehaus.classworlds.Launcher"
+ dir="${project.build.directory}/${customproject.app.artifactId}" fork="true"
+ failonerror="true">
+ <permissions>
+ <grant class="java.security.AllPermission"/>
+ <grant class="java.io.FilePermission" name="${maven.home}/bin/m2.conf"
+ actions="read"/>
+ <grant class="java.util.PropertyPermission" name="*" actions="read,write"/>
+ </permissions>
+ <sysproperty key="classworlds.conf" value="${maven.home}/bin/m2.conf"/>
+ <sysproperty key="maven.home" value="${maven.home}"/>
+ <classpath>
+ <fileset dir="${maven.home}/boot">
+ <include name="**/*.jar"/>
+ </fileset>
+ </classpath>
+ <arg value="install"/>
+ </java>
+ </tasks>
+ </configuration>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-archetype-plugin</artifactId>
+ <version>2.2</version>
+ <scope>runtime</scope>
+ </dependency>
+ </dependencies>
+ </plugin>
+ </plugins>
+ </build>
+
+</project>
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/META-INF/maven/archetype-metadata.xml Sun Dec 30 15:48:35 2012
@@ -0,0 +1,92 @@
+<?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.
+ -->
+<archetype-descriptor
+ xsi:schemaLocation="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0 http://maven.apache.org/xsd/archetype-descriptor-1.0.0.xsd"
+ name="rave-custom-project"
+ xmlns="http://maven.apache.org/plugins/maven-archetype-plugin/archetype-descriptor/1.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance">
+ <requiredProperties>
+ <requiredProperty key="groupId">
+ <defaultValue>org.example</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="artifactId">
+ <defaultValue>myraveproject</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="version">
+ <defaultValue>1.01.00-SNAPSHOT</defaultValue>
+ </requiredProperty>
+ <requiredProperty key="projectName">
+ <defaultValue>My Rave Project</defaultValue>
+ </requiredProperty>
+ </requiredProperties>
+ <modules>
+ <module id="${rootArtifactId}-portal" dir="__rootArtifactId__-portal" name="${rootArtifactId}-portal">
+ <fileSets>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/main/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/main/dist</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/main/webapp</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </fileSet>
+ <fileSet encoding="UTF-8">
+ <directory>src/main/webapp</directory>
+ <includes>
+ <include>**/*.tag</include>
+ <include>**/*.css</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" packaged="true" encoding="UTF-8">
+ <directory>src/test/java</directory>
+ <includes>
+ <include>**/*.java</include>
+ </includes>
+ </fileSet>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/test/resources</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ </module>
+ <module id="${rootArtifactId}-shindig" dir="__rootArtifactId__-shindig" name="${rootArtifactId}-shindig">
+ <fileSets>
+ <fileSet filtered="true" encoding="UTF-8">
+ <directory>src/main/webapp</directory>
+ <includes>
+ <include>**/*.xml</include>
+ </includes>
+ </fileSet>
+ </fileSets>
+ </module>
+ </modules>
+</archetype-descriptor>
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/pom.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/pom.xml?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/pom.xml (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/pom.xml Sun Dec 30 15:48:35 2012
@@ -0,0 +1,321 @@
+<?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.
+ -->
+<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">
+ <parent>
+ <artifactId>${rootArtifactId}</artifactId>
+ <groupId>${groupId}</groupId>
+ <version>${version}</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>${artifactId}</artifactId>
+ <name>${projectName} :: ${artifactId}</name>
+
+ <packaging>war</packaging>
+
+ <properties>
+ <!-- if you want a remote debugging on a different a address
+ override on command line with -Dcargo.debug.addres=xxxx -->
+ <cargo.debug.address>8000</cargo.debug.address>
+ <!-- if you want to start remote debugging session suspended
+ override on command line with -Dcargo.debug.suspend=y -->
+ <cargo.debug.suspend>n</cargo.debug.suspend>
+ <cargo.args/>
+ </properties>
+
+ <dependencyManagement>
+ <dependencies>
+ <!--
+ spring-security-web has dependencies on older spring 3.0.x.RELEASE jars,
+ one of which is spring-aop. This causes some initialization issues so ensure that the spring-aop
+ version used is the desired version
+ -->
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>${org.springframework.version}</version>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
+ <dependencies>
+
+ <!-- servlet-api, jsp-api and el-api api must be scope provided -->
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>${javax.servlet.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet.jsp</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>${jsp-api.version}</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.el</groupId>
+ <artifactId>el-api</artifactId>
+ <version>${el-api.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- Exclude commons-logging by adding it as a provided dependency -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <!-- fore junit dependency on scope test -->
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>${junit.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.easymock</groupId>
+ <artifactId>easymock</artifactId>
+ <version>${easymock.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-test</artifactId>
+ <version>${org.springframework.version}</version>
+ <scope>test</scope>
+ </dependency>
+
+
+ <!-- Ensure/enforce proper version for commons-lang, not relying on transitive dependencies -->
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>${commons-lang.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-portal-dependencies</artifactId>
+ <type>pom</type>
+ <version>${apache.rave.version}</version>
+ <!-- exclude the LDAP integration (not used in this custom project) -->
+ <exclusions>
+ <exclusion>
+ <groupId>org.apache.directory.server</groupId>
+ <artifactId>apacheds-core</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework.security</groupId>
+ <artifactId>spring-security-ldap</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-portal-resources</artifactId>
+ <type>war</type>
+ <version>${apache.rave.version}</version>
+ </dependency>
+
+ <dependency>
+ <groupId>${groupId}</groupId>
+ <artifactId>${rootArtifactId}-shindig</artifactId>
+ <type>war</type>
+ <version>${version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie</artifactId>
+ <type>war</type>
+ <version>${apache.wookie.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-demo-gadgets</artifactId>
+ <type>war</type>
+ <version>${apache.rave.version}</version>
+ <scope>provided</scope>
+ </dependency>
+
+
+ <!-- Default database -->
+ <dependency>
+ <groupId>com.h2database</groupId>
+ <artifactId>h2</artifactId>
+ <version>${com.h2database.version}</version>
+ </dependency>
+
+ <!-- log4j logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>${org.slf4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>${log4j.version}</version>
+ <scope>runtime</scope>
+ </dependency>
+
+ <!-- mail -->
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <version>${javax.mail.version}</version>
+ </dependency>
+ </dependencies>
+
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <plugins>
+ <plugin>
+ <groupId>com.googlecode.mavenfilesync</groupId>
+ <artifactId>maven-filesync-plugin</artifactId>
+ <configuration>
+ <mappings>
+ <mapping>
+ <sourceFolder>src/main/webapp</sourceFolder>
+ <destinationFolder>@target/tomcat6x/webapps/portal</destinationFolder>
+ </mapping>
+ <mapping>
+ <sourceFolder>src/main/resources</sourceFolder>
+ <destinationFolder>@target/tomcat6x/webapps/portal/WEB-INF/classes</destinationFolder>
+ </mapping>
+ </mappings>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <overlays>
+ <overlay>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-portal-resources</artifactId>
+ <!-- Example exclusions for files we overrides
+ This isn't technically required (as we overlay) but made explicit this way
+ -->
+ <excludes>
+ <exclude>WEB-INF/applicationContext-security.xml</exclude>
+ <exclude>WEB-INF/xml</exclude>
+ </excludes>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin>
+
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>${cargo.version}</version>
+ <configuration>
+ <deployables>
+ <deployable>
+ <groupId>${groupId}</groupId>
+ <artifactId>${rootArtifactId}-shindig</artifactId>
+ <type>war</type>
+ <properties>
+ <context>/ROOT</context>
+ </properties>
+ </deployable>
+ <deployable>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-demo-gadgets</artifactId>
+ <type>war</type>
+ <!-- I tried giving this name gagdets and it did not work. -->
+ <properties>
+ <context>/demogadgets</context>
+ </properties>
+ </deployable>
+ <deployable>
+ <groupId>${groupId}</groupId>
+ <artifactId>${rootArtifactId}-portal</artifactId>
+ <type>war</type>
+ <properties>
+ <context>/portal</context>
+ </properties>
+ </deployable>
+ <deployable>
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie</artifactId>
+ <type>war</type>
+ <properties>
+ <context>/wookie</context>
+ </properties>
+ </deployable>
+ </deployables>
+ <configuration>
+ <properties>
+ <cargo.jvmargs><![CDATA[-Dh2.bindAddress="localhost" -Xdebug -Xrunjdwp:transport=dt_socket,address=${cargo.debug.address},server=y,suspend=${cargo.debug.suspend} -noverify ${javaagent} ${cargo.args}]]></cargo.jvmargs>
+ <cargo.tomcat.context.reloadable>true</cargo.tomcat.context.reloadable>
+ </properties>
+ <home>${project.build.directory}/tomcat6x</home>
+ <configfiles>
+ <configfile>
+ <file>${project.basedir}/../${rootArtifactId}-portal/src/main/dist/conf/tomcat-users.xml</file>
+ <todir>conf/</todir>
+ <tofile>tomcat-users.xml</tofile>
+ </configfile>
+ </configfiles>
+ </configuration>
+ <container>
+ <containerId>tomcat6x</containerId>
+ <timeout>180000</timeout>
+ <zipUrlInstaller>
+ <downloadDir>${settings.localRepository}/org/codehaus/cargo/cargo-container-archives</downloadDir>
+ <url>http://archive.apache.org/dist/tomcat/tomcat-6/v6.0.35/bin/apache-tomcat-6.0.35.tar.gz</url>
+ </zipUrlInstaller>
+ <systemProperties>
+ <net.sf.ehcache.skipUpdateCheck>true</net.sf.ehcache.skipUpdateCheck>
+ <!-- un-comment following property for: Loading the SizeOfAgent will probably fail,
+ as you are running on Apple OS X and have a value set for java.io.tmpdir -->
+ <!-- <net.sf.ehcache.pool.sizeof.AgentSizeOf.bypass>true</net.sf.ehcache.pool.sizeof.AgentSizeOf.bypass> -->
+
+ <!-- Documentation: http://incubator.apache.org/rave/documentation/host-configuration.html -->
+ <!--
+ <portal.override.properties>/path/to/custom.portal.properties</portal.override.properties>
+ <rave-shindig.override.properties>/path/to/custom.shindig.properties</rave-shindig.override.properties>
+ <shindig.host>localhost</shindig.host>
+ <shindig.port>8080</shindig.port>
+ <shindig.contextroot />
+ -->
+ </systemProperties>
+ </container>
+ </configuration>
+ </plugin>
+
+ </plugins>
+ </build>
+
+</project>
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/dist/conf/tomcat-users.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/dist/conf/tomcat-users.xml?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/dist/conf/tomcat-users.xml (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/dist/conf/tomcat-users.xml Sun Dec 30 15:48:35 2012
@@ -0,0 +1,26 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?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.
+ -->
+<tomcat-users>
+<role rolename="widgetadmin"/>
+<user username="java" password="java" roles="widgetadmin"/>
+</tomcat-users>
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/java/CustomUserService.java
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/java/CustomUserService.java?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/java/CustomUserService.java (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/java/CustomUserService.java Sun Dec 30 15:48:35 2012
@@ -0,0 +1,119 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+
+package ${package};
+
+import org.apache.rave.portal.model.User;
+import org.apache.rave.portal.repository.CategoryRepository;
+import org.apache.rave.portal.repository.PageRepository;
+import org.apache.rave.portal.repository.PageTemplateRepository;
+import org.apache.rave.portal.repository.PersonRepository;
+import org.apache.rave.portal.repository.UserRepository;
+import org.apache.rave.portal.repository.WidgetRepository;
+import org.apache.rave.portal.service.impl.DefaultUserService;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.dao.DataAccessException;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+import org.springframework.stereotype.Service;
+
+/*
+ * 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.
+ */
+
+/**
+ * Custom User service is to demonstrate how you can implement a custom
+ * {@link ${groupId}.portal.service.UserService} in Apache Rave and add additional information
+ */
+
+@Service(value = "customUserService")
+public class CustomUserService extends DefaultUserService {
+ private static final Logger logger = LoggerFactory.getLogger(CustomUserService.class);
+ private final UserRepository userRepository;
+
+ @Autowired
+ public CustomUserService(UserRepository userRepository,
+ PageRepository pageRepository,
+ WidgetRepository widgetRepository,
+ PageTemplateRepository pageTemplateRepository,
+ CategoryRepository categoryRepository,
+ PersonRepository personRepository) {
+ super(pageRepository, userRepository, widgetRepository,pageTemplateRepository, categoryRepository,personRepository);
+ this.userRepository = userRepository;
+ }
+
+ @Override
+ public UserDetails loadUserByUsername(String username) throws UsernameNotFoundException, DataAccessException {
+ logger.info("Custom User Service called to get user information");
+ final User user = userRepository.getByUsername(username);
+ if (user == null) {
+ throw new UsernameNotFoundException("User with username '" + username + "' was not found!");
+ }
+ fetchCustomCredential(user);
+ return user;
+ }
+
+ /**
+ * This method attempts to load the custom credential and decorates it with
+ * additional attributes.
+ *
+ * @param user for whom the custom credentials are fetched
+ */
+ private void fetchCustomCredential(User user) {
+ try {
+ logger.info("Decorating the credential for user {}", user.getUsername());
+ } catch (Exception e) {
+ logger.warn("Unexpected error while fetching custom credentials", e);
+ }
+ }
+
+ @Override
+ public User getAuthenticatedUser() {
+ Authentication authentication = SecurityContextHolder.getContext().getAuthentication();
+
+ if (authentication != null && authentication.getPrincipal() instanceof User) {
+ return (User) authentication.getPrincipal();
+ } else {
+ throw new SecurityException("Could not get the authenticated user!");
+ }
+ }
+
+}
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/applicationContext-security.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/applicationContext-security.xml?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/applicationContext-security.xml (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/applicationContext-security.xml Sun Dec 30 15:48:35 2012
@@ -0,0 +1,99 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?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.
+ -->
+
+<!--
+ This security file uses the default spring simple form login
+-->
+<beans xmlns="http://www.springframework.org/schema/beans"
+ xmlns:security="http://www.springframework.org/schema/security"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans.xsd
+ http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security.xsd">
+
+ <security:http auto-config="true" use-expressions="true" disable-url-rewriting="true">
+ <security:intercept-url pattern="/static/**" access="permitAll"/>
+ <security:intercept-url pattern="/login" access="permitAll"/>
+ <security:intercept-url pattern="/newaccount.jsp*" access="permitAll"/>
+ <security:intercept-url pattern="/app/newaccount*" access="permitAll"/>
+ <security:intercept-url pattern="/app/newpassword/**" access="permitAll"/>
+ <security:intercept-url pattern="/app/retrieveusername/**" access="permitAll"/>
+ <security:intercept-url pattern="/app/changepassword/**" access="permitAll"/>
+ <security:intercept-url pattern="/app/messagebundle/*.js" access="permitAll"/>
+ <security:intercept-url pattern="/app/admin/**" access="hasRole('ROLE_ADMIN')"/> <!-- all urls must be authenticated -->
+ <security:intercept-url pattern="/**" access="hasAnyRole('ROLE_USER','ROLE_ADMIN')"/>
+
+
+ <!-- Set the user service ref here to the implementation you want to use. The name is
+ defined in the @Service annotation of the corresponding service source code.
+ -->
+ <security:openid-login user-service-ref="customUserService" authentication-failure-handler-ref="openIdAuthFailureHandler">
+ <security:attribute-exchange identifier-match="https://www.google.com.*">
+ <security:openid-attribute name="email" type="http://axschema.org/contact/email" required="true" count="1"/>
+ <security:openid-attribute name="firstname" type="http://axschema.org/namePerson/first" required="true"/>
+ <security:openid-attribute name="lastname" type="http://axschema.org/namePerson/last" required="true"/>
+ </security:attribute-exchange>
+ <security:attribute-exchange identifier-match=".*openid-provider.appspot.com.*">
+ <security:openid-attribute name="email" type="http://axschema.org/contact/email" required="true" count="1"/>
+ <security:openid-attribute name="firstname" type="http://axschema.org/namePerson/first" required="true"/>
+ <security:openid-attribute name="lastname" type="http://axschema.org/namePerson/last" required="true"/>
+ </security:attribute-exchange>
+ <security:attribute-exchange identifier-match=".*yahoo.com.*">
+ <security:openid-attribute name="email" type="http://axschema.org/contact/email" required="true"/>
+ <security:openid-attribute name="fullname" type="http://axschema.org/namePerson" required="true"/>
+ </security:attribute-exchange>
+ <security:attribute-exchange identifier-match=".*myopenid.com.*">
+ <security:openid-attribute name="email" type="http://schema.openid.net/contact/email" required="true" count="1"/>
+ <security:openid-attribute name="fullname" type="http://schema.openid.net/namePerson" required="true"/>
+ </security:attribute-exchange>
+ </security:openid-login>
+ <security:form-login login-page="/login" default-target-url="/" authentication-failure-url="/login?authfail=form" />
+ <security:logout/>
+ </security:http>
+
+ <security:authentication-manager>
+ <!-- Set the user service ref here to the implementation you want to use. The name is
+ defined in the @Service annotation of the corresponding service source code.
+ -->
+ <security:authentication-provider user-service-ref="customUserService">
+ <security:password-encoder ref="passwordEncoder" />
+ </security:authentication-provider>
+ <!-- No LDAP authentication in this custom project -->
+ </security:authentication-manager>
+
+ <bean id="openIdAuthFailureHandler" class="org.apache.rave.portal.web.controller.handler.OpenIDAuthenticationFailureHandler">
+ <property name="defaultFailureUrl" value="/login?authfail=openid"/>
+ </bean>
+
+ <!-- enable the spring security annotations -->
+ <security:global-method-security secured-annotations="enabled" pre-post-annotations="enabled">
+ <security:expression-handler ref="expressionHandler"/>
+ </security:global-method-security>
+ <!-- override the default permissionEvaluator bean used by Spring Security with our custom RavePermissionEvaluator -->
+ <bean id="expressionHandler" class="org.apache.rave.portal.security.impl.RaveMethodSecurityExpressionHandler">
+ <property name="permissionEvaluator" ref="ravePermissionEvaluator" />
+ </bean>
+
+ <!-- Need to define customUserService because its package is not scanned automatically -->
+ <bean id="customUserService" class="${package}.CustomUserService"/>
+
+</beans>
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/tags/custom_css.tag
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/tags/custom_css.tag?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/tags/custom_css.tag (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/tags/custom_css.tag Sun Dec 30 15:48:35 2012
@@ -0,0 +1,22 @@
+<%@ tag language="java" pageEncoding="UTF-8"%>
+<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
+<%--
+ 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.
+ --%>
+
+<link rel="stylesheet" href="<c:url value="/static/css/custom.css" />" />
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/web.xml?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/web.xml (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/WEB-INF/web.xml Sun Dec 30 15:48:35 2012
@@ -0,0 +1,79 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?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.
+ -->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ id="Shindig"
+ version="2.5">
+
+ <display-name>Rave Portal</display-name>
+
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>
+ /WEB-INF/dataContext.xml
+ /WEB-INF/applicationContext.xml
+ /WEB-INF/applicationContext-security.xml
+ </param-value>
+ </context-param>
+ <listener>
+ <listener-class>org.springframework.web.context.ContextLoaderListener</listener-class>
+ </listener>
+ <filter>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <filter-class>org.springframework.web.filter.DelegatingFilterProxy</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>springSecurityFilterChain</filter-name>
+ <url-pattern>/*</url-pattern>
+ </filter-mapping>
+
+ <!-- Handles all requests into the application -->
+ <servlet>
+ <servlet-name>dispatcher</servlet-name>
+ <servlet-class>org.springframework.web.servlet.DispatcherServlet</servlet-class>
+ <load-on-startup>1</load-on-startup>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>dispatcher</servlet-name>
+ <url-pattern>/app/*</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>dispatcher</servlet-name>
+ <url-pattern>/index.html</url-pattern>
+ </servlet-mapping>
+ <servlet-mapping>
+ <servlet-name>dispatcher</servlet-name>
+ <url-pattern>/login</url-pattern>
+ </servlet-mapping>
+
+ <welcome-file-list>
+ <welcome-file>index.html</welcome-file>
+ </welcome-file-list>
+
+ <error-page>
+ <exception-type>java.lang.Throwable</exception-type>
+ <location>/WEB-INF/jsp/views/error.jsp</location>
+ </error-page>
+</web-app>
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/static/css/custom.css
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/static/css/custom.css?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/static/css/custom.css (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/main/webapp/static/css/custom.css Sun Dec 30 15:48:35 2012
@@ -0,0 +1,52 @@
+/*
+ * 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.
+ */
+
+body{
+height:100%;
+}
+
+body, #pageContent{
+background-color:#ffffff;
+background-image:url('data:image/svg+xml;base64,PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0idXRmLTgiPz4gPHN2ZyB2ZXJzaW9uPSIxLjEiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyI+PGRlZnM+PGxpbmVhckdyYWRpZW50IGlkPSJncmFkIiBncmFkaWVudFVuaXRzPSJ1c2VyU3BhY2VPblVzZSIgeDE9IjUwJSIgeTE9IjAlIiB4Mj0iNTAlIiB5Mj0iMTAwJSI+PHN0b3Agb2Zmc2V0PSIwJSIgc3RvcC1jb2xvcj0iIzllY2ZmNSIvPjxzdG9wIG9mZnNldD0iMTAwJSIgc3RvcC1jb2xvcj0iI2ZmZmZmZiIvPjwvbGluZWFyR3JhZGllbnQ+PC9kZWZzPjxyZWN0IHg9IjAiIHk9IjAiIHdpZHRoPSIxMDAlIiBoZWlnaHQ9IjEwMCUiIGZpbGw9InVybCgjZ3JhZCkiIC8+PC9zdmc+IA==');
+background-size:100%;
+background-image:-webkit-gradient(linear,50% 0,50% 320,color-stop(0%,#9ecff5),color-stop(100%,#fff));
+background-image:-webkit-linear-gradient(top,#9ecff5,#fff 320px);
+background-image:-moz-linear-gradient(top,#9ecff5,#fff 320px);
+background-image:-o-linear-gradient(top,#9ecff5,#fff 320px);
+background-image:-ms-linear-gradient(top,#9ecff5,#fff 320px);
+background-image:linear-gradient(top,#9ecff5,#fff 320px);
+background-repeat:no-repeat;background-image:-webkit-gradient(linear,0 0,0 320,from(#9ecff5),to(white));
+}
+.page {
+padding: 40px!important;
+}
+
+.dialog.center {
+left: 50%;
+margin-left: -265px;
+margin-top: -160px;
+position: absolute;
+top: 20%;
+width: 500px;
+}
+
+.dialog_content {
+position: relative;
+padding-bottom: 65px;
+}
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/java/CustomUserServiceTest.java
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/java/CustomUserServiceTest.java?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/java/CustomUserServiceTest.java (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/java/CustomUserServiceTest.java Sun Dec 30 15:48:35 2012
@@ -0,0 +1,137 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+/*
+ * 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.
+ */
+
+package ${package};
+
+import org.apache.rave.portal.model.User;
+import org.apache.rave.portal.model.impl.UserImpl;
+import org.apache.rave.portal.repository.CategoryRepository;
+import org.apache.rave.portal.repository.PageRepository;
+import org.apache.rave.portal.repository.PageTemplateRepository;
+import org.apache.rave.portal.repository.PersonRepository;
+import org.apache.rave.portal.repository.UserRepository;
+import org.apache.rave.portal.repository.WidgetRepository;
+import org.junit.Before;
+import org.junit.Test;
+import org.springframework.security.authentication.TestingAuthenticationToken;
+import org.springframework.security.core.Authentication;
+import org.springframework.security.core.GrantedAuthority;
+import org.springframework.security.core.authority.SimpleGrantedAuthority;
+import org.springframework.security.core.context.SecurityContextHolder;
+import org.springframework.security.core.userdetails.UserDetails;
+import org.springframework.security.core.userdetails.UsernameNotFoundException;
+
+import java.util.ArrayList;
+import java.util.List;
+
+import static junit.framework.Assert.assertEquals;
+import static junit.framework.Assert.assertFalse;
+import static org.easymock.EasyMock.createMock;
+import static org.easymock.EasyMock.expect;
+import static org.easymock.EasyMock.expectLastCall;
+import static org.easymock.EasyMock.replay;
+import static org.easymock.EasyMock.verify;
+
+/*
+ * 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.
+ */
+
+/**
+ * Test class for {@link CustomUserService}
+ */
+public class CustomUserServiceTest {
+
+ private UserRepository repository;
+ private CustomUserService userService;
+
+ @Before
+ public void setUp() throws Exception {
+ repository = createMock(UserRepository.class);
+ userService = new CustomUserService(repository,
+ createMock(PageRepository.class),
+ createMock(WidgetRepository.class),
+ createMock(PageTemplateRepository.class),
+ createMock(CategoryRepository.class),
+ createMock(PersonRepository.class));
+ }
+
+ @Test
+ public void testLoadUserByUsername() throws Exception {
+ final String username = "canonical";
+ User user = new UserImpl("1", username);
+ expect(repository.getByUsername(username)).andReturn(user);
+ replay(repository);
+
+ UserDetails returnedUser = userService.loadUserByUsername(username);
+ verify(repository);
+ assertEquals(returnedUser, user);
+ }
+
+ @Test(expected = UsernameNotFoundException.class)
+ public void testLoadUserByUsername_fail() throws Exception {
+ final String username = "missing";
+
+ expect(repository.getByUsername(username)).andReturn(null);
+ expectLastCall();
+ replay(repository);
+
+ userService.loadUserByUsername(username);
+
+ assertFalse("Method should throw Exception", true);
+ }
+
+ @Test
+ public void testGetAuthenticatedUser() throws Exception {
+ List<GrantedAuthority> grantedAuthorities = new ArrayList<GrantedAuthority>();
+ grantedAuthorities.add(new SimpleGrantedAuthority("ROLE_USER"));
+ UserDetails userDetails = new UserImpl("1", "canonical");
+ Authentication authentication = new TestingAuthenticationToken(userDetails, "canonical", grantedAuthorities);
+ SecurityContextHolder.getContext().setAuthentication(authentication);
+
+ User returnedUser = userService.getAuthenticatedUser();
+ assertEquals(returnedUser, userDetails);
+ }
+
+ @Test(expected = SecurityException.class)
+ public void testGetAuthenticatedUser_fail() throws Exception {
+ SecurityContextHolder.getContext().setAuthentication(null);
+
+ userService.getAuthenticatedUser();
+
+ assertFalse("Method should throw Exception", true);
+ }
+}
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/resources/log4j.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/resources/log4j.xml?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/resources/log4j.xml (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-portal/src/test/resources/log4j.xml Sun Dec 30 15:48:35 2012
@@ -0,0 +1,54 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?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.
+ -->
+<!DOCTYPE log4j:configuration PUBLIC "-//LOGGER" "log4j.dtd">
+<log4j:configuration xmlns:log4j="http://jakarta.apache.org/log4j/">
+
+ <!-- Appenders -->
+ <appender name="console" class="org.apache.log4j.ConsoleAppender">
+ <param name="Target" value="System.out" />
+ <layout class="org.apache.log4j.PatternLayout">
+ <param name="ConversionPattern" value="%-5p: %c - %m%n" />
+ </layout>
+ </appender>
+
+ <!-- Springframework logger -->
+ <logger name="org.springframework">
+ <level value="info" />
+ </logger>
+
+ <!-- Rave logger -->
+ <logger name="org.apache.rave">
+ <level value="debug" />
+ </logger>
+
+ <logger name="${groupId}">
+ <level value="debug" />
+ </logger>
+
+ <!-- Root Logger -->
+ <root>
+ <priority value="warn" />
+ <appender-ref ref="console" />
+ </root>
+
+</log4j:configuration>
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/pom.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/pom.xml?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/pom.xml (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/pom.xml Sun Dec 30 15:48:35 2012
@@ -0,0 +1,93 @@
+<?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.
+ -->
+<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">
+ <parent>
+ <artifactId>${rootArtifactId}</artifactId>
+ <groupId>${groupId}</groupId>
+ <version>${version}</version>
+ <relativePath>../pom.xml</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+
+ <artifactId>${artifactId}</artifactId>
+ <name>${projectName} :: ${artifactId}</name>
+ <packaging>war</packaging>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-shindig</artifactId>
+ <type>war</type>
+ <version>${apache.rave.version}</version>
+ </dependency>
+ </dependencies>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
+ <resources>
+ <resource>
+ <directory>src/main/resources</directory>
+ <filtering>true</filtering>
+ </resource>
+ </resources>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-war-plugin</artifactId>
+ <configuration>
+ <overlays>
+ <overlay>
+ <groupId>org.apache.rave</groupId>
+ <artifactId>rave-shindig</artifactId>
+ <!-- Example exclusions for files we overrides
+ This isn't technically required (as we overlay) but made explicit this way
+ -->
+ <excludes>
+ <exclude>WEB-INF/web.xml</exclude>
+ </excludes>
+ </overlay>
+ </overlays>
+ </configuration>
+ </plugin>
+ <plugin>
+ <groupId>com.googlecode.mavenfilesync</groupId>
+ <artifactId>maven-filesync-plugin</artifactId>
+ <configuration>
+ <mappings>
+ <mapping>
+ <sourceFolder>src/main/webapp</sourceFolder>
+ <destinationFolder>@../${rootArtifactId}-portal/target/tomcat6x/webapps/ROOT</destinationFolder>
+ </mapping>
+ <mapping>
+ <sourceFolder>src/main/resources</sourceFolder>
+ <destinationFolder>@../${rootArtifactId}-portal/target/tomcat6x/webapps/ROOT/WEB-INF/classes</destinationFolder>
+ </mapping>
+ </mappings>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+</project>
Added: rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/src/main/webapp/WEB-INF/web.xml?rev=1426955&view=auto
==============================================================================
--- rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/src/main/webapp/WEB-INF/web.xml (added)
+++ rave/trunk/rave-custom-project-archetype/src/main/resources/archetype-resources/__rootArtifactId__-shindig/src/main/webapp/WEB-INF/web.xml Sun Dec 30 15:48:35 2012
@@ -0,0 +1,355 @@
+#set( $symbol_pound = '#' )
+#set( $symbol_dollar = '$' )
+#set( $symbol_escape = '\' )
+<?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.
+ -->
+
+<!--
+ Exact copy of rave-shindig/src/main/webapp/WEB-INF/web.xml
+ Maven cannot compile a war without a web.xml
+-->
+<web-app xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xmlns="http://java.sun.com/xml/ns/javaee"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"
+ id="Shindig"
+ version="2.5">
+ <display-name>Shindig</display-name>
+
+ <!-- Spring context configuration -->
+ <context-param>
+ <param-name>contextConfigLocation</param-name>
+ <param-value>
+ classpath:rave-shindig-applicationContext.xml
+ classpath:rave-shindig-dataContext.xml
+ classpath:modules-context.xml
+ </param-value>
+ </context-param>
+
+ <!--
+ Syntax: <key>=<value> separated by a newline
+
+ system.properties specifies the environmental variables that will be set to the JVM System Properties at server startup time.
+ Alternatively, you may add these values in your app server (ex: Tomcat) as
+ VM arguments like this: -Dshindig.host="my.production.shindig.server.com".
+
+ Here are a few properties that can be set for Shindig:
+ shindig.host: the server name that Shindig is deployed and running on
+ shindig.port: the port number of shindig.host server
+
+ Make sure you escape all HTML values for the web.xml to be parsed correctly.
+ -->
+ <context-param>
+ <param-name>system.properties</param-name>
+ <param-value>
+ <![CDATA[
+ shindig.host=
+ shindig.port=
+ aKey=/shindig/gadgets/proxy?container=default&url=
+ ]]>
+ </param-value>
+ </context-param>
+
+ <filter>
+ <filter-name>hostFilter</filter-name>
+ <filter-class>org.apache.shindig.common.servlet.HostFilter</filter-class>
+ </filter>
+ <filter-mapping>
+ <filter-name>hostFilter</filter-name>
+ <url-pattern>/gadgets/ifr</url-pattern>
+ <url-pattern>/gadgets/js/*</url-pattern>
+ <url-pattern>/gadgets/proxy/*</url-pattern>
+ <url-pattern>/gadgets/concat</url-pattern>
+ <url-pattern>/gadgets/makeRequest</url-pattern>
+ <url-pattern>/rpc/*</url-pattern>
+ <url-pattern>/rest/*</url-pattern>
+ </filter-mapping>
+
+ <filter>
+ <filter-name>ShiroFilter</filter-name>
+ <filter-class>org.apache.shiro.web.servlet.IniShiroFilter</filter-class>
+ <init-param>
+ <param-name>config</param-name>
+ <param-value>
+ <![CDATA[
+ ${symbol_pound} The ShiroFilter configuration is very powerful and flexible, while still remaining succinct.
+ ${symbol_pound} Please read the comprehensive example, with full comments and explanations, in the JavaDoc:
+ ${symbol_pound}
+ ${symbol_pound} http://www.jsecurity.org/api/org/jsecurity/web/servlet/JSecurityFilter.html
+ [main]
+ shindigSampleRealm = org.apache.shindig.sample.shiro.SampleShiroRealm
+ securityManager.realm = ${symbol_dollar}shindigSampleRealm
+ authc.loginUrl = /login.jsp
+
+ [urls]
+ ${symbol_pound} The /login.jsp is not restricted to authenticated users (otherwise no one could log in!), but
+ ${symbol_pound} the 'authc' filter must still be specified for it so it can process that url's
+ ${symbol_pound} login submissions. It is 'smart' enough to allow those requests through as specified by the
+ ${symbol_pound} shiro.loginUrl above.
+ /login.jsp = authc
+
+ /oauth/authorize/** = authc
+ /oauth2/authorize/** = authc
+ ]]>
+ </param-value>
+ </init-param>
+ </filter>
+
+ <filter>
+ <filter-name>authFilter</filter-name>
+ <filter-class>org.apache.shindig.auth.AuthenticationServletFilter</filter-class>
+ </filter>
+
+ <filter>
+ <filter-name>etagFilter</filter-name>
+ <filter-class>org.apache.shindig.gadgets.servlet.ETagFilter</filter-class>
+ </filter>
+
+
+ <filter-mapping>
+ <filter-name>ShiroFilter</filter-name>
+ <url-pattern>/oauth/authorize</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ShiroFilter</filter-name>
+ <url-pattern>/oauth2/authorize</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>ShiroFilter</filter-name>
+ <url-pattern>*.jsp</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>authFilter</filter-name>
+ <url-pattern>/social/*</url-pattern>
+ <url-pattern>/gadgets/ifr</url-pattern>
+ <url-pattern>/gadgets/makeRequest</url-pattern>
+ <url-pattern>/gadgets/api/rpc/*</url-pattern>
+ <url-pattern>/gadgets/api/rest/*</url-pattern>
+ <url-pattern>/rpc/*</url-pattern>
+ <url-pattern>/rest/*</url-pattern>
+ </filter-mapping>
+
+ <filter-mapping>
+ <filter-name>etagFilter</filter-name>
+ <url-pattern>*</url-pattern>
+ </filter-mapping>
+
+ <!--
+ <listener>
+ <listener-class>org.apache.shindig.common.servlet.GuiceServletContextListener</listener-class>
+ </listener>
+ -->
+
+ <!-- Initialize Spring LAST -->
+ <listener>
+ <listener-class>org.apache.rave.inject.GuiceBindingSpringContextLoaderListener</listener-class>
+ </listener>
+
+ <!-- Render a Gadget -->
+ <servlet>
+ <servlet-name>xml-to-html</servlet-name>
+ <servlet-class>
+ org.apache.shindig.gadgets.servlet.GadgetRenderingServlet
+ </servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>accel</servlet-name>
+ <servlet-class>
+ org.apache.shindig.gadgets.servlet.HtmlAccelServlet
+ </servlet-class>
+ </servlet>
+
+ <!-- Proxy -->
+ <servlet>
+ <servlet-name>proxy</servlet-name>
+ <servlet-class>
+ org.apache.shindig.gadgets.servlet.ProxyServlet
+ </servlet-class>
+ </servlet>
+
+ <!-- makeRequest -->
+ <servlet>
+ <servlet-name>makeRequest</servlet-name>
+ <servlet-class>
+ org.apache.shindig.gadgets.servlet.MakeRequestServlet
+ </servlet-class>
+ </servlet>
+
+ <!-- Concat -->
+ <servlet>
+ <servlet-name>concat</servlet-name>
+ <servlet-class>
+ org.apache.shindig.gadgets.servlet.ConcatProxyServlet
+ </servlet-class>
+ </servlet>
+
+ <!-- OAuth callback -->
+ <servlet>
+ <servlet-name>oauthCallback</servlet-name>
+ <servlet-class>
+ org.apache.shindig.gadgets.servlet.OAuthCallbackServlet
+ </servlet-class>
+ </servlet>
+
+ <!-- OAuth2 callback -->
+ <servlet>
+ <servlet-name>oauth2callback</servlet-name>
+ <servlet-class>
+ org.apache.shindig.gadgets.servlet.OAuth2CallbackServlet
+ </servlet-class>
+ </servlet>
+
+ <!-- Metadata RPC -->
+ <servlet>
+ <servlet-name>metadata</servlet-name>
+ <servlet-class>
+ org.apache.shindig.gadgets.servlet.RpcServlet
+ </servlet-class>
+ </servlet>
+
+ <!-- javascript serving -->
+ <servlet>
+ <servlet-name>js</servlet-name>
+ <servlet-class>org.apache.shindig.gadgets.servlet.JsServlet</servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>restapiServlet</servlet-name>
+ <servlet-class>
+ org.apache.shindig.protocol.DataServiceServlet
+ </servlet-class>
+ <init-param>
+ <param-name>handlers</param-name>
+ <param-value>org.apache.shindig.handlers</param-value>
+ </init-param>
+ </servlet>
+
+ <!-- Serve social RPC api -->
+ <servlet>
+ <servlet-name>jsonRpcServlet</servlet-name>
+ <servlet-class>
+ org.apache.shindig.protocol.JsonRpcServlet
+ </servlet-class>
+ <init-param>
+ <param-name>handlers</param-name>
+ <param-value>org.apache.shindig.handlers</param-value>
+ </init-param>
+ </servlet>
+
+ <!-- Serve sample OAuth apis -->
+ <servlet>
+ <servlet-name>sampleOAuth</servlet-name>
+ <servlet-class>
+ org.apache.shindig.social.sample.oauth.SampleOAuthServlet
+ </servlet-class>
+ </servlet>
+
+ <!-- Serve OAuth 2 APIs -->
+ <servlet>
+ <servlet-name>OAuth2Servlet</servlet-name>
+ <servlet-class>
+ org.apache.shindig.social.core.oauth2.OAuth2Servlet
+ </servlet-class>
+ </servlet>
+
+ <servlet>
+ <servlet-name>rpcSwf</servlet-name>
+ <servlet-class>
+ org.apache.shindig.gadgets.servlet.RpcSwfServlet
+ </servlet-class>
+ </servlet>
+
+ <servlet-mapping>
+ <servlet-name>js</servlet-name>
+ <url-pattern>/gadgets/js/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>proxy</servlet-name>
+ <url-pattern>/gadgets/proxy/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>makeRequest</servlet-name>
+ <url-pattern>/gadgets/makeRequest</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>jsonRpcServlet</servlet-name>
+ <url-pattern>/rpc/*</url-pattern>
+ <url-pattern>/gadgets/api/rpc/*</url-pattern>
+ <url-pattern>/social/rpc/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>restapiServlet</servlet-name>
+ <url-pattern>/rest/*</url-pattern>
+ <url-pattern>/gadgets/api/rest/*</url-pattern>
+ <url-pattern>/social/rest/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>concat</servlet-name>
+ <url-pattern>/gadgets/concat</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>oauthCallback</servlet-name>
+ <url-pattern>/gadgets/oauthcallback</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>oauth2callback</servlet-name>
+ <url-pattern>/gadgets/oauth2callback</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>xml-to-html</servlet-name>
+ <url-pattern>/gadgets/ifr</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>accel</servlet-name>
+ <url-pattern>/gadgets/accel</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>metadata</servlet-name>
+ <url-pattern>/gadgets/metadata</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>sampleOAuth</servlet-name>
+ <url-pattern>/oauth/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>OAuth2Servlet</servlet-name>
+ <url-pattern>/oauth2/*</url-pattern>
+ </servlet-mapping>
+
+ <servlet-mapping>
+ <servlet-name>rpcSwf</servlet-name>
+ <url-pattern>/xpc*</url-pattern>
+ </servlet-mapping>
+</web-app>