incubator-aries-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From hugh...@apache.org
Subject svn commit: r1023709 - in /incubator/aries/trunk/application/application-itest-twitter: ./ twitter-bundle/ twitter-bundle/src/ twitter-bundle/src/main/ twitter-bundle/src/main/java/ twitter-bundle/src/main/java/org/ twitter-bundle/src/main/java/org/apa...
Date Mon, 18 Oct 2010 09:47:41 GMT
Author: hughesj
Date: Mon Oct 18 09:47:40 2010
New Revision: 1023709

URL: http://svn.apache.org/viewvc?rev=1023709&view=rev
Log:
ARIES-461 Twitter client bundle using twitter4j and commons lang included in an eba archive
that doesn't include those dependencies. This isn't used in a test case yet

Added:
    incubator/aries/trunk/application/application-itest-twitter/
    incubator/aries/trunk/application/application-itest-twitter/pom.xml   (with props)
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/pom.xml   (with
props)
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/twitter/
    incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/twitter/TwitterQuery.java
  (with props)
    incubator/aries/trunk/application/application-itest-twitter/twitter-eba/
    incubator/aries/trunk/application/application-itest-twitter/twitter-eba/pom.xml   (with
props)

Added: incubator/aries/trunk/application/application-itest-twitter/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-itest-twitter/pom.xml?rev=1023709&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-itest-twitter/pom.xml (added)
+++ incubator/aries/trunk/application/application-itest-twitter/pom.xml Mon Oct 18 09:47:40
2010
@@ -0,0 +1,55 @@
+<!--
+ 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/maven-v4_0_0.xsd">
+    <modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.aries.application</groupId>
+        <artifactId>application</artifactId>
+        <version>0.3-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>twitter</artifactId>
+    <groupId>org.apache.aries.application.itest.twitter</groupId>
+    <packaging>pom</packaging>
+    <name>Apache Aries Application itests Twitter sample application</name>
+    <description>
+      Application used to test pulling in dependency bundles from a remote repository rather
than including them in the .eba
+    </description>
+
+    <dependencyManagement>
+        <dependencies>
+            <dependency>
+                <groupId>org.apache.aries.application.itest.twitter</groupId>
+                <artifactId>org.apache.aries.application.itest.twitter.bundle</artifactId>
+                <version>${version}</version>
+            </dependency>
+            <dependency>
+                <groupId>org.apache.aries.application.itest.twitter</groupId>
+                <artifactId>org.apache.aries.application.itest.twitter.eba</artifactId>
+                <version>${version}</version>
+            </dependency>
+        </dependencies>
+    </dependencyManagement>
+
+	<modules>
+		<module>twitter-bundle</module>
+		<module>twitter-eba</module>
+	</modules>
+
+</project>

Propchange: incubator/aries/trunk/application/application-itest-twitter/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/application/application-itest-twitter/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/application/application-itest-twitter/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/pom.xml?rev=1023709&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/pom.xml (added)
+++ incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/pom.xml Mon
Oct 18 09:47:40 2010
@@ -0,0 +1,65 @@
+<?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/maven-v4_0_0.xsd">
+
+	<modelVersion>4.0.0</modelVersion>
+    <parent>
+        <groupId>org.apache.aries.application.itest.twitter</groupId>
+        <artifactId>twitter</artifactId>
+        <version>0.3-incubating-SNAPSHOT</version>
+    </parent>
+
+	<artifactId>org.apache.aries.application.itest.twitter.bundle</artifactId>
+	<name>Apache Aries Twitter itest bundle</name>
+	<packaging>bundle</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.twitter4j</groupId>
+            <artifactId>twitter4j-core</artifactId>
+            <version>2.1.6</version>
+        </dependency>
+        <dependency>
+            <groupId>commons-lang</groupId>
+            <artifactId>commons-lang</artifactId>
+            <version>2.4</version>
+        </dependency>
+        <dependency>
+            <groupId>org.osgi</groupId>
+            <artifactId>org.osgi.core</artifactId>
+            <scope>provided</scope>
+        </dependency>
+    </dependencies>
+
+	<build>
+		<plugins>
+			<plugin>
+				<groupId>org.apache.felix</groupId>
+				<artifactId>maven-bundle-plugin</artifactId>
+				<configuration>
+					<instructions>
+                        <Bundle-SymbolicName>${pom.artifactId}</Bundle-SymbolicName>
+                        <Bundle-Activator>org.apache.aries.application.itest.twitter.TwitterQuery</Bundle-Activator>
+                        <Private-Package>org.apache.aries.application.itest.twitter</Private-Package>
+					</instructions>
+				</configuration> 
+			</plugin>
+		</plugins>
+	</build>
+</project>
+	

