Commit 91cd7af6 authored by Philippe Merle's avatar Philippe Merle

Added a WAR packaging the ohloh-proxy example with the FraSCAti runtime for JDK6.

parent 27d81d0a
......@@ -2,7 +2,7 @@
<!--
* OW2 FraSCAti Examples: Ohloh Proxy
*
* Copyright (c) 2009-2010 INRIA, USTL
* Copyright (c) 2009-2010 INRIA, University of Lille 1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
......@@ -48,5 +48,6 @@
<modules>
<module>standalone</module>
<module>war</module>
<module>war-jkd6</module>
</modules>
</project>
============================================================================
OW2 FraSCAti Examples: Ohloh Proxy Web Application
Copyright (C) 2009-2010 INRIA, University of Lille 1
This library is free software; you can redistribute it and/or
modify it under the terms of the GNU Lesser General Public
License as published by the Free Software Foundation; either
version 2 of the License, or (at your option) any later version.
This library is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
Lesser General Public License for more details.
You should have received a copy of the GNU Lesser General Public
License along with this library; if not, write to the Free Software
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
Contact: frascati@ow2.org
Author: Philippe Merle
Contributor:
============================================================================
FraSCAti RESTful Ohloh Proxy Web Application:
---------------------------------------------
This example shows how to package a RESTful service (ohloh-proxy) into a WAR
and then to deploy it on a Web Application Server like Jetty, Tomcat, JBoss,
Geronimo, JOnAS, etc.
Compilation with Maven:
-----------------------
mvn install
Execution with Maven:
---------------------
mvn jetty:run
This command starts a standalone Jetty server on port 8080. This server loads
the FraSCAti RESTful Ohloh Proxy Web Application on the context path '/ohloh-proxy'.
This war deploys the OW2 FraSCAti Servlet where the SCA composite
'ohloh-proxy' is launched.
Deploying the WAR on a Web Application server:
----------------------------------------------
Install target/ohloh-proxy-web-application.war on your favorite
Web Application server, e.g., Jetty, Tomcat, JBoss, Geronimo, etc.
For instance, for Apache Tomcat:
* copy the war to the Tomcat webapps directory:
cp target/ohloh-proxy-web-application.war $CATALINA_HOME/webapps/ohloh-proxy.war
* Use the Tomcat Manager page to start the war.
For other Web servers, please refer to the documentation of your favorite server.
Using the RESTful Ohloh Proxy from a client Web browser:
--------------------------------------------------------
Open your favorite Web browser and go to:
* http://localhost:8080/ohloh-proxy/ to load the HTML page allowing to interact
with the SCA RESTful Ohloh Proxy service.
* http://localhost:8080/ohloh-proxy/services to see the list of exported RESTful resources.
* http://localhost:8080/ohloh-proxy/services/ohloh?_wadl to obtain the
WADL describing the RESTful Ohloh Proxy service.
Interesting files to read:
--------------------------
* pom.xml contains the Maven process to build the war and start the Jetty server.
* src/main/webapp/WEB-INF/web.xml contains the configuration of the RESTful Ohloh
Proxy Web Application.
* src/main/webapp/index.html is the HTML page accessible by http://localhost:8080/ohloh-proxy/
Let's note that the implementation of the RESTful Ohloh Proxy is available in the directory ../standalone/
<?xml version="1.0"?>
<!--
* OW2 FraSCAti Examples: Ohloh Proxy Web Application for JDK6
*
* Copyright (c) 2009-2010 INRIA, University of Lille 1
*
* This library is free software; you can redistribute it and/or
* modify it under the terms of the GNU Lesser General Public
* License as published by the Free Software Foundation; either
* version 2 of the License, or (at your option) any later version.
*
* This library is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
* Lesser General Public License for more details.
*
* You should have received a copy of the GNU Lesser General Public
* License along with this library; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
-->
<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/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<!-- =================== -->
<!-- General Information -->
<!-- =================== -->
<parent>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>ohloh-proxy-parent</artifactId>
<version>1.3-SNAPSHOT</version>
</parent>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>ohloh-proxy-web-application-jdk6</artifactId>
<packaging>war</packaging>
<name>OW2 FraSCAti Examples: Ohloh Proxy Web Application for JDK6</name>
<url>http://frascati.ow2.org</url>
<inceptionYear>2009</inceptionYear>
<developers>
<developer>
<id>merle</id>
<name>Philippe Merle</name>
<email>Philippe.Merle@inria.fr</email>
<organization>INRIA</organization>
<organizationUrl>http://www.inria.fr</organizationUrl>
<roles>
<role>Architect</role>
<role>Developer</role>
</roles>
</developer>
</developers>
<licenses>
<license>
<name>The GNU Lesser General Public License, Version 2.1</name>
<url>http://www.gnu.org/licenses/lgpl-2.1.html</url>
</license>
</licenses>
<!-- ==========-->
<!-- Reporting -->
<!-- ========= -->
<!-- ============ -->
<!-- Dependencies -->
<!-- ============ -->
<dependencies>
<!-- Include in the war the implementation of the ohloh proxy. -->
<dependency>
<groupId>org.ow2.frascati.examples</groupId>
<artifactId>ohloh-proxy-standalone</artifactId>
<version>${frascati.version}</version>
<exclusions>
<exclusion>
<groupId>org.apache.cxf</groupId>
<artifactId>cxf-rt-transports-http-jetty</artifactId>
</exclusion>
<exclusion>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
</exclusion>
</exclusions>
</dependency>
<!-- Include in the war the OW2 FraSCAti Servlet CXF. -->
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-servlet-cxf</artifactId>
<version>${frascati.version}</version>
</dependency>
<!-- Include in the war the FraSCAti Assembly Factory for JDK6. -->
<dependency>
<groupId>org.ow2.frascati</groupId>
<artifactId>frascati-assembly-factory-jdk6</artifactId>
<version>${frascati.version}</version>
<scope>compile</scope>
</dependency>
</dependencies>
<!-- ======= -->
<!-- Build -->
<!-- ======= -->
<build>
<defaultGoal>war:war</defaultGoal>
<plugins>
<!-- Build the Web Application aRchive. -->
<plugin>
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-war-plugin</artifactId>
<version>2.0</version>
<configuration>
<archive>
<manifest>
<addClasspath>true</addClasspath>
</manifest>
</archive>
</configuration>
</plugin>
<!-- type 'mvn jetty:run' to launch this war with Jetty. -->
<plugin>
<groupId>org.mortbay.jetty</groupId>
<artifactId>maven-jetty-plugin</artifactId>
<configuration>
<scanIntervalSeconds>10</scanIntervalSeconds>
<!-- Here is the path where the war is deployed. -->
<contextPath>/ohloh-proxy</contextPath>
<connectors>
<connector implementation="org.mortbay.jetty.nio.SelectChannelConnector">
<!-- Here is the port where Jetty is deployed. -->
<port>8080</port>
<maxIdleTime>60000</maxIdleTime>
</connector>
</connectors>
</configuration>
</plugin>
</plugins>
</build>
</project>
<?xml version="1.0" encoding="UTF-8"?>
<!-- OW2 FraSCAti Examples: Ohloh Proxy Web Application -->
<!-- Copyright (C) 2009-2010 INRIA, University of Lille 1 -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
<!-- License as published by the Free Software Foundation; either -->
<!-- version 2 of the License, or (at your option) any later version. -->
<!-- -->
<!-- This library is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -->
<!-- Lesser General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU Lesser General Public -->
<!-- License along with this library; if not, write to the Free Software -->
<!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- Contact: frascati@ow2.org -->
<!-- -->
<!-- Author: Philippe Merle -->
<!-- -->
<!-- Contributor: -->
<!-- -->
<web-app id="OW2-FraSCAti-Examples-Ohloh-Proxy-Web-Application" version="2.4"
xmlns="http://java.sun.com/xml/ns/j2ee"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-app_2_4.xsd">
<display-name>OW2 FraSCAti Ohloh Proxy Web Application</display-name>
<welcome-file-list>
<welcome-file>index.html</welcome-file>
</welcome-file-list>
<!-- OW2 FraSCAti Servlet -->
<servlet>
<servlet-name>FraSCAtiServlet</servlet-name>
<servlet-class>org.ow2.frascati.servlet.FraSCAtiServlet</servlet-class>
<init-param>
<param-name>composite</param-name>
<!-- Here is the list of composites to start. -->
<param-value>ohloh-proxy</param-value>
</init-param>
<load-on-startup>1</load-on-startup>
</servlet>
<servlet-mapping>
<servlet-name>FraSCAtiServlet</servlet-name>
<!-- Here is the url pattern where SCA WS and RESTful bindings are exposed. -->
<url-pattern>/services/*</url-pattern>
</servlet-mapping>
</web-app>
<!-- OW2 FraSCAti Examples: Ohloh Proxy Web Application -->
<!-- Copyright (C) 2009-2010 INRIA, University of Lille 1 -->
<!-- -->
<!-- This library is free software; you can redistribute it and/or -->
<!-- modify it under the terms of the GNU Lesser General Public -->
<!-- License as published by the Free Software Foundation; either -->
<!-- version 2 of the License, or (at your option) any later version. -->
<!-- -->
<!-- This library is distributed in the hope that it will be useful, -->
<!-- but WITHOUT ANY WARRANTY; without even the implied warranty of -->
<!-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU -->
<!-- Lesser General Public License for more details. -->
<!-- -->
<!-- You should have received a copy of the GNU Lesser General Public -->
<!-- License along with this library; if not, write to the Free Software -->
<!-- Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA -->
<!-- -->
<!-- Contact: frascati@ow2.org -->
<!-- -->
<!-- Author: Philippe Merle -->
<!-- -->
<!-- Contributor: -->
<!-- -->
<html>
<head>
<title>OW2 FraSCAti Ohloh Proxy Web Application</title>
</head>
<body>
<center>
<font size="+2"><b>OW2 FraSCAti Ohloh Proxy Web Application</b></font>
<br/>
<br/>
<form method="get" onsubmit="this.action = 'services/ohloh/projects/' + this.project.value +'.xml'; return true;">
Enter an Ohloh project name: <input name="project" type="text">
<input type="submit" value="Get Ohloh information">
</form>
</center>
</body>
</html>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment