tuscany-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jsdelf...@apache.org
Subject svn commit: r567602 - in /incubator/tuscany/java/sca/samples/feed-aggregator: README build.xml
Date Mon, 20 Aug 2007 08:47:12 GMT
Author: jsdelfino
Date: Mon Aug 20 01:47:11 2007
New Revision: 567602

URL: http://svn.apache.org/viewvc?rev=567602&view=rev
Log:
Added readme and build.xml to sample.

Added:
    incubator/tuscany/java/sca/samples/feed-aggregator/README   (with props)
    incubator/tuscany/java/sca/samples/feed-aggregator/build.xml   (with props)

Added: incubator/tuscany/java/sca/samples/feed-aggregator/README
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/feed-aggregator/README?rev=567602&view=auto
==============================================================================
--- incubator/tuscany/java/sca/samples/feed-aggregator/README (added)
+++ incubator/tuscany/java/sca/samples/feed-aggregator/README Mon Aug 20 01:47:11 2007
@@ -0,0 +1,79 @@
+Feed Aggregator Sample
+======================================
+This sample demonstrates using the Feed binding to aggregator ATOM and RSS
+and publish a new aggregated feed.
+
+The README in the samples directory (the directory above this) provides 
+general instructions about building and running samples. Take a look there 
+first. 
+
+If you just want to run it to see what happens open a command prompt, navigate
+to this sample directory and do:
+
+ant run
+
+OR if you don't have ant, on Windows do
+
+java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-feed-aggregator.jar feed.SampleServer
+
+and on *nix do
+
+java -cp ../../lib/tuscany-sca-manifest.jar:target/sample-feed-aggregator.jar feed.SampleServer
+
+Now the server is started you can point your Web browser to the URL of the
+aggregated feeds.
+
+Sample Overview
+---------------
+The sample provides a single component exposing a Web resource.
+
+web-resource/
+  src/
+    main/
+      java/
+        feed/
+          FeedAggregatorImpl.java         - implementation of the Feed
+                                            aggregator component
+          SampleServer.java               - starts the SCA Runtime and 
+                                            publishes the aggregated feeds
+      resources/
+        FeedAggregator.composite          - the SCA assembly for this sample
+  feed-aggregator.png                     - a pictorial representation of the 
+                                            sample .composite file
+  build.xml                               - the Ant build file
+  pom.xml                                 - the Maven build file        
+
+Building And Running The Sample Using Ant
+-----------------------------------------
+With the binary distribution the sample can be built and run using Ant using the 
+following commands
+
+cd feed-aggregator
+ant compile
+ant run
+
+You should see the following output from the run target.
+
+run:
+    [java] Added Servlet mapping: http://localhost:8083/rssAggregator
+    [java] Added Servlet mapping: http://localhost:8083/atomAggregator/*
+    [java] Sample Feed server started (press enter to shutdown)
+
+    [java] To read the aggregated feeds, point your Web browser to the following addresses:
+    [java] http://localhost:8083/atomAggregator
+    [java] http://localhost:8083/atomAggregator/atomsvc (for the Atom service document)
+    [java] http://localhost:8083/rssAggregator
+    [java] http://localhost:8083/atomAggregator?feedType=rss_2.0
+    [java] http://localhost:8083/rssAggregator?feedType=atom_1.0
+     
+As this point the aggregated Feeds are exposed by a web server started
+automatically by the SCA runtime. To stop the server just press enter.
+
+Building The Sample Using Maven 
+-------------------------------------------
+With either the binary or source distributions the sample can be built using
+Maven as follows.
+
+cd feed-aggregator
+mvn
+

Propchange: incubator/tuscany/java/sca/samples/feed-aggregator/README
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/feed-aggregator/README
------------------------------------------------------------------------------
    svn:keywords = Rev Date

Added: incubator/tuscany/java/sca/samples/feed-aggregator/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/samples/feed-aggregator/build.xml?rev=567602&view=auto
==============================================================================
--- incubator/tuscany/java/sca/samples/feed-aggregator/build.xml (added)
+++ incubator/tuscany/java/sca/samples/feed-aggregator/build.xml Mon Aug 20 01:47:11 2007
@@ -0,0 +1,72 @@
+<!--
+ * 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 name="feed-aggregator" default="compile">
+    <property name="test.class" value="feed.SampleServer" />
+	<property name="test.jar"   value="sample-feed-aggregator.jar" />
+	
+    <target name="init">
+        <mkdir dir="target/classes"/>
+    </target>
+	
+    <target name="compile" depends="init">
+        <javac srcdir="src/main/java"
+               destdir="target/classes"
+               debug="on"
+               source="1.5"
+               target="1.5">
+            <classpath>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </javac> 
+        <copy todir="target/classes">
+            <fileset dir="src/main/resources"/>
+        </copy>
+        <jar destfile="target/${test.jar}" basedir="target/classes">
+            <manifest>
+                <attribute name="Main-Class" value="${test.class}" /> 
+            </manifest>
+        </jar>    	
+    </target>	
+	
+    <target name="run-classes">
+        <java classname="${test.class}"
+              fork="true">
+            <classpath>
+                <pathelement path="target/classes"/>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </java>
+    </target>
+	
+    <target name="run">
+        <java classname="${test.class}"
+              fork="true">
+            <classpath>
+                <pathelement path="target/${test.jar}"/>
+            	<pathelement location="../../lib/tuscany-sca-manifest.jar"/>
+            </classpath>
+        </java>    	
+    </target>	
+	
+    <target name="clean">
+        <delete quiet="true" includeemptydirs="true">
+            <fileset dir="target"/>
+        </delete>
+    </target>
+</project>

Propchange: incubator/tuscany/java/sca/samples/feed-aggregator/build.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/tuscany/java/sca/samples/feed-aggregator/build.xml
------------------------------------------------------------------------------
    svn:keywords = Rev Date



---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org


Mime
View raw message