You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@wookie.apache.org by sc...@apache.org on 2014/02/03 20:12:37 UTC
svn commit: r1564005 - in /wookie/trunk: ./ ant/ connector/ docs/ features/
parser/ scratchpad/shindig/ shindig/ src/ widgets/ wookie-connector/
wookie-connector/java/ wookie-features/ wookie-features/src/
wookie-features/src/main/ wookie-features/src/...
Author: scottbw
Date: Mon Feb 3 19:12:35 2014
New Revision: 1564005
URL: http://svn.apache.org/r1564005
Log:
This is a major restructuring of the project ready for 2.0.0, splitting the project into separate Maven modules
Added:
wookie/trunk/pom.xml
wookie/trunk/scratchpad/shindig/
- copied from r1563137, wookie/trunk/shindig/
wookie/trunk/wookie-connector/
- copied from r1563137, wookie/trunk/connector/
wookie/trunk/wookie-connector/java/pom.xml
wookie/trunk/wookie-features/
wookie/trunk/wookie-features/pom.xml
wookie/trunk/wookie-features/src/
wookie/trunk/wookie-features/src/main/
wookie/trunk/wookie-features/src/main/webapp/
wookie/trunk/wookie-features/src/main/webapp/WEB-INF/
wookie/trunk/wookie-features/src/main/webapp/WEB-INF/web.xml
wookie/trunk/wookie-features/src/main/webapp/features/
wookie/trunk/wookie-features/src/main/webapp/features/camera/
- copied from r1563137, wookie/trunk/features/camera/
wookie/trunk/wookie-features/src/main/webapp/features/conformance/
- copied from r1563137, wookie/trunk/features/conformance/
wookie/trunk/wookie-features/src/main/webapp/features/jqmobile/
- copied from r1563137, wookie/trunk/features/jqmobile/
wookie/trunk/wookie-features/src/main/webapp/features/oauth/
- copied from r1563137, wookie/trunk/features/oauth/
wookie/trunk/wookie-features/src/main/webapp/features/openajax/
- copied from r1563137, wookie/trunk/features/openajax/
wookie/trunk/wookie-features/src/main/webapp/features/polling/
- copied from r1563137, wookie/trunk/features/polling/
wookie/trunk/wookie-features/src/main/webapp/features/wave/
- copied from r1563137, wookie/trunk/features/wave/
wookie/trunk/wookie-features/src/main/webapp/features/widget/
- copied from r1563137, wookie/trunk/features/widget/
wookie/trunk/wookie-features/src/main/webapp/features/wookie-ext/
- copied from r1563137, wookie/trunk/features/wookie-ext/
wookie/trunk/wookie-parser/
- copied from r1563137, wookie/trunk/parser/
wookie/trunk/wookie-parser/java/pom.xml
wookie/trunk/wookie-parser/java/src/test/java/org/apache/wookie/w3c/test/WidgetUploader.java
wookie/trunk/wookie-server/pom.xml
wookie/trunk/wookie-server/src/
- copied from r1563137, wookie/trunk/src/
wookie/trunk/wookie-server/src/main/dist/
wookie/trunk/wookie-server/src/main/dist/conf/
wookie/trunk/wookie-server/src/main/dist/conf/tomcat-users.xml
wookie/trunk/wookie-server/src/main/resources/
wookie/trunk/wookie-server/src/main/resources/META-INF/
- copied from r1563137, wookie/trunk/src/main/java/META-INF/
wookie/trunk/wookie-server/src/main/resources/keys
- copied unchanged from r1563137, wookie/trunk/src/main/java/keys
wookie/trunk/wookie-server/src/main/resources/log4j.properties
- copied unchanged from r1563137, wookie/trunk/src/main/java/log4j.properties
wookie/trunk/wookie-server/src/main/resources/opensocial.properties
- copied unchanged from r1563137, wookie/trunk/src/main/java/opensocial.properties
wookie/trunk/wookie-server/src/main/resources/policies
- copied unchanged from r1563137, wookie/trunk/src/main/java/policies
wookie/trunk/wookie-server/src/main/resources/roles.properties
- copied unchanged from r1563137, wookie/trunk/src/main/java/roles.properties
wookie/trunk/wookie-server/src/main/resources/users.properties
- copied unchanged from r1563137, wookie/trunk/src/main/java/users.properties
wookie/trunk/wookie-server/src/main/resources/widgetserver.properties
- copied, changed from r1563137, wookie/trunk/src/main/java/widgetserver.properties
wookie/trunk/wookie-server/src/main/webapp/META-INF/context.xml
wookie/trunk/wookie-widgets/
- copied from r1563137, wookie/trunk/widgets/
Removed:
wookie/trunk/ant/
wookie/trunk/build.properties
wookie/trunk/build.xml
wookie/trunk/connector/
wookie/trunk/docs/
wookie/trunk/features/
wookie/trunk/ivy.xml
wookie/trunk/parser/
wookie/trunk/pom-template.xml
wookie/trunk/shindig/
wookie/trunk/src/
wookie/trunk/widgets/
wookie/trunk/wookie-connector/java/build.properties
wookie/trunk/wookie-connector/java/build.xml
wookie/trunk/wookie-connector/java/ivy.xml
wookie/trunk/wookie-connector/java/pom-template.xml
wookie/trunk/wookie-connector/java/version.properties
wookie/trunk/wookie-parser/java/ant/
wookie/trunk/wookie-parser/java/build.properties
wookie/trunk/wookie-parser/java/build.xml
wookie/trunk/wookie-parser/java/ivy.xml
wookie/trunk/wookie-parser/java/pom-template.xml
wookie/trunk/wookie-server/src/main/java/META-INF/
wookie/trunk/wookie-server/src/main/java/keys
wookie/trunk/wookie-server/src/main/java/log4j.properties
wookie/trunk/wookie-server/src/main/java/opensocial.properties
wookie/trunk/wookie-server/src/main/java/policies
wookie/trunk/wookie-server/src/main/java/roles.properties
wookie/trunk/wookie-server/src/main/java/users.properties
wookie/trunk/wookie-server/src/main/java/widgetserver.properties
Modified:
wookie/trunk/wookie-parser/java/src/test/java/org/apache/wookie/w3c/test/WidgetOutputterTest.java
wookie/trunk/wookie-server/src/main/webapp/WEB-INF/web.xml
wookie/trunk/wookie-widgets/build.xml
wookie/trunk/wookie-widgets/build_template.xml
wookie/trunk/wookie-widgets/templates/build.xml
Added: wookie/trunk/pom.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/pom.xml?rev=1564005&view=auto
==============================================================================
--- wookie/trunk/pom.xml (added)
+++ wookie/trunk/pom.xml Mon Feb 3 19:12:35 2014
@@ -0,0 +1,48 @@
+<?xml version="1.0"?>
+<!--
+ 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>
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie-project</artifactId>
+ <name>Apache Wookie :: Project</name>
+ <description>Apache Wookie Project</description>
+ <packaging>pom</packaging>
+ <version>2.0.0-SNAPSHOT</version>
+
+ <parent>
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie-master</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath>../wookie-master-pom/trunk/pom.xml</relativePath>
+ </parent>
+
+ <scm>
+ <connection>scm:svn:http://svn.apache.org/repos/asf/wookie/trunk</connection>
+ <developerConnection>scm:svn:https://svn.apache.org/repos/asf/wookie/trunk</developerConnection>
+ <url>http://svn.apache.org/viewvc/wookie/trunk/</url>
+ </scm>
+
+ <modules>
+ <module>wookie-parser/java</module>
+ <module>wookie-connector/java</module>
+ <module>wookie-features</module>
+ <module>wookie-server</module>
+ </modules>
+
+</project>
\ No newline at end of file
Added: wookie/trunk/wookie-connector/java/pom.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-connector/java/pom.xml?rev=1564005&view=auto
==============================================================================
--- wookie/trunk/wookie-connector/java/pom.xml (added)
+++ wookie/trunk/wookie-connector/java/pom.xml Mon Feb 3 19:12:35 2014
@@ -0,0 +1,72 @@
+<?xml version="1.0"?>
+<!--
+ 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">
+
+ <parent>
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie-master</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath>../../../wookie-master-pom/trunk/pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie-java-connector</artifactId>
+ <packaging>jar</packaging>
+ <version>2.0.0-SNAPSHOT</version>
+ <name>Apache Wookie java connector</name>
+ <description>Apache Wookie remote java connector</description>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <url>http://wookie.apache.org/connector/java/</url>
+ <inceptionYear>2009</inceptionYear>
+
+ <dependencies>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.6.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Added: wookie/trunk/wookie-features/pom.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-features/pom.xml?rev=1564005&view=auto
==============================================================================
--- wookie/trunk/wookie-features/pom.xml (added)
+++ wookie/trunk/wookie-features/pom.xml Mon Feb 3 19:12:35 2014
@@ -0,0 +1,39 @@
+<?xml version="1.0"?>
+<!--
+ 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.wookie</groupId>
+ <artifactId>wookie-master</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath>../../wookie-master-pom/trunk/pom.xml</relativePath>
+ </parent>
+
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie-features</artifactId>
+ <packaging>war</packaging>
+ <version>2.0.0-SNAPSHOT</version>
+ <name>Apache Wookie :: Features</name>
+ <description>Apache Wookie Features</description>
+
+
+
+
+</project>
Added: wookie/trunk/wookie-features/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-features/src/main/webapp/WEB-INF/web.xml?rev=1564005&view=auto
==============================================================================
(empty)
Added: wookie/trunk/wookie-parser/java/pom.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-parser/java/pom.xml?rev=1564005&view=auto
==============================================================================
--- wookie/trunk/wookie-parser/java/pom.xml (added)
+++ wookie/trunk/wookie-parser/java/pom.xml Mon Feb 3 19:12:35 2014
@@ -0,0 +1,87 @@
+<?xml version="1.0"?>
+<!-- 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">
+
+ <parent>
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie-master</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath>../../../wookie-master-pom/trunk/pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie-parser</artifactId>
+ <packaging>jar</packaging>
+ <version>2.0.0-SNAPSHOT</version>
+ <name>Apache Wookie :: Parser</name>
+ <description>Apache Wookie Parser</description>
+
+ <dependencies>
+ <dependency>
+ <groupId>com.ibm.icu</groupId>
+ <artifactId>icu4j</artifactId>
+ <version>4.6.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.6.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ <version>1.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.0.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jdom</groupId>
+ <artifactId>jdom</artifactId>
+ <version>1.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.11</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
Modified: wookie/trunk/wookie-parser/java/src/test/java/org/apache/wookie/w3c/test/WidgetOutputterTest.java
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-parser/java/src/test/java/org/apache/wookie/w3c/test/WidgetOutputterTest.java?rev=1564005&r1=1563137&r2=1564005&view=diff
==============================================================================
--- wookie/trunk/wookie-parser/java/src/test/java/org/apache/wookie/w3c/test/WidgetOutputterTest.java (original)
+++ wookie/trunk/wookie-parser/java/src/test/java/org/apache/wookie/w3c/test/WidgetOutputterTest.java Mon Feb 3 19:12:35 2014
@@ -20,7 +20,6 @@ import static org.junit.Assert.assertTru
import java.io.File;
import java.io.FileOutputStream;
-import org.apache.wookie.tests.helpers.WidgetUploader;
import org.apache.wookie.w3c.IName;
import org.apache.wookie.w3c.W3CWidgetFactory;
import org.apache.wookie.w3c.exceptions.BadManifestException;
Added: wookie/trunk/wookie-parser/java/src/test/java/org/apache/wookie/w3c/test/WidgetUploader.java
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-parser/java/src/test/java/org/apache/wookie/w3c/test/WidgetUploader.java?rev=1564005&view=auto
==============================================================================
--- wookie/trunk/wookie-parser/java/src/test/java/org/apache/wookie/w3c/test/WidgetUploader.java (added)
+++ wookie/trunk/wookie-parser/java/src/test/java/org/apache/wookie/w3c/test/WidgetUploader.java Mon Feb 3 19:12:35 2014
@@ -0,0 +1,159 @@
+/*
+ * Licensed 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.wookie.w3c.test;
+
+import static org.junit.Assert.assertEquals;
+import static org.junit.Assert.fail;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.Reader;
+import java.io.StringReader;
+import java.util.List;
+
+import org.apache.commons.httpclient.HttpClient;
+import org.apache.commons.httpclient.UsernamePasswordCredentials;
+import org.apache.commons.httpclient.auth.AuthScope;
+import org.apache.commons.httpclient.methods.GetMethod;
+import org.apache.commons.httpclient.methods.PostMethod;
+import org.apache.commons.httpclient.methods.multipart.FilePart;
+import org.apache.commons.httpclient.methods.multipart.MultipartRequestEntity;
+import org.apache.commons.httpclient.methods.multipart.Part;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.jdom.Document;
+import org.jdom.Element;
+import org.jdom.input.SAXBuilder;
+
+/**
+ * Helper class for uploading widgets and gathering any errors generated
+ */
+public class WidgetUploader {
+
+ public static final String SERVICE_URL = "http://localhost:8080/wookie/widgets";
+
+
+ /**
+ * Download a widget from a given URL to file
+ * @param url
+ * @return
+ * @throws IOException
+ */
+ public static File downloadWidget(String url) throws IOException{
+ HttpClient httpclient = new HttpClient();
+ GetMethod get = new GetMethod(url);
+ int status = httpclient.executeMethod(get);
+ if (status != 200){
+ fail("problem with download:"+url);
+ }
+ File file = File.createTempFile("w3c", ".wgt");
+ FileUtils.writeByteArrayToFile(file, IOUtils.toByteArray(get.getResponseBodyAsStream()));
+ get.releaseConnection();
+ return file;
+ }
+
+ /**
+ * Upload a widget from a file at a given URL
+ * @param url
+ * @return
+ * @throws IOException
+ */
+ public static String uploadWidget(String url) throws IOException{
+ return uploadWidget(downloadWidget(url));
+ }
+
+ /**
+ * Upload a widget
+ * @param file
+ * @return
+ * @throws IOException
+ */
+ public static String uploadWidget(File file) throws IOException{
+ HttpClient httpclient = new HttpClient();
+ httpclient.getState().setCredentials(
+ new AuthScope("localhost", 8080, "wookie"),
+ new UsernamePasswordCredentials("java", "java")
+ );
+ PostMethod post = new PostMethod(SERVICE_URL);
+ Part[] parts = { new FilePart(file.getName(), file) };
+ post.setRequestEntity(new MultipartRequestEntity(parts, post
+ .getParams()));
+ httpclient.executeMethod(post);
+ String response = IOUtils.toString(post.getResponseBodyAsStream());
+ post.releaseConnection();
+ return response;
+ }
+
+ /**
+ * Get the current set of installed widgets
+ * @return
+ */
+ @SuppressWarnings("unchecked")
+ public static Element[] getWidgets(){
+ try {
+ HttpClient client = new HttpClient();
+ GetMethod get = new GetMethod("http://localhost:8080/wookie/widgets?all=true");
+ client.executeMethod(get);
+ int code = get.getStatusCode();
+ assertEquals(200,code);
+ String response = IOUtils.toString(get.getResponseBodyAsStream());
+
+ get.releaseConnection();
+
+ SAXBuilder builder = new SAXBuilder();
+ Reader in = new StringReader(response);
+ try {
+ Document doc = builder.build(in);
+ List widgets = doc.getRootElement().getChildren("widget");
+ if (widgets != null){
+ return (Element[])widgets.toArray(new Element[widgets.size()]);
+ }
+ } catch (Exception e) {
+ //e.printStackTrace();
+ fail("Bad XML returned by server");
+ return null;
+ }
+ }
+ catch (Exception e) {
+ //e.printStackTrace();
+ fail("get failed");
+ }
+ return null;
+ }
+
+ /**
+ * Get a specific widget by its URI
+ * @param uid
+ * @return
+ */
+ public static Element getWidget(String uri){
+ Element[] widgets = getWidgets();
+ if (widgets == null) return null;
+ for (Element widget:widgets){
+ if (widget.getAttributeValue("identifier").equals(uri)) return widget;
+ }
+ return null;
+ }
+
+ /**
+ * Get the last installed widget
+ * @return
+ */
+ public static Element getLastWidget(){
+ Element[] widgets = getWidgets();
+ if (widgets == null) return null;
+ return widgets[widgets.length-1];
+ }
+
+}
Added: wookie/trunk/wookie-server/pom.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-server/pom.xml?rev=1564005&view=auto
==============================================================================
--- wookie/trunk/wookie-server/pom.xml (added)
+++ wookie/trunk/wookie-server/pom.xml Mon Feb 3 19:12:35 2014
@@ -0,0 +1,391 @@
+<?xml version="1.0"?>
+<!--
+ 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">
+
+ <parent>
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie-master</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <relativePath>../../wookie-master-pom/trunk/pom.xml</relativePath>
+ </parent>
+
+ <modelVersion>4.0.0</modelVersion>
+
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie</artifactId>
+ <packaging>war</packaging>
+ <version>2.0.0-SNAPSHOT</version>
+ <name>Apache Wookie :: Server</name>
+ <description>Apache Wookie Server</description>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ <distribution>repo</distribution>
+ </license>
+ </licenses>
+ <url>http://wookie.apache.org/</url>
+ <inceptionYear>2009</inceptionYear>
+
+ <properties>
+ <cargo.version>1.4.2</cargo.version>
+ <tomcat.version>6.0.37</tomcat.version>
+ <!-- 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 />
+ <!-- default empty javaagent; if needed you can specify it on the command line with -Djavaagent="..." -->
+ <javaagent />
+ </properties>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie-java-connector</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie-parser</artifactId>
+ <version>2.0.0-SNAPSHOT</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.wookie</groupId>
+ <artifactId>wookie-features</artifactId>
+ <type>war</type>
+ <version>2.0.0-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>com.ibm.icu</groupId>
+ <artifactId>icu4j</artifactId>
+ <version>4.6.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-email</artifactId>
+ <version>1.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ <version>3.2</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.commons</groupId>
+ <artifactId>commons-compress</artifactId>
+ <version>1.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-configuration</groupId>
+ <artifactId>commons-configuration</artifactId>
+ <version>1.7</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-fileupload</groupId>
+ <artifactId>commons-fileupload</artifactId>
+ <version>1.2.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-httpclient</groupId>
+ <artifactId>commons-httpclient</artifactId>
+ <version>3.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.4</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-io</groupId>
+ <artifactId>commons-io</artifactId>
+ <version>2.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>dom4j</groupId>
+ <artifactId>dom4j</artifactId>
+ <version>1.6.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.htmlcleaner</groupId>
+ <artifactId>htmlcleaner</artifactId>
+ <version>2.2.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.directwebremoting</groupId>
+ <artifactId>dwr</artifactId>
+ <version>2.0.10</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.shindig</groupId>
+ <artifactId>shindig-common</artifactId>
+ <version>2.0.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>com.google.collections</groupId>
+ <artifactId>google-collections</artifactId>
+ <version>1.0-rc2</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ <version>1.5</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.jdom</groupId>
+ <artifactId>jdom</artifactId>
+ <version>1.1</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.json</groupId>
+ <artifactId>json</artifactId>
+ <version>20080701</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-all</artifactId>
+ <version>2.0.0</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-pool</groupId>
+ <artifactId>commons-pool</artifactId>
+ <version>1.3</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.santuario</groupId>
+ <artifactId>xmlsec</artifactId>
+ <version>1.5.2</version>
+ <scope>compile</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.5</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty</artifactId>
+ <version>6.1.3</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-util</artifactId>
+ <version>6.1.3</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-plus</artifactId>
+ <version>6.1.3</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jetty-naming</artifactId>
+ <version>6.1.3</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jsp-2.1</artifactId>
+ <version>6.1.3</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.mortbay.jetty</groupId>
+ <artifactId>jsp-api-2.1</artifactId>
+ <version>6.1.3</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.2.2</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.4.2.0</version>
+ <scope>runtime</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.7</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>directory-naming</groupId>
+ <artifactId>naming-java</artifactId>
+ <version>0.8</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.ddlutils</groupId>
+ <artifactId>ddlutils</artifactId>
+ <version>1.0</version>
+ <optional>true</optional>
+ </dependency>
+
+
+
+ <!-- log4j logging -->
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.6.4</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.16</version>
+ </dependency>
+
+ </dependencies>
+
+ <build>
+ <defaultGoal>install</defaultGoal>
+ <testResources>
+ <testResource>
+ <directory>src/test/resources</directory>
+ <filtering>true</filtering>
+ </testResource>
+ </testResources>
+
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>${cargo.version}</version>
+ <configuration>
+ <deployables>
+ <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 -XX:MaxPermSize=256m -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}/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/v${tomcat.version}/bin/apache-tomcat-${tomcat.version}.tar.gz
+ </url>
+ </zipUrlInstaller>
+ <systemProperties>
+ <net.sf.ehcache.skipUpdateCheck>true</net.sf.ehcache.skipUpdateCheck>
+ </systemProperties>
+ <dependencies>
+ <dependency>
+ <groupId>javax.mail</groupId>
+ <artifactId>mail</artifactId>
+ <classpath>shared</classpath>
+ </dependency>
+ <dependency>
+ <groupId>javax.activation</groupId>
+ <artifactId>activation</artifactId>
+ <classpath>shared</classpath>
+ </dependency>
+ </dependencies>
+ </container>
+ </configuration>
+ </plugin>
+
+
+ <plugin>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa-maven-plugin</artifactId>
+ <version>2.2.1</version>
+ <configuration>
+ <includes>**/jpa/impl/*.class</includes>
+ <addDefaultConstructor>true</addDefaultConstructor>
+ <enforcePropertyRestrictions>true</enforcePropertyRestrictions>
+ </configuration>
+ <executions>
+ <execution>
+ <id>enhancer</id>
+ <phase>process-classes</phase>
+ <goals>
+ <goal>enhance</goal>
+ </goals>
+ </execution>
+ </executions>
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.openjpa</groupId>
+ <artifactId>openjpa</artifactId>
+ <!-- set the version to be the same as the level in your runtime -->
+ <version>2.2.1</version>
+ </dependency>
+ </dependencies>
+ </plugin>
+
+ </plugins>
+ </build>
+</project>
Added: wookie/trunk/wookie-server/src/main/dist/conf/tomcat-users.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-server/src/main/dist/conf/tomcat-users.xml?rev=1564005&view=auto
==============================================================================
--- wookie/trunk/wookie-server/src/main/dist/conf/tomcat-users.xml (added)
+++ wookie/trunk/wookie-server/src/main/dist/conf/tomcat-users.xml Mon Feb 3 19:12:35 2014
@@ -0,0 +1,6 @@
+<?xml version='1.0' encoding='utf-8'?>
+<tomcat-users>
+ <role rolename="widgetadmin"/>
+ <user name="java" password="java" roles="widgetadmin"/>
+
+</tomcat-users>
\ No newline at end of file
Copied: wookie/trunk/wookie-server/src/main/resources/widgetserver.properties (from r1563137, wookie/trunk/src/main/java/widgetserver.properties)
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-server/src/main/resources/widgetserver.properties?p2=wookie/trunk/wookie-server/src/main/resources/widgetserver.properties&p1=wookie/trunk/src/main/java/widgetserver.properties&r1=1563137&r2=1564005&rev=1564005&view=diff
==============================================================================
--- wookie/trunk/src/main/java/widgetserver.properties (original)
+++ wookie/trunk/wookie-server/src/main/resources/widgetserver.properties Mon Feb 3 19:12:35 2014
@@ -90,15 +90,15 @@ widget.default.locale=en
#######################################################################
# Persistence manager configuration
-widget.persistence.manager.classname=@PERSISTENCE_MANAGER_CLASSNAME@
+widget.persistence.manager.classname=org.apache.wookie.beans.jpa.JPAPersistenceManager
# JPA persistence manager configuration, (JNDI: java:comp/env/jdbc/wookie)
widget.persistence.manager.cachesize=1000
-widget.persistence.manager.dbtype=@DATABASE_TYPE@
+widget.persistence.manager.dbtype=derby
# JCR persistence manager configuration, (JNDI: java:comp/env/jcr/wookie)
-widget.persistence.manager.user=@REPOSITORY_USER@
-widget.persistence.manager.password=@REPOSITORY_PASSWORD@
-widget.persistence.manager.rootpath=@REPOSITORY_ROOTPATH@
-widget.persistence.manager.workspace=@REPOSITORY_WORKSPACE@
+widget.persistence.manager.user=
+widget.persistence.manager.password=
+widget.persistence.manager.rootpath=
+widget.persistence.manager.workspace=
# Queue preferences
widget.preferences.useinstancequeues=true
widget.shareddata.useinstancequeues=true
Added: wookie/trunk/wookie-server/src/main/webapp/META-INF/context.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-server/src/main/webapp/META-INF/context.xml?rev=1564005&view=auto
==============================================================================
--- wookie/trunk/wookie-server/src/main/webapp/META-INF/context.xml (added)
+++ wookie/trunk/wookie-server/src/main/webapp/META-INF/context.xml Mon Feb 3 19:12:35 2014
@@ -0,0 +1,30 @@
+<?xml version="1.0"?>
+<!--
+ 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.
+-->
+<Context crossContext="true">
+
+ <Resource name="jdbc/widgetdb"
+ auth="Container"
+ type="javax.sql.DataSource"
+ maxActive="80"
+ maxIdle="5"
+ username="java"
+ password="java"
+ driverClassName="org.apache.derby.jdbc.EmbeddedDriver"
+ url="jdbc:derby:widgetDatabase/widgetDB;create=true"/>
+
+</Context>
Modified: wookie/trunk/wookie-server/src/main/webapp/WEB-INF/web.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-server/src/main/webapp/WEB-INF/web.xml?rev=1564005&r1=1563137&r2=1564005&view=diff
==============================================================================
--- wookie/trunk/wookie-server/src/main/webapp/WEB-INF/web.xml (original)
+++ wookie/trunk/wookie-server/src/main/webapp/WEB-INF/web.xml Mon Feb 3 19:12:35 2014
@@ -23,9 +23,9 @@
<display-name>Wookie Widget Server</display-name>
<resource-ref>
- <description>@RESOURCE_REF_DESCRIPTION@</description>
- <res-ref-name>@RESOURCE_REF_NAME@</res-ref-name>
- <res-type>@RESOURCE_REF_TYPE@</res-type>
+ <description>The JPA database connection.</description>
+ <res-ref-name>jdbc/widgetdb</res-ref-name>
+ <res-type>javax.sql.DataSource</res-type>
<res-auth>Container</res-auth>
<res-sharing-scope>Shareable</res-sharing-scope>
</resource-ref>
Modified: wookie/trunk/wookie-widgets/build.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-widgets/build.xml?rev=1564005&r1=1563137&r2=1564005&view=diff
==============================================================================
--- wookie/trunk/wookie-widgets/build.xml (original)
+++ wookie/trunk/wookie-widgets/build.xml Mon Feb 3 19:12:35 2014
@@ -17,13 +17,13 @@
-->
<project default="build-widget" basedir="." name="Wookie_widgets_build_file">
<property name="wookie.root.dir" location="../"/>
- <property file="../local.build.properties"/>
- <property file="../build.properties"/>
- <property name="project.build.dir" location="${wookie.root.dir}/build"/>
- <property name="widget.deploy.dir" location="${project.build.dir}/webapp/wookie/deploy"/>
- <property name="wookie.widgets.dir" location="."/>
+ <property file="local.build.properties"/>
+ <property file="build.properties"/>
+ <property name="project.build.dir" location="./build"/>
+ <property name="widget.deploy.dir" location="../wookie-server/src/main/webapp/deploy"/>
+ <property name="wookie.widgets.dir" location="${wookie.root.dir}/wookie-widgets/"/>
<property name="widget.template.dir" value="${wookie.widgets.dir}/widget-template"/>
- <property name="widget.build.dir" value="${project.build.dir}/widgets"/>
+ <property name="widget.build.dir" value="${wookie.widgets.dir}/build/widgets"/>
<property name="widget.deploy.compressed" value="true" />
@@ -130,12 +130,12 @@
<target name="deploy-all" description="deploy all widgets in the base directory">
<echo>Deploying widgets from ${wookie.widgets.dir}
-include: ${widget.deploy.include}
-exclude: ${widget.deploy.exclude}</echo>
+include: */build.xml
+exclude: none</echo>
<subant antfile="build.xml" target="deploy-widget" inheritall="true">
<fileset dir="${wookie.widgets.dir}">
- <include name="${widget.deploy.include}"/>
- <exclude name="${widget.deploy.exclude}"/>
+ <include name="*/build.xml"/>
+ <exclude name="templates/build.xml"/>
</fileset>
</subant>
</target>
Modified: wookie/trunk/wookie-widgets/build_template.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-widgets/build_template.xml?rev=1564005&r1=1563137&r2=1564005&view=diff
==============================================================================
--- wookie/trunk/wookie-widgets/build_template.xml (original)
+++ wookie/trunk/wookie-widgets/build_template.xml Mon Feb 3 19:12:35 2014
@@ -29,9 +29,9 @@ http://wookie.apache.org/docs/widgets
<project default="build-widget" basedir="." name="Wookie_scratchpad_widgets_build_file">
<property name="wookie.root.dir" location="../"/>
<property name="project.build.dir" location="${wookie.root.dir}/build"/>
- <property name="widget.template.dir" value="${wookie.root.dir}/widgets/widget-template"/>
+ <property name="widget.template.dir" value="${wookie.root.dir}/wookie-widgets/widget-template"/>
- <import file="${wookie.root.dir}/widgets/build.xml"/>
+ <import file="${wookie.root.dir}/wookie-widgets/build.xml"/>
<target name="build-widget" depends="_init">
<zip destfile="${widget.build.dir}/${widget.shortname}.wgt"
Modified: wookie/trunk/wookie-widgets/templates/build.xml
URL: http://svn.apache.org/viewvc/wookie/trunk/wookie-widgets/templates/build.xml?rev=1564005&r1=1563137&r2=1564005&view=diff
==============================================================================
--- wookie/trunk/wookie-widgets/templates/build.xml (original)
+++ wookie/trunk/wookie-widgets/templates/build.xml Mon Feb 3 19:12:35 2014
@@ -20,12 +20,12 @@
<property name="project.build.dir" location="${wookie.root.dir}/build"/>
<property name="t-emplate.dir" location="."/>
<property name="widget.build.dir" location="./build"/>
- <property name="widget.defintions.dir" location="widgets"/>
- <property name="wookie.template.dir" location="${wookie.root.dir}/widgets/templates"/>
- <property name="template.dir" location="${wookie.root.dir}/widgets/templates"/>
+ <property name="widget.defintions.dir" location="wookie-widgets"/>
+ <property name="wookie.template.dir" location="${wookie.root.dir}/wookie-widgets/templates"/>
+ <property name="template.dir" location="${wookie.root.dir}/wookie-widgets/templates"/>
<property name="widget.deploy.compressed" value="true"/>
- <import file="${wookie.root.dir}/widgets/build.xml"/>
+ <import file="${wookie.root.dir}/wookie-widgets/build.xml"/>
<target name="build-widget">
<delete file="${widget.build.dir}/${widget.shortname}.wgt"/>