Propchange: incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml

Added: incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/twitter/TwitterQuery.java
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/twitter/TwitterQuery.java?rev=1023709&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/twitter/TwitterQuery.java
(added)
+++ incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/twitter/TwitterQuery.java
Mon Oct 18 09:47:40 2010
@@ -0,0 +1,60 @@
+/**
+ * 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 org.apache.aries.application.itest.twitter;
+import java.util.List;
+
+import org.osgi.framework.BundleActivator;
+import org.osgi.framework.BundleContext;
+
+import twitter4j.Query;
+import twitter4j.QueryResult;
+import twitter4j.Tweet;
+import twitter4j.Twitter;
+import org.apache.commons.lang.StringEscapeUtils;
+
+public class TwitterQuery implements BundleActivator {
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#start(org.osgi.framework.BundleContext)
+	 */
+	public void start(BundleContext context) throws Exception {
+		Twitter twitter = new Twitter();
+		Query query = new Query("from:theasf");
+		
+		try {
+			QueryResult result = twitter.search(query);
+		    List<Tweet> tweets = result.getTweets(); 
+		    System.out.println("hits:" + tweets.size());
+		    for (Tweet tweet : result.getTweets()) {
+		        System.out.println(tweet.getFromUser() + ":" + StringEscapeUtils.unescapeXml(tweet.getText()));
+		    }
+		} catch (Exception e) {
+			e.printStackTrace();
+		}
+	}
+
+	/*
+	 * (non-Javadoc)
+	 * @see org.osgi.framework.BundleActivator#stop(org.osgi.framework.BundleContext)
+	 */
+	public void stop(BundleContext context) throws Exception {
+	}
+
+}

Propchange: incubator/aries/trunk/application/application-itest-twitter/twitter-bundle/src/main/java/org/apache/aries/application/itest/twitter/TwitterQuery.java
------------------------------------------------------------------------------
    svn:executable = *

Added: incubator/aries/trunk/application/application-itest-twitter/twitter-eba/pom.xml
URL: http://svn.apache.org/viewvc/incubator/aries/trunk/application/application-itest-twitter/twitter-eba/pom.xml?rev=1023709&view=auto
==============================================================================
--- incubator/aries/trunk/application/application-itest-twitter/twitter-eba/pom.xml (added)
+++ incubator/aries/trunk/application/application-itest-twitter/twitter-eba/pom.xml Mon Oct
18 09:47:40 2010
@@ -0,0 +1,59 @@
+<?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/maven-v4_0_0.xsd">
+
+    <modelVersion>4.0.0</modelVersion>
+
+    <parent>
+        <groupId>org.apache.aries.application.itest.twitter</groupId>
+        <artifactId>twitter</artifactId>
+        <version>0.3-incubating-SNAPSHOT</version>
+    </parent>
+
+    <artifactId>org.apache.aries.application.itest.twitter.eba</artifactId>
+    <name>Apache Aries Twitter itest EBA</name>
+    <description>This is the module that constructs the Twitter itest application from
the Twitter itest bundle</description>
+    <packaging>eba</packaging>
+
+    <dependencies>
+        <dependency>
+            <groupId>org.apache.aries.application.itest.twitter</groupId>
+            <artifactId>org.apache.aries.application.itest.twitter.bundle</artifactId>
+        </dependency>
+    </dependencies>
+
+    <build>
+        <plugins>
+            <plugin>
+                <groupId>org.apache.aries</groupId>
+                <artifactId>eba-maven-plugin</artifactId>
+                <extensions>true</extensions>
+                <configuration>
+                    <generateManifest>true</generateManifest>
+                    <instructions>
+                        <Application-SymbolicName>${pom.artifactId}</Application-SymbolicName>
+                    </instructions>
+                </configuration>
+            </plugin>
+        </plugins>
+    </build>
+</project>

Propchange: incubator/aries/trunk/application/application-itest-twitter/twitter-eba/pom.xml
------------------------------------------------------------------------------
    svn:eol-style = native

Propchange: incubator/aries/trunk/application/application-itest-twitter/twitter-eba/pom.xml
------------------------------------------------------------------------------
    svn:keywords = Date Revision

Propchange: incubator/aries/trunk/application/application-itest-twitter/twitter-eba/pom.xml
------------------------------------------------------------------------------
    svn:mime-type = text/xml



Mime
View raw message