You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by sv...@apache.org on 2007/09/18 07:37:11 UTC
svn commit: r576708 - in
/incubator/tuscany/branches/sca-java-1.0/samples/feed-aggregator-webapp:
README build.xml
Author: svkrish
Date: Mon Sep 17 22:37:11 2007
New Revision: 576708
URL: http://svn.apache.org/viewvc?rev=576708&view=rev
Log:
applying patch submitted for https://issues.apache.org/jira/browse/TUSCANY-1730
Modified:
incubator/tuscany/branches/sca-java-1.0/samples/feed-aggregator-webapp/README
incubator/tuscany/branches/sca-java-1.0/samples/feed-aggregator-webapp/build.xml
Modified: incubator/tuscany/branches/sca-java-1.0/samples/feed-aggregator-webapp/README
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.0/samples/feed-aggregator-webapp/README?rev=576708&r1=576707&r2=576708&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.0/samples/feed-aggregator-webapp/README (original)
+++ incubator/tuscany/branches/sca-java-1.0/samples/feed-aggregator-webapp/README Mon Sep 17 22:37:11 2007
@@ -1,79 +1,50 @@
-Feed Aggregator Sample
-======================================
-This sample demonstrates using the Feed binding to aggregator ATOM and RSS
-and publish a new aggregated feed.
+Feed-aggregator-webapp Sample
+=============================
+This sample demonstrates using the Feed binding to aggregate ATOM and RSS
+feeds and publish a new aggregated feed in a webapp.
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:
+As this sample provides a web app there is a manual step where the WAR file
+that contains the sample is copied to your web app container. If you just want
+to give this sample a go deploy the WAR file (target/sample-feed-aggregator-webapp.war) to your web application server.
-ant run
+Once the web app is deployed use your browser to visit the following URL:
-OR if you don't have ant, on Windows do
+http://localhost:8080/sample-feed-aggregator-webapp
-java -cp ..\..\lib\tuscany-sca-manifest.jar;target\sample-feed-aggregator.jar feed.SampleServer
+You will then see the following displayed in your Web browser.
-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.
+http://localhost:8083/atomAggregator
+http://localhost:8083/atomAggregator/atomsvc
+http://localhost:8083/rssAggregator
+http://localhost:8083/atomAggregator?feedType=rss_2.0
+http://localhost:8083/rssAggregator?feedType=atom_1.0
-Building The Sample Using Maven
+** Please note that if your browser is not configured correctly to receive feed information, you can open each file that contains the feed information.
+
+
+Building And Running The Sample Using Ant
-------------------------------------------
-With either the binary or source distributions the sample can be built using
-Maven as follows.
+With the binary distribution the sample can be built using Ant as
+follows
+
+cd feed-aggregator-webapp
+ant package
+
+This should result in a war file (sample-feed-aggregator-webapp.war) in the target directory. Copy this war file to your web app deployment directory and follow instructions at the begining of this README.
+
-cd feed-aggregator
+Building And Running The Sample Using Maven
+-------------------------------------------
+With either the binary or source distributions the sample can be built and run
+using Maven as follows.
+
+cd feed-aggregator-webapp
mvn
+
+This should result in a war file (sample-feed-aggregator-webapp.war) in the target directory. Follow the steps described in the previous section for running the web app and for the expected results.
+
Modified: incubator/tuscany/branches/sca-java-1.0/samples/feed-aggregator-webapp/build.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/branches/sca-java-1.0/samples/feed-aggregator-webapp/build.xml?rev=576708&r1=576707&r2=576708&view=diff
==============================================================================
--- incubator/tuscany/branches/sca-java-1.0/samples/feed-aggregator-webapp/build.xml (original)
+++ incubator/tuscany/branches/sca-java-1.0/samples/feed-aggregator-webapp/build.xml Mon Sep 17 22:37:11 2007
@@ -16,54 +16,96 @@
* 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" />
-
+<project name="sample-feed-aggregator-webapp" default="package">
+ <property file="${user.home}/tuscany/build.properties" />
+ <property file="${user.home}/build.properties" />
+
+ <property name="tuscany.sca.manifest.location" value="../../lib/tuscany-sca-manifest.jar"/>
+ <property name="tuscany.sca.lib.location" value="../../lib"/>
+ <property name="tuscany.sca.modules.location" value="../../modules"/>
+
+ <path id="project.classpath">
+ <pathelement path="target/classes"/>
+ <pathelement location="${tuscany.sca.manifest.location}"/>
+ </path>
+
<target name="init">
<mkdir dir="target/classes"/>
</target>
+
<target name="compile" depends="init">
- <javac srcdir="src/main/java"
- destdir="target/classes"
+ <javac destdir="target/classes"
debug="on"
source="1.5"
target="1.5">
- <classpath>
- <pathelement location="../../lib/tuscany-sca-manifest.jar"/>
- </classpath>
+ <src location="src/main/java"/>
+ <classpath refid="project.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="package" depends="compile">
+ <war destfile="target/sample-feed-aggregator-webapp.war"
+ webxml="src/main/webapp/WEB-INF/web.xml">
+ <fileset dir="src/main/webapp"/>
+ <zipfileset dir="${tuscany.sca.modules.location}" prefix="WEB-INF/lib">
+ <include name="tuscany-interface-java-xml-1.0-incubating.jar"/>
+ <include name="tuscany-policy-1.0-incubating.jar"/>
+ <include name="tuscany-implementation-java-xml-1.0-incubating.jar"/>
+ <include name="tuscany-domain-api-1.0-incubating.jar"/>
+ <include name="tuscany-interface-java-1.0-incubating.jar"/>
+ <include name="tuscany-contribution-java-1.0-incubating.jar"/>
+ <include name="tuscany-core-spi-1.0-incubating.jar"/>
+ <include name="tuscany-core-databinding-1.0-incubating.jar"/>
+ <include name="tuscany-binding-sca-1.0-incubating.jar"/>
+ <include name="tuscany-host-webapp-1.0-incubating.jar"/>
+ <include name="tuscany-contribution-impl-1.0-incubating.jar"/>
+ <include name="tuscany-assembly-xsd-1.0-incubating.jar"/>
+ <include name="tuscany-definitions-1.0-incubating.jar"/>
+ <include name="tuscany-databinding-1.0-incubating.jar"/>
+ <include name="tuscany-contribution-namespace-1.0-incubating.jar"/>
+ <include name="tuscany-binding-sca-xml-1.0-incubating.jar"/>
+ <include name="tuscany-implementation-java-1.0-incubating.jar"/>
+ <include name="tuscany-policy-xml-1.0-incubating.jar"/>
+ <include name="tuscany-node-api-1.0-incubating.jar"/>
+ <include name="tuscany-node-1.0-incubating.jar"/>
+ <include name="tuscany-host-embedded-1.0-incubating.jar"/>
+ <include name="tuscany-contribution-1.0-incubating.jar"/>
+ <include name="tuscany-core-1.0-incubating.jar"/>
+ <include name="tuscany-domain-1.0-incubating.jar"/>
+ <include name="tuscany-sca-api-1.0-incubating.jar"/>
+ <include name="tuscany-host-http-1.0-incubating.jar"/>
+ <include name="tuscany-interface-1.0-incubating.jar"/>
+
+ </zipfileset>
+ <lib dir="${tuscany.sca.lib.location}">
+ <include name="geronimo-commonj_1.1_spec-1.0.jar"/>
+ <include name="sca-api-1.0-incubating.jar"/>
+ <include name="axiom-impl-1.2.5.jar"/>
+ <include name="xml-apis-1.0.b2.jar"/>
+ <include name="stax-api-1.0.1.jar"/>
+ <include name="xalan-2.7.0.jar"/>
+ <include name="commons-httpclient-3.0.1.jar"/>
+ <include name="axiom-api-1.2.5.jar"/>
+ <include name="neethi-2.0.2.jar"/>
+ <include name="sca-definitions-1.0-incubating.jar"/>
+ <include name="rome-0.9.jar"/>
+ <include name="cglib-nodep-2.1_3.jar"/>
+ <include name="commons-logging-1.0.3.jar"/>
+ <include name="xercesImpl-2.6.2.jar"/>
+ <include name="wstx-asl-3.2.1.jar"/>
+ <include name="commons-codec-1.2.jar"/>
+ <include name="jaxen-1.1-beta-9.jar"/>
+ <include name="jdom-1.0.jar"/>
+
+ </lib>
+ <classes dir="target/classes"/>
+ </war>
+ </target>
+
<target name="clean">
<delete quiet="true" includeemptydirs="true">
<fileset dir="target"/>
---------------------------------------------------------------------
To unsubscribe, e-mail: tuscany-commits-unsubscribe@ws.apache.org
For additional commands, e-mail: tuscany-commits-help@ws.apache.org