You can subscribe to this list here.
| 2007 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
(7) |
Jul
(26) |
Aug
(85) |
Sep
(141) |
Oct
(85) |
Nov
(60) |
Dec
(29) |
|---|---|---|---|---|---|---|---|---|---|---|---|---|
| 2008 |
Jan
(38) |
Feb
(78) |
Mar
(10) |
Apr
|
May
|
Jun
|
Jul
(3) |
Aug
(1) |
Sep
|
Oct
|
Nov
|
Dec
|
|
From: <ian...@us...> - 2007-09-05 03:18:05
|
Revision: 361
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=361&view=rev
Author: iansmith
Date: 2007-09-04 20:18:04 -0700 (Tue, 04 Sep 2007)
Log Message:
-----------
Patched the POM again. This time we allow this (in the server directory):
mvn -Phot-deploy war:war cargo:deploy
to allow you to bypass the tests.
Added an example space with four things in it to the populate resources.
Modified Paths:
--------------
maven/trunk/ogoglio-server/pom.xml
Added Paths:
-----------
maven/trunk/ogoglio-server/src/main/resources/populate/space-1
Modified: maven/trunk/ogoglio-server/pom.xml
===================================================================
--- maven/trunk/ogoglio-server/pom.xml 2007-09-05 01:48:14 UTC (rev 360)
+++ maven/trunk/ogoglio-server/pom.xml 2007-09-05 03:18:04 UTC (rev 361)
@@ -14,6 +14,42 @@
<artifactId>ogoglio-server</artifactId>
<packaging>war</packaging>
+
+ <profiles>
+ <profile>
+ <id>hot-deploy</id>
+ <build>
+ <plugins>
+ <!-- CARGO CONFIG:INSTALL TO RUNNING SERVER -->
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>0.3-SNAPSHOT</version>
+ <configuration>
+ <container>
+ <containerId>tomcat5x</containerId>
+ </container>
+ <!-- Configuration to use with the container -->
+ <configuration>
+ <type>existing</type>
+ <home>${ogoglio.tmp.tomcat5x}</home>
+ </configuration>
+ <deployables>
+ <deployable>
+ <properties>
+ <context>
+ ${pom.artifactId}
+ </context>
+ </properties>
+ </deployable>
+ </deployables>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
+
<!-- -->
<!-- BUILD -->
<!-- -->
@@ -158,8 +194,20 @@
<!-- Our plugin config for building templates -->
<plugin>
<groupId>com.ogoglio</groupId>
- <artifactId>dev-plugins</artifactId>
+ <artifactId>og-plugin</artifactId>
<version>0.0.1-SNAPSHOT</version>
+
+ <!-- these are for the populate -->
+ <configuration>
+ <serviceURI>${ogoglio.baseURL}</serviceURI>
+ <username>${ogoglio.bootstrapUser}</username>
+ <password>${ogoglio.bootstrapUserPW}</password>
+ <baseDir>src/main/resources/populate</baseDir>
+ <goalPrefix>og</goalPrefix>
+ </configuration>
+
+
+ <!-- bound to compile for running templates -->
<executions>
<execution>
<phase>compile</phase>
@@ -199,11 +247,11 @@
<version>3.0.1</version>
</dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <!-- version, scope, optional inherited but overwritable -->
- </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <!-- version, scope, optional inherited but overwritable -->
+ </dependency>
<dependency>
<groupId>com.sun</groupId>
Added: maven/trunk/ogoglio-server/src/main/resources/populate/space-1
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/space-1 (rev 0)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/space-1 2007-09-05 03:18:04 UTC (rev 361)
@@ -0,0 +1,201 @@
+<space ownerusername="library" sealevel="0.0" simid="1"
+ displayname="Tech Office Space" maxguests="0" displaysea="false"
+ spaceid="1" published="false">
+ <thing templateid="42" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
+ scalez="1.0" displayname="TV" scaley="1.0" templateowner="library"
+ scalex="1.0" possessionid="2" thingid="2" z="10.0" y="0.0" x="0.0"
+ ownerusername="library">
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.005" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Tube.001_Tube.002" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.001" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.002_Mesh" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.003" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Tube_Tube.001" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Sphere_Sphere.001" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.002" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.004" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ </thing>
+ <thing templateid="28" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
+ scalez="1.0" displayname="WhiteBoard" scaley="1.0"
+ templateowner="library" scalex="1.0" possessionid="3" thingid="4"
+ z="-10.0" y="0.0" x="0.0" ownerusername="library">
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.003" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube" scaley="1.0" scalex="1.0" z="0.0" y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.002" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.004" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.001" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <page rz="-0.0" ry="1.0" width="4.0" pageid="1" rx="0.0"
+ rw="0.0" scalez="1.0" scaley="1.0" scalex="1.0"
+ contenttype="text/plain" z="0.1" y="2.0" x="0.0" height="2.0" />
+ </thing>
+ <thing templateid="21" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
+ scalez="1.0" displayname="memex" scaley="1.0" templateowner="library"
+ scalex="1.0" possessionid="1" thingid="1" z="0.0" y="0.0" x="-10.0"
+ ownerusername="library">
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.008_Black" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.001_Cube.002" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.003" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.010" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.005_Cube.001" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.008" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube" scaley="1.0" scalex="1.0" z="0.0" y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.004" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.009" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.004_Cube.005" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.007" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.005" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.003_Cube.004" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.001" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.012_Cube.010" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.002_Cube.003" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.011_Cube.006" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.006" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.010_Black.002" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.009_Black.001" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cylinder.002" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.007_Metal" scaley="1.0" scalex="1.0" z="0.0" y="0.0"
+ x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Cube.006_Cube.007" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ </thing>
+ <thing templateid="25" rz="0.0" ry="0.0" rx="0.0" rw="1.0"
+ scalez="1.0" displayname="OfficeDesk" scaley="1.0"
+ templateowner="library" scalex="1.0" possessionid="4" thingid="3"
+ z="0.0" y="0.0" x="10.0" ownerusername="library">
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="drawer2_07_-_Default" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="ChamferBox_02_-_Defau" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="feet_02_-_Default" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="drawer3_02_-_Default" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Object07_02_-_Default" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="long_drawe_01_-_Defau" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="drawer4_02_-_Default" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="Object07_03_-_Default" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ <shape rz="0.0" ry="0.0" rx="0.0" rw="1.0" scalez="1.0"
+ shapename="large_draw_02_-_Defau" scaley="1.0" scalex="1.0" z="0.0"
+ y="0.0" x="0.0" />
+ </thing>
+ <template ownerusername="library" templateid="28"
+ displayname="WhiteBoard">
+ <scriptfile
+ lastmodifiedUTC="Tuesday, September 4, 2007 7:01:24 PM PDT" />
+ <geometry levelofdetail="0"
+ lastmodifiedUTC="Tuesday, September 4, 2007 7:01:24 PM PDT" />
+ <supportfile filename="WhiteBoard.mtl"
+ lastmodifiedUTC="Tuesday, September 4, 2007 7:01:24 PM PDT" />
+ </template>
+ <template ownerusername="library" templateid="42"
+ displayname="TV">
+ <scriptfile
+ lastmodifiedUTC="Tuesday, September 4, 2007 7:01:23 PM PDT" />
+ <geometry levelofdetail="0"
+ lastmodifiedUTC="Tuesday, September 4, 2007 7:01:23 PM PDT" />
+ <supportfile filename="TV.mtl"
+ lastmodifiedUTC="Tuesday, September 4, 2007 7:01:24 PM PDT" />
+ </template>
+ <template ownerusername="library" templateid="25"
+ displayname="OfficeDesk">
+ <supportfile filename="OfficeDesk.mtl"
+ lastmodifiedUTC="Tuesday, September 4, 2007 7:01:24 PM PDT" />
+ <geometry levelofdetail="0"
+ lastmodifiedUTC="Tuesday, September 4, 2007 7:01:24 PM PDT" />
+ </template>
+ <template ownerusername="library" templateid="21"
+ displayname="memex">
+ <geometry levelofdetail="0"
+ lastmodifiedUTC="Tuesday, September 4, 2007 7:01:23 PM PDT" />
+ <supportfile filename="memex.mtl"
+ lastmodifiedUTC="Tuesday, September 4, 2007 7:01:23 PM PDT" />
+ </template>
+</space>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-05 01:48:17
|
Revision: 360
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=360&view=rev
Author: iansmith
Date: 2007-09-04 18:48:14 -0700 (Tue, 04 Sep 2007)
Log Message:
-----------
Ooops.
Added Paths:
-----------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/Log.java
Added: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/Log.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/Log.java (rev 0)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/Log.java 2007-09-05 01:48:14 UTC (rev 360)
@@ -0,0 +1,34 @@
+package com.ogoglio.util;
+
+import org.apache.log4j.Logger;
+
+public class Log {
+
+ static Logger log = Logger.getLogger("com.ogoglio");
+
+ public static void debug(Object msg) {
+ log.debug(msg);
+ }
+
+ public static void info(Object msg) {
+ log.info(msg);
+ }
+ public static void info(Object msg,Throwable t) {
+ log.info(msg,t);
+ }
+ public static void warn(Object msg) {
+ log.warn(msg);
+ }
+ public static void error(Object msg) {
+ log.error(msg);
+ }
+ public static void error(Object msg, Throwable t) {
+ log.error(msg,t);
+ }
+ public static void trace(Object msg) {
+ log.trace(msg);
+ }
+ public static void test(Object msg) {
+ log.debug("TEST:"+msg);
+ }
+}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-04 23:28:00
|
Revision: 359
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=359&view=rev
Author: iansmith
Date: 2007-09-04 16:28:02 -0700 (Tue, 04 Sep 2007)
Log Message:
-----------
Deleting the database in a test now implies destroying media files as well.
Modified Paths:
--------------
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
maven/trunk/ogoglio-server/src/test/java/com/ogoglio/persist/test/PersistTest.java
maven/trunk/ogoglio-server/src/test/resources/basic-config.properties
Property Changed:
----------------
maven/trunk/ogoglio-integration-test/
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2007-09-04 19:00:02 UTC (rev 358)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2007-09-04 23:28:02 UTC (rev 359)
@@ -1,5 +1,7 @@
package com.ogoglio.appdev.migrate;
+import java.io.File;
+
import javax.naming.Context;
import javax.naming.NamingException;
import javax.servlet.ServletConfig;
@@ -189,6 +191,27 @@
return false;
}
- return tryUpgrade(null, null, 0, getVersionNumber(), DDL_MODE_CREATE, false, ps);
+ if (tryUpgrade(null, null, 0, getVersionNumber(), DDL_MODE_CREATE, false, ps)==false) {
+ Log.error("Aborted destroying data after failure to upgrade");
+ return false;
+ }
+ ps.loadPropertySet(PropStorage.BASIC_PROPS);
+ String dir = ps.getKeyFromSet(PropStorage.BASIC_PROPS, "ogoglio.mediaDirectory");
+ if (dir==null) {
+ Log.error("Can't find a property ogoglio.mediaDirectory to cleanse media store");
+ return false;
+ }
+ File store = new File(dir);
+ if ((!store.exists()) || (!store.canWrite())) {
+ Log.error("Media directory doesn't exist or can't be changed:"+dir);
+ return false;
+ }
+ File[] children= store.listFiles();
+ for (int i=0; i<children.length;++i) {
+ if (children[i].delete()!=true) {
+ Log.error("Failed to delete media file:"+children[i].getAbsolutePath());
+ }
+ }
+ return true;
}
}
Property changes on: maven/trunk/ogoglio-integration-test
___________________________________________________________________
Name: svn:ignore
- target
+ target
tomcat5x.out
Modified: maven/trunk/ogoglio-server/src/test/java/com/ogoglio/persist/test/PersistTest.java
===================================================================
--- maven/trunk/ogoglio-server/src/test/java/com/ogoglio/persist/test/PersistTest.java 2007-09-04 19:00:02 UTC (rev 358)
+++ maven/trunk/ogoglio-server/src/test/java/com/ogoglio/persist/test/PersistTest.java 2007-09-04 23:28:02 UTC (rev 359)
@@ -13,12 +13,16 @@
limitations under the License. */
package com.ogoglio.persist.test;
+import java.io.IOException;
import java.net.URI;
import java.net.URISyntaxException;
import com.ogoglio.appdev.migrate.MigrationSupport;
import com.ogoglio.appdev.migrate.test.DBZapTest;
import com.ogoglio.appdev.persist.PersistException;
+import com.ogoglio.client.WebAPIClient;
+import com.ogoglio.client.WebAPIDescriptor;
+import com.ogoglio.media.MediaService;
import com.ogoglio.migrate.OgoglioServerMigration;
import com.ogoglio.persist.AccountPersistTasks;
import com.ogoglio.persist.AccountRecord;
@@ -33,6 +37,7 @@
import com.ogoglio.persist.TemplatePersistTasks;
import com.ogoglio.persist.TemplateRecord;
import com.ogoglio.util.Log;
+import com.ogoglio.util.PropStorage;
public class PersistTest extends DBZapTest {
@@ -162,6 +167,29 @@
fail("Should have just returned null instead of failed: " + e);
}
}
+
+ public void testMediaDirectoryEmptiedByParentClass() {
+ PropStorage ps=new PropStorage();
+ if (ps.loadPropertySet(PropStorage.BASIC_PROPS)==false) {
+ fail("couldn't load properties for test");
+ }
+
+ try {
+ String key=ps.getKeyFromSet(PropStorage.BASIC_PROPS, "ogoglio.mediaDirectory");
+ if (key==null) {
+ fail("no test property ogoglio.mediaDirectory");
+ }
+ MediaService svc = new MediaService(new URI(key));
+ if (svc==null) {
+ fail("can't create a media service:"+key);
+ }
+ assertEquals(0,svc.getAllNames().length);
+ } catch (IOException e) {
+ fail("IOException talking to media service:"+e.getMessage());
+ } catch (URISyntaxException e) {
+ fail("URISytaxException talking to media service:"+e.getMessage());
+ }
+ }
private SpaceRecord checkSpaceAndSimTasks() throws PersistException {
SimRecord simRecord1;
// ok to create sim now on that URI
Modified: maven/trunk/ogoglio-server/src/test/resources/basic-config.properties
===================================================================
--- maven/trunk/ogoglio-server/src/test/resources/basic-config.properties 2007-09-04 19:00:02 UTC (rev 358)
+++ maven/trunk/ogoglio-server/src/test/resources/basic-config.properties 2007-09-04 23:28:02 UTC (rev 359)
@@ -1,4 +1,4 @@
# basic info needed for some tests
ogoglio.testSpaceNumber = ${ogoglio.testSpaceNumber}
ogoglio.baseUrl = ${ogoglio.baseURL}
-
+ogoglio.mediaDirectory = ${ogoglio.mediaDirectory}
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-04 19:00:18
|
Revision: 358
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=358&view=rev
Author: iansmith
Date: 2007-09-04 12:00:02 -0700 (Tue, 04 Sep 2007)
Log Message:
-----------
First cut at a logging centralization.
Modified Paths:
--------------
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/DBVersionPersistTasks.java
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/test/DBZapTest.java
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/persist/HibernateTask.java
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/AbstractResourceServlet.java
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/MigratedResourceServlet.java
maven/trunk/ogoglio-common/pom.xml
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/MultiuserTests.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceDuplicator.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClientWire.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIUtil.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/Space.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/NetworkChannelServer.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPMessageReader.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/NetworkUtils.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DDoorRenderable.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DPageRenderable.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderableLoader.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/RenderableMotionInterpolator.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/body/Skeleton.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/body/Skin.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/bvh/Bvh.java
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/smap/SkinMapParser.java
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/BootstrapInfo.java
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
maven/trunk/ogoglio-integration-test/src/test/resources/log4j.properties
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/media/FileStore.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/media/site/MediaServlet.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/migrate/AccountsForTesting.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/AccountPersistTasks.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/persist/TemplatePersistTasks.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/Sim.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SimMessageHandler.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/SpaceSimulator.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/ScriptHTTPRequest.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/ScriptSpace.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/SpaceScriptEngine.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/site/SimServlet.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/AccountServlet.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/MessageProxy.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/OgoglioServletBase.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/SpaceServlet.java
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/site/TemplateResource.java
maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties
maven/trunk/ogoglio-server/src/test/java/com/ogoglio/persist/test/PersistTest.java
maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
maven/trunk/ogoglio-viewer-applet/src/test/java/com/ogoglio/viewer/j3d/bvh/test/BvhTest.java
maven/trunk/ogoglio-viewer-applet/src/test/java/com/ogoglio/viewer/test/AppletTestWindow.java
Removed Paths:
-------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/OgoglioProperties.java
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/DBVersionPersistTasks.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/DBVersionPersistTasks.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/DBVersionPersistTasks.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -6,6 +6,7 @@
import com.ogoglio.appdev.persist.HibernateTask;
import com.ogoglio.appdev.persist.PersistException;
+import com.ogoglio.util.Log;
public class DBVersionPersistTasks {
public final static String FIND_VERSION = "com.ogoglio.appdev.migrate.dbversions";
@@ -28,7 +29,7 @@
int size = query.list().size();
DBVersionRecord rec;
if (expectedSize != size) {
- System.err.println("Whoa! Size of returned result for db version record was (" + size + ") but should have been " + expectedSize + "!");
+ Log.error("Whoa! Size of returned result for db version record was (" + size + ") but should have been " + expectedSize + "!");
return Boolean.FALSE;
}
if (size == 0) {
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -4,11 +4,11 @@
import javax.naming.NamingException;
import javax.servlet.ServletConfig;
-import org.apache.commons.logging.LogFactory;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
import com.ogoglio.appdev.persist.PersistException;
+import com.ogoglio.util.Log;
import com.ogoglio.util.PropStorage;
import com.ogoglio.viewer.render.UIConstants;
@@ -21,7 +21,6 @@
public static final boolean DDL_MODE_UPDATE=true;
public static final boolean DDL_MODE_CREATE=false;
- static org.apache.commons.logging.Log log = LogFactory.getLog("com.ogoglio.migrate");
public MigrationSupport() {
}
@@ -35,7 +34,7 @@
SessionFactory sessionFactory = getCurrentConfiguration().buildSessionFactory();
int version = DBVersionPersistTasks.findVersion(sessionFactory);
if (version != getVersionNumber()) {
- log.error("DB Version Mismatch! Expected (" + getVersionNumber() + ") but got " + version + "!");
+ Log.error("DB Version Mismatch! Expected (" + getVersionNumber() + ") but got " + version + "!");
sessionFactory.close();
return tryUpgrade(servletConf, ctx, version, getVersionNumber(),
DDL_MODE_UPDATE, true, null);
@@ -44,10 +43,10 @@
return true; // we are at the expected version
} catch (PersistException e) {
if (e.innerThrowable == null) {
- log.error("Serious problem with hibernate:" + e.getMessage());
+ Log.error("Serious problem with hibernate:" + e.getMessage());
return false;
}
- log.info("Unable to figure out DB version number. Likely this is a fresh database....(" + e.innerThrowable.getClass().getName() + ")");
+ Log.info("Unable to figure out DB version number. Likely this is a fresh database....(" + e.innerThrowable.getClass().getName() + ")");
return initVersionAndUpgrade(servletConf, ctx);
}
}
@@ -63,7 +62,7 @@
factory.close();
return true;
} catch (Throwable t) {
- log.error("Error trying initialized DB:" + t.getMessage());
+ Log.error("Error trying initialized DB:" + t.getMessage());
return false;
}
}
@@ -97,7 +96,7 @@
try {
return DBVersionPersistTasks.updateVersion(targetVersion, expectedSize, sessionFactory);
} catch (PersistException e) {
- log.error("Problem updating the version of the database to version " + targetVersion + ":" + e.getMessage());
+ Log.error("Problem updating the version of the database to version " + targetVersion + ":" + e.getMessage());
return false;
}
}
@@ -105,7 +104,7 @@
public boolean tryUpgrade(ServletConfig servletConfig, Context ctx, int db_is,
int db_wants_to_be, boolean isUpdate, boolean useJNDI, PropStorage propStore) {
if (getMigrationList().length != getVersionNumber()) {
- log.error("Internal error! Migration list length should be " + getVersionNumber() + " but is " + getMigrationList().length + "!");
+ Log.error("Internal error! Migration list length should be " + getVersionNumber() + " but is " + getMigrationList().length + "!");
return false;
}
boolean canMigrate = false;
@@ -122,12 +121,12 @@
canMigrate = true;
}
} catch (NamingException e) {
- log.error("Naming exception trying to access " + MIGRATION_KEY + " from naming context!");
+ Log.error("Naming exception trying to access " + MIGRATION_KEY + " from naming context!");
canMigrate=false;
}
if (!canMigrate) {
- log.error("Cannot migrate data! Property ogoglio.okToMigrateDB is false or non-existent!");
+ Log.error("Cannot migrate data! Property ogoglio.okToMigrateDB is false or non-existent!");
return false;
}
String hbm_auto_flag="update";
@@ -138,7 +137,7 @@
for (int i = db_is; i < db_wants_to_be; ++i) {
Migration current = getMigrationList()[i];
- log.info("DB: Attempting migration from " + i + " to " + (i + 1) + " with auto HBM:"+hbm_auto_flag);
+ Log.info("DB: Attempting migration from " + i + " to " + (i + 1) + " with auto HBM:"+hbm_auto_flag);
//try to get hibernate to do the work
Configuration config = createConfigurationForHibernate(i + 1, hbm_auto_flag, useJNDI, propStore);
@@ -157,22 +156,22 @@
return false;
}
} catch (PersistException e) {
- log.error("Whoa! Patch failed at revision!"+(i+1)+" on class "+current.getClass().getName());
- log.error("Whoa! Persistance layer problem was:"+e.getMessage());
+ Log.error("Whoa! Patch failed at revision!"+(i+1)+" on class "+current.getClass().getName());
+ Log.error("Whoa! Persistance layer problem was:"+e.getMessage());
}
try {
if (!isUpdate) {
//we need to go ahead and create the data
if (!current.populate(factory, i, i+1)) {
- log.error("Whoa! Populate failed at revision!"+(i+1)+" on class "+current.getClass().getName());
+ Log.error("Whoa! Populate failed at revision!"+(i+1)+" on class "+current.getClass().getName());
factory.close();
return false;
}
}
} catch (PersistException e) {
- log.error("Whoa! Populate failed at revision!"+(i+1)+" on class "+current.getClass().getName());
- log.error("Whoa! Persistance layer problem was:"+e.getMessage());
+ Log.error("Whoa! Populate failed at revision!"+(i+1)+" on class "+current.getClass().getName());
+ Log.error("Whoa! Persistance layer problem was:"+e.getMessage());
}
factory.close();
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/test/DBZapTest.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/test/DBZapTest.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/test/DBZapTest.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -5,6 +5,7 @@
import org.hibernate.SessionFactory;
import com.ogoglio.appdev.migrate.MigrationSupport;
+import com.ogoglio.util.Log;
import com.ogoglio.util.PropStorage;
public abstract class DBZapTest extends TestCase {
@@ -30,9 +31,7 @@
//if we are here, db stuff worked, but we still need to avoid all the jndi stuff
sessionFactory = support.createConfigurationForHibernate(getMigrationSupport().getVersionNumber(), null, false, ps).buildSessionFactory();
} catch (Exception e) {
- System.out.println("-------");
- e.printStackTrace(System.out);
- System.out.println("---------");
+ Log.error("Trying to setUp DBZapTest",e);
fail("Could not setup:" + e.getMessage());
}
}
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/persist/HibernateTask.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/persist/HibernateTask.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/persist/HibernateTask.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -19,7 +19,9 @@
import org.hibernate.StaleObjectStateException;
import org.hibernate.Transaction;
+import com.ogoglio.util.Log;
+
public abstract class HibernateTask {
private SessionFactory sessionFactory = null;
@@ -41,8 +43,8 @@
transaction.commit();
return result;
} catch (StaleObjectStateException staleEx) {
- System.err.println("This interceptor does not implement optimistic concurrency control!");
- System.err.println("Your application will not work until you add compensation actions!");
+ Log.error("This interceptor does not implement optimistic concurrency control!",staleEx);
+ Log.error("Your application will not work until you add compensation actions!",staleEx);
throw new PersistException("This DB is not supported.");
} catch (PersistException ex) {
try {
@@ -53,9 +55,7 @@
}
throw ex;
} catch (Throwable ex) { //catches things that are created by Hibernate that are not PersistException
- System.err.println("TRUE TYPE OF CAUGHT EXCEPTION:"+ex.getClass().getName());
- System.err.println("ORIG STACK TRACE");
- ex.printStackTrace();
+ Log.error("TRUE TYPE OF CAUGHT EXCEPTION:"+ex.getClass().getName(),ex);
try {
if (transaction.isActive()) {
transaction.rollback();
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/AbstractResourceServlet.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/AbstractResourceServlet.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/AbstractResourceServlet.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -41,6 +41,7 @@
import org.apache.commons.fileupload.servlet.ServletFileUpload;
import com.ogoglio.client.DecoratedInputStream;
+import com.ogoglio.util.Log;
import com.ogoglio.util.StreamUtils;
import com.ogoglio.util.WebConstants;
import com.ogoglio.xml.SpaceDocument;
@@ -88,7 +89,7 @@
baseResource = createBaseResource(config);
if (baseResource==null) {
- System.out.println("Warning: Class "+getClass().getName()+" should be sure it eventually sets the value of the base resource on it's servlet.");
+ Log.warn("Class "+getClass().getName()+" should be sure it eventually sets the value of the base resource on it's servlet.");
} else {
if (!(baseResource.getPathElement() instanceof String)) {
throw new IllegalStateException("The base resource must have a String path element: " + baseResource.getPathElement());
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/MigratedResourceServlet.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/MigratedResourceServlet.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/servlet/MigratedResourceServlet.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -8,6 +8,7 @@
import org.hibernate.SessionFactory;
import com.ogoglio.appdev.migrate.MigrationSupport;
+import com.ogoglio.util.Log;
public abstract class MigratedResourceServlet extends AbstractResourceServlet {
@@ -45,7 +46,7 @@
private SessionFactory getOrCreateHibernateSessionFactory(ServletConfig config, Context context) {
SessionFactory sessionFactory = (SessionFactory) config.getServletContext().getAttribute(HIBERNATE_SESSION_FACTORY_KEY);
if (sessionFactory == null) {
- System.out.println(config.getServletName()+" checking DB Version...");
+ Log.info(config.getServletName()+" checking DB Version...");
MigrationSupport ms= getMigration();
if (!ms.verifyVersion(config,context)) {
throw new IllegalStateException("Cannot find a DB configuration for hibernate!");
Modified: maven/trunk/ogoglio-common/pom.xml
===================================================================
--- maven/trunk/ogoglio-common/pom.xml 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/pom.xml 2007-09-04 19:00:02 UTC (rev 358)
@@ -46,6 +46,13 @@
<version>2.0.0-rc-6</version>
<scope>compile</scope>
</dependency>
+
+ <!-- for logging layer -->
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ </dependency>
</dependencies>
</project>
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/MultiuserTests.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/MultiuserTests.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/MultiuserTests.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -11,6 +11,7 @@
import com.ogoglio.client.model.SplinePath;
import com.ogoglio.client.model.Thing;
import com.ogoglio.client.model.User;
+import com.ogoglio.util.Log;
import com.ogoglio.viewer.j3d.J3DSplinePath;
public class MultiuserTests {
@@ -82,7 +83,7 @@
}
public void disconnected() {
- System.err.println("UserRobot was disconnected");
+ Log.error("UserRobot was disconnected");
}
public void receivedChatMessage(String username, String message) {
@@ -168,7 +169,7 @@
public static void main(String[] args) {
if (args.length != 3) {
- System.err.println("usage: ... spaceURI serviceURI numRobots");
+ Log.error("usage: ... spaceURI serviceURI numRobots");
return;
}
MultiuserTests tests = null;
@@ -185,7 +186,7 @@
for (int i = 0; i < numRobots; i++) {
startPosition.setTranslation(new Vector3d(0, 0, -10));
tests.addRobot(startPosition, true);
- System.out.println("Added robot " + (i + 1) + " of " + numRobots);
+ Log.test("Added robot " + (i + 1) + " of " + numRobots);
Thread.sleep(1000);
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceClient.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -37,6 +37,7 @@
import com.ogoglio.message.PayloadFactory;
import com.ogoglio.message.TCPChannel;
import com.ogoglio.util.ArgumentUtils;
+import com.ogoglio.util.Log;
import com.ogoglio.viewer.render.UIConstants;
import com.ogoglio.xml.AccountDocument;
import com.ogoglio.xml.BodyDocument;
@@ -109,7 +110,7 @@
}
if (messenger.authStatus != messenger.SUCCESS_STATUS) {
- System.err.println("No auth, message " + messenger.errorMessage);
+ Log.error("No auth, message " + messenger.errorMessage);
messenger.cleanup();
if(messenger.errorMessage == null) {
@@ -180,7 +181,7 @@
}
public void mouseClickedUser(User user, Point3d intersection) {
- System.err.println("SpaceClient ignoring user click");
+ Log.warn("SpaceClient ignoring user click");
}
public void mouseClickedDoor(Door door, String name, Point3d intersection) {
@@ -231,7 +232,7 @@
public void mouseClickedPage(Page page, Point3d intersection) {
- System.out.println("User clicked the page. Ignoring");
+ Log.info("User clicked the page. Ignoring");
}
public void viewpointMotionChanged(SplinePath newPath) {
@@ -293,7 +294,7 @@
} else if (SpaceEvent.REMOVE_USER_EVENT.equals(event.getName())) {
User user = space.getUser(event.getStringProperty(SpaceEvent.USERNAME));
if (user == null) {
- System.err.println("Tried to remove unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
+ Log.error("Tried to remove unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
return;
}
space.removeUser(user);
@@ -314,8 +315,7 @@
template = new Template(templateDoc);
space.addTemplate(template);
} catch (IOException e) {
- e.printStackTrace();
- System.err.println("Could not add the template");
+ Log.error("Could not add the template",e);
}
}
Thing thing = new Thing(space, event.getLongProperty(SpaceEvent.THING_ID).longValue(), template, event.getStringProperty(SpaceEvent.DISPLAY_NAME), event.getStringProperty(SpaceEvent.OWNER_USERNAME), event.getLongProperty(SpaceEvent.POSSESSION_ID).longValue(), event.getTransform());
@@ -334,7 +334,7 @@
long thingID = event.getLongProperty(SpaceEvent.THING_ID).longValue();
Thing thing = space.getThing(thingID);
if (thing == null) {
- System.err.println("Tried to add a page for a non-existent thing: " + thingID);
+ Log.error("Tried to add a page for a non-existent thing: " + thingID);
return;
}
Page page = new Page(thing, event.getLongProperty(SpaceEvent.PAGE_ID).longValue(), event.getStringProperty(SpaceEvent.CONTENT_TYPE), event.getDoubleProperty(SpaceEvent.WIDTH).doubleValue(), event.getDoubleProperty(SpaceEvent.HEIGHT).doubleValue(), event.getTransform());
@@ -344,13 +344,13 @@
long thingID = event.getLongProperty(SpaceEvent.THING_ID).longValue();
Thing thing = space.getThing(thingID);
if (thing == null) {
- System.err.println("Tried to remove a page for a non-existent thing: " + thingID);
+ Log.error("Tried to remove a page for a non-existent thing: " + thingID);
return;
}
long pageID = event.getLongProperty(SpaceEvent.PAGE_ID).longValue();
Page page = thing.getPage(pageID);
if (page == null) {
- System.err.println("Tried to remove an unknown page: " + thingID + ", " + pageID);
+ Log.error("Tried to remove an unknown page: " + thingID + ", " + pageID);
return;
}
thing.removePage(page);
@@ -359,13 +359,13 @@
long thingID = event.getLongProperty(SpaceEvent.THING_ID).longValue();
Thing thing = space.getThing(thingID);
if (thing == null) {
- System.err.println("Tried to update a page for a non-existent thing: " + thingID);
+ Log.error("Tried to update a page for a non-existent thing: " + thingID);
return;
}
long pageID = event.getLongProperty(SpaceEvent.PAGE_ID).longValue();
Page page = thing.getPage(pageID);
if (page == null) {
- System.err.println("Tried to update an unknown page: " + thingID + ", " + pageID);
+ Log.error("Tried to update an unknown page: " + thingID + ", " + pageID);
return;
}
if (!page.getPosition().epsilonEquals(event.getTransform(), 0.001)) {
@@ -378,13 +378,13 @@
long thingID = event.getLongProperty(SpaceEvent.THING_ID).longValue();
Thing thing = space.getThing(thingID);
if (thing == null) {
- System.err.println("Tried to update content on a page for a non-existent thing: " + thingID);
+ Log.error("Tried to update content on a page for a non-existent thing: " + thingID);
return;
}
long pageID = event.getLongProperty(SpaceEvent.PAGE_ID).longValue();
Page page = thing.getPage(pageID);
if (page == null) {
- System.err.println("Tried to update content on an unknown page: " + thingID + ", " + pageID);
+ Log.error("Tried to update content on an unknown page: " + thingID + ", " + pageID);
return;
}
if (!page.getContentType().equals(event.getStringProperty(SpaceEvent.CONTENT_TYPE))) {
@@ -403,14 +403,14 @@
template = new Template(templateDoc);
space.addTemplate(template);
} catch (IOException e) {
- System.err.println("Could not add the template");
+ Log.error("Could not add the template",e);
}
}
try {
Door door = new Door(space, template, event.getLongProperty(SpaceEvent.DOOR_ID).longValue(), event.getStringProperty(SpaceEvent.DISPLAY_NAME), new URI(event.getStringProperty(SpaceEvent.LINK)), event.getTransform());
space.addDoor(door);
} catch (URISyntaxException e) {
- System.err.println("Could not parse the door link: " + event.getStringProperty(SpaceEvent.LINK));
+ Log.error("Could not parse the door link: " + event.getStringProperty(SpaceEvent.LINK),e);
}
} else if (SpaceEvent.UPDATE_DOOR_EVENT.equals(event.getName())) {
@@ -438,7 +438,7 @@
User user = space.getUser(event.getStringProperty(SpaceEvent.USERNAME));
if (user == null) {
- System.err.println("Got a motion event for an unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
+ Log.error("Got a motion event for an unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
return;
}
SplinePath path = event.getSplinePath();
@@ -451,7 +451,7 @@
User user = space.getUser(event.getStringProperty(SpaceEvent.USERNAME));
if (user == null) {
- System.err.println("Got a stop event for an unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
+ Log.error("Got a stop event for an unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
return;
}
user.stopMotion(event.getTransform());
@@ -476,12 +476,12 @@
long thingID = event.getLongProperty(SpaceEvent.THING_ID).longValue();
Thing thing = space.getThing(thingID);
if (thing == null) {
- System.err.println("Tried to move a shape for an unknown thing: " + thingID);
+ Log.error("Tried to move a shape for an unknown thing: " + thingID);
return;
}
Shape shape = thing.getShape(event.getStringProperty(SpaceEvent.SHAPE_NAME));
if (shape == null) {
- System.err.println("Tried to move unknown shape: " + event.getStringProperty(SpaceEvent.SHAPE_NAME));
+ Log.error("Tried to move unknown shape: " + event.getStringProperty(SpaceEvent.SHAPE_NAME));
return;
}
shape.startMotion(event.getSplinePath());
@@ -494,7 +494,7 @@
}
Shape shape = thing.getShape(event.getStringProperty(SpaceEvent.SHAPE_NAME));
if (shape == null) {
- System.err.println("Tried to stop unknown shape: " + event.getStringProperty(SpaceEvent.SHAPE_NAME));
+ Log.error("Tried to stop unknown shape: " + event.getStringProperty(SpaceEvent.SHAPE_NAME));
return;
}
shape.stopMotion(event.getTransform());
@@ -502,7 +502,7 @@
} else if (SpaceEvent.TEXT_SAY_EVENT.equals(event.getName())) {
User user = space.getUser(event.getStringProperty(SpaceEvent.USERNAME));
if (user == null) {
- System.err.println("Got a text say event for an unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
+ Log.error("Got a text say event for an unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
return;
}
@@ -511,7 +511,7 @@
} else if (SpaceEvent.PLAY_ANIMATION_EVENT.equals(event.getName())) {
User user = space.getUser(event.getStringProperty(SpaceEvent.USERNAME));
if (user == null) {
- System.err.println("Got an animation event for an unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
+ Log.error("Got an animation event for an unknown user: " + event.getStringProperty(SpaceEvent.USERNAME));
return;
}
user.playAnimation(event.getLongProperty(SpaceEvent.ANIMATION_ID).longValue());
@@ -554,23 +554,23 @@
Thing thing = space.getThing(thingID);
if (thing == null) {
- System.err.println("Received browser message from unknown thing: " + thingID);
+ Log.error("Received browser message from unknown thing: " + thingID);
return;
}
String browserMessage = event.getStringProperty(SpaceEvent.MESSAGE_TO_BROWSER);
if (browserMessage == null || browserMessage.trim().length() == 0) {
- System.err.println("Received empty browser message from thing: " + thingID);
+ Log.error("Received empty browser message from thing: " + thingID);
return;
}
listener.receivedBrowserMessage(thingID, browserMessage);
} else {
- System.out.println("Client received (and ignored) event: " + event);
+ Log.warn("Client received (and ignored) event: " + event);
}
} else if (message.getPayload() instanceof PayloadFactory.HeartbeatPayload) {
//ignore it
} else {
- System.err.println("Client received (and ignored) message: " + message);
+ Log.error("Client received (and ignored) message: " + message);
}
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceDuplicator.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceDuplicator.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/SpaceDuplicator.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -6,6 +6,7 @@
import java.util.Map;
import com.ogoglio.util.ArgumentUtils;
+import com.ogoglio.util.Log;
import com.ogoglio.xml.DoorDocument;
import com.ogoglio.xml.PositionedDocument;
import com.ogoglio.xml.PossessionDocument;
@@ -139,7 +140,7 @@
SpaceDuplicator duplicator = new SpaceDuplicator(sourceSpaceID, descriptor, auth, wire);
duplicator.duplicateSpace(destSpaceID, true);
} catch (URISyntaxException e) {
- System.err.println("Error parsing URI: " + e);
+ Log.error("Error parsing URI",e);
printUsage();
} catch (IOException e) {
e.printStackTrace();
@@ -147,6 +148,6 @@
}
private static void printUsage() {
- System.err.println("...SpaceDuplicator <SERVICE_URI> <SOURCE_SPACE> <DESTINATION_SPACE_URI> <AUTH_COOKIE>");
+ Log.error("...SpaceDuplicator <SERVICE_URI> <SOURCE_SPACE> <DESTINATION_SPACE_URI> <AUTH_COOKIE>");
}
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClientWire.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClientWire.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIClientWire.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -13,6 +13,7 @@
import nanoxml.XMLElement;
+import com.ogoglio.util.Log;
import com.ogoglio.util.StreamUtils;
import com.ogoglio.util.WebConstants;
@@ -152,10 +153,10 @@
}
if (!printedCacheComplaint) {
printedCacheComplaint = true;
- System.err.println("NOTE: Not using Sun's download cache, which they broke in Java 1.6u1.");
+ Log.warn("Not using Sun's download cache, which they broke in Java 1.6u1.");
}
} catch (URISyntaxException e) {
- System.err.println("Tried to reset the URI to avoid bad cache in 1.6:" + e);
+ Log.error("Tried to reset the URI to avoid bad cache in 1.6",e);
}
}
@@ -223,10 +224,10 @@
}
if (!printedCacheComplaint) {
printedCacheComplaint = true;
- System.err.println("NOTE: Not using Sun's download cache, which they broke in Java 1.6u1.");
+ Log.warn("Not using Sun's download cache, which they broke in Java 1.6u1.");
}
} catch (URISyntaxException e) {
- System.err.println("Tried to reset the URI to avoid bad cache in 1.6:" + e);
+ Log.error("Tried to reset the URI to avoid bad cache in 1.6",e);
}
}
@@ -301,7 +302,7 @@
headerValue = (String) ((List) makeLinuxHappy).get(0);
} else {
// we don't understand this type at all
- System.err.println("Unable to understand the type returned by Linux workaround in WebAPIClient:"+makeLinuxHappy.getClass().getName());
+ Log.error("Unable to understand the type returned by Linux workaround in WebAPIClient:"+makeLinuxHappy.getClass().getName());
return null;
}
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIUtil.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIUtil.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/WebAPIUtil.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -3,6 +3,7 @@
import java.net.URI;
import java.net.URISyntaxException;
+import com.ogoglio.util.Log;
import com.ogoglio.util.WebConstants;
public class WebAPIUtil {
@@ -20,7 +21,7 @@
return null;
}
if (!setCookieHeader.startsWith(WebConstants.AUTH_COOKIE + "=")) {
- System.err.println("Unknown set cookie: " + setCookieHeader);
+ Log.error("Unknown set cookie: " + setCookieHeader);
return null;
}
return setCookieHeader.substring(setCookieHeader.indexOf("=") + 1, setCookieHeader.indexOf(";"));
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/Space.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/Space.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/client/model/Space.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -26,6 +26,7 @@
import javax.vecmath.Vector3d;
import com.ogoglio.util.ArgumentUtils;
+import com.ogoglio.util.Log;
import com.ogoglio.xml.BodyDocument;
public class Space {
@@ -117,7 +118,7 @@
Arrays.sort(things, new DistanceComparator());
if (things.length > 0) {
- System.out.println("Adding " + things[0].getName());
+ Log.info("Adding " + things[0].getName());
listener.thingAdded(things[0]);
}
@@ -127,7 +128,7 @@
}
for (int i = 1; i < things.length; i++) {
- System.out.println("Adding " + things[i].getName());
+ Log.info("Adding " + things[i].getName());
listener.thingAdded(things[i]);
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/NetworkChannelServer.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/NetworkChannelServer.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/NetworkChannelServer.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -20,6 +20,7 @@
import java.util.Vector;
import com.ogoglio.util.BlockingQueue;
+import com.ogoglio.util.Log;
import com.ogoglio.util.NetworkUtils;
public class NetworkChannelServer implements TCPChannel.Listener {
@@ -105,7 +106,7 @@
}
}
- System.out.println("Attempted location: " + remoteLocator);
+ Log.info("Attempted location??: " + remoteLocator);
//for (int i = 0; i < channels.length; i++) {
// System.out.println("Available channels: " + channels[i].getRemoteLocator());
//}
@@ -122,7 +123,7 @@
try {
serverSocket.close();
} catch (Exception e) {
- System.out.println("Trying to close server socket of NCServer:"+e.getMessage());
+ Log.info("Trying to close server socket of NCServer",e);
// don't care
}
TCPChannel[] channels = getChannels();
@@ -156,7 +157,7 @@
}
}
if (!cleaned) {
- System.err.println("Unclean client socket listener thread exiting.");
+ Log.error("Unclean client socket listener thread exiting.");
}
}
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/SenderQueue.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -19,6 +19,7 @@
import java.net.Socket;
import com.ogoglio.util.BlockingQueue;
+import com.ogoglio.util.Log;
public class SenderQueue {
private SenderThread senderThread = new SenderThread();
@@ -57,7 +58,7 @@
messageQueue.close();
}
} catch (IOException e) {
- System.out.println("IOException trying cleanup SenderQueue:"+e.getMessage());
+ Log.info("IOException trying cleanup SenderQueue",e);
}
}
@@ -91,7 +92,7 @@
Message message = (Message) messageQueue.dequeue();
unsafeSendMessage(message);
} catch (Throwable e) {
- System.err.println("Could not send message: " + e);
+ Log.error("Could not send message",e);
break;
}
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPChannel.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -18,6 +18,7 @@
import java.net.InetSocketAddress;
import java.net.Socket;
+import com.ogoglio.util.Log;
import com.ogoglio.util.NetworkUtils;
import com.ogoglio.util.BlockingQueue.QueueClosedException;
import com.ogoglio.util.BlockingQueue.QueueOverflowException;
@@ -88,14 +89,14 @@
readerThread.cleanup();
}
} catch (Exception e) {
- System.out.println("TCPChannel: Trying to cleanup to readerThread:"+(e.getClass().getName())+":"+e.getMessage());
+ Log.info("TCPChannel: Trying to cleanup to readerThread:"+(e.getClass().getName()),e);
}
try {
if (senderQueue!=null) {
senderQueue.cleanup();
}
} catch (Exception e) {
- System.out.println("TCPChannel: Trying to cleanup to senderQueue:"+(e.getClass().getName())+":"+e.getMessage());
+ Log.info("TCPChannel: Trying to cleanup to senderQueue:"+(e.getClass().getName()),e);
}
listener.channelClosed(this);
}
@@ -112,10 +113,10 @@
try {
senderQueue.sendMessage(message);
} catch (QueueOverflowException e) {
- System.err.println("Queue overflow: " + remoteHostName + ":" + remoteHostPort);
+ Log.error("Queue overflow: " + remoteHostName + ":" + remoteHostPort,e);
cleanup();
} catch (QueueClosedException e) {
- System.err.println("Queue closed: " + remoteHostName + ":" + remoteHostPort);
+ Log.error("Queue closed: " + remoteHostName + ":" + remoteHostPort,e);
cleanup();
}
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPMessageReader.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPMessageReader.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/message/TCPMessageReader.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -19,6 +19,8 @@
import java.net.InetSocketAddress;
import java.net.Socket;
+import com.ogoglio.util.Log;
+
public class TCPMessageReader extends Thread {
//TODO make this not suck ass
@@ -79,7 +81,7 @@
socketInput.close();
}
} catch (IOException e) {
- System.out.println("IOException caught trying to clean up TCPMessageReader:"+e.getMessage());
+ Log.info("IOException caught trying to clean up TCPMessageReader",e);
}
}
@@ -126,7 +128,7 @@
try {
messageHandler.handleMessage(message, channel);
} catch (Throwable e) {
- System.err.println("Error handling message: " + e);
+ Log.error("Error handling message",e);
e.printStackTrace();
}
messageBuffer.delete(0, messageBuffer.length());
@@ -140,7 +142,7 @@
}
}
if (!cleaned) {
- System.out.println("Unclean client socket listener thread exiting.");
+ Log.warn("Unclean client socket listener thread exiting");
channel.socketClosed();
}
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/NetworkUtils.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/NetworkUtils.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/NetworkUtils.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -53,7 +53,7 @@
}
if (!notified) {
notified = true;
- System.out.println("Using 127.0.0.1 as local address");
+ Log.info("Using 127.0.0.1 as local address");
}
return "127.0.0.1";
}
Deleted: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/OgoglioProperties.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/OgoglioProperties.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/util/OgoglioProperties.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -1,74 +0,0 @@
-package com.ogoglio.util;
-
-import java.io.File;
-import java.io.FileInputStream;
-import java.io.FileNotFoundException;
-import java.io.IOException;
-import java.util.Properties;
-
-public class OgoglioProperties extends Properties {
-
- public static final String PROPERTY_FILE_NAME = ".ogoglio-properties";
- private static OgoglioProperties prop=null;
-
- public static String WHICH_DB = "database_choice";
- public static String WHICH_MYSQL = "mysql";
- public static String WHICH_HSQL = "hsql";
-
- // the reason these properties are duplicated is to make it easy to switch in the configuration
- // file by changing only one line and leaving everything else in place
- public static String MYSQL_DB_DIALECT = "database_mysql_hibernate_dialect";
- public static String MYSQL_DB_DRIVER= "database_mysql_driver";
-
- public static String MYSQL_DB_SERVER_URI = "database_mysql_server_uri";
- public static String MYSQL_DB_SERVER_USER = "database_mysql_server_user";
- public static String MYSQL_DB_SERVER_PASS = "database_mysql_server_pass";
-
- public static String MYSQL_DB_TEST_URI = "database_mysql_test_uri";
- public static String MYSQL_DB_TEST_USER = "database_mysql_test_user";
- public static String MYSQL_DB_TEST_PASS = "database_mysql_test_pass";
-
- public static String HSQL_DB_DIALECT = "database_hsql_hibernate_dialect";
- public static String HSQL_DB_DRIVER= "database_hsql_driver";
-
- public static String HSQL_DB_SERVER_URI = "database_hsql_server_uri";
- public static String HSQL_DB_SERVER_USER = "database_hsql_server_user";
- public static String HSQL_DB_SERVER_PASS = "database_hsql_server_pass";
-
- public static String HSQL_DB_TEST_URI = "database_hsql_test_uri";
- public static String HSQL_DB_TEST_USER = "database_hsql_test_user";
- public static String HSQL_DB_TEST_PASS = "database_hsql_test_pass";
-
- private OgoglioProperties() {
-
- }
-
- public static void validate() {
- if (prop!=null) {
- return;
- }
- //init
- File f = new File(System.getProperty("user.home"),PROPERTY_FILE_NAME);
- prop=new OgoglioProperties();
- try {
- prop.load(new FileInputStream(f));
- } catch (FileNotFoundException e) {
- System.err.println("Can't find ogoglio properties file ("+f.getPath()+"):"+e.getMessage());
- System.exit(1);
- } catch (IOException e) {
- System.err.println("Error reading ogoglio properties file ("+f.getPath()+"):"+e.getMessage());
- System.exit(1);
- }
- }
-
- public static String getOgoglioProperty(String pname)
- {
- validate();
- String result = prop.getProperty(pname,null);
- if (result==null) {
- System.out.println("Unable to locate property "+pname+" in your "+PROPERTY_FILE_NAME+" file! Aborting!");
- System.exit(1);
- }
- return result;
- }
-}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DDoorRenderable.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DDoorRenderable.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DDoorRenderable.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -21,6 +21,7 @@
import javax.media.j3d.TransformGroup;
import com.ogoglio.client.model.Door;
+import com.ogoglio.util.Log;
import com.ogoglio.viewer.render.DoorRenderable;
public class J3DDoorRenderable extends BranchGroup implements DoorRenderable {
@@ -53,7 +54,7 @@
public void addShapeRenderable(J3DShapeRenderable shape, int lodIndex) {
if(lodIndex != 0) {
- System.err.println("Add lod indices to door, yo");
+ Log.error("Add lod indices to door, yo");
}
shapeRenderables.put(shape.getName().toLowerCase(), shape);
transformGroup.addChild(shape);
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DPageRenderable.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DPageRenderable.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DPageRenderable.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -27,6 +27,7 @@
import javax.vecmath.TexCoord2f;
import com.ogoglio.client.model.Page;
+import com.ogoglio.util.Log;
import com.ogoglio.util.StreamUtils;
import com.ogoglio.viewer.render.PageRenderable;
import com.ogoglio.viewer.render.Renderable;
@@ -237,7 +238,7 @@
Graphics graphics = image.getGraphics();
graphics.setClip(0, 0, getPreferredSize().width, getPreferredSize().height);
if (sourceImage == null) {
- System.err.println("Source image is null");
+ Log.error("Source image is null");
graphics.setColor(Color.red);
graphics.fillRect(0, 0, getPreferredSize().width, getPreferredSize().height);
return;
@@ -281,7 +282,7 @@
public void hyperlinkUpdate(HyperlinkEvent e) {
if (e.getEventType() == HyperlinkEvent.EventType.ACTIVATED) {
- System.out.println("Link clicked : " + e.getURL());
+ Log.info("Link clicked : " + e.getURL());
}
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderableLoader.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderableLoader.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderableLoader.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -38,6 +38,7 @@
import com.ogoglio.client.model.GeometryProvider;
import com.ogoglio.client.model.Shape;
import com.ogoglio.client.model.Thing;
+import com.ogoglio.util.Log;
import com.ogoglio.viewer.j3d.obj.Obj;
import com.ogoglio.viewer.j3d.obj.ObjMtl;
import com.ogoglio.viewer.render.Renderable;
@@ -75,7 +76,7 @@
//TODO consider a more memory efficient way to load shapes
Obj.Range[] ranges = group.getRanges();
if (ranges.length == 0) {
- System.err.println("Zero range group: " + group.getName());
+ Log.error("Zero range group: " + group.getName());
return null;
}
@@ -89,7 +90,7 @@
}
if (vertices.size() == 0) {
- System.err.println("Empty group: " + group.getName());
+ Log.error("Empty group: " + group.getName());
return null;
}
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/J3DRenderer.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -47,6 +47,7 @@
import com.ogoglio.client.model.Template;
import com.ogoglio.client.model.Thing;
import com.ogoglio.client.model.User;
+import com.ogoglio.util.Log;
import com.ogoglio.viewer.j3d.bvh.BvhParseException;
import com.ogoglio.viewer.j3d.obj.Obj;
import com.ogoglio.viewer.j3d.obj.ObjParseException;
@@ -243,12 +244,12 @@
}
J3DThingRenderable thingRenderable = (J3DThingRenderable) getThingRenderable(page.getThing().getThingID());
if (thingRenderable == null) {
- System.err.println("Tried to move a page to an unknown thing: " + page.getThing().getThingID());
+ Log.error("Tried to move a page to an unknown thing: " + page.getThing().getThingID());
return;
}
J3DPageRenderable pageRenderable = thingRenderable.getPageRenderable(page.getPageID());
if (pageRenderable == null) {
- System.err.println("Tried to move an unknown page: " + page.getThing().getThingID() + ", " + page.getPageID());
+ Log.error("Tried to move an unknown page: " + page.getThing().getThingID() + ", " + page.getPageID());
} else {
pageRenderable.setPosition(position);
}
@@ -260,7 +261,7 @@
}
J3DThingRenderable thingRenderable = (J3DThingRenderable) getThingRenderable(page.getThing().getThingID());
if (thingRenderable == null) {
- System.err.println("Tried to add a page to an unknown thing: " + page.getThing().getThingID());
+ Log.error("Tried to add a page to an unknown thing: " + page.getThing().getThingID());
return;
}
J3DPageRenderable pageRenderable = new J3DPageRenderable(thingRenderable/*not used!*/, page);
@@ -503,12 +504,12 @@
}
J3DThingRenderable renderable = (J3DThingRenderable) getThingRenderable(shape.getThing().getThingID());
if (renderable == null) {
- System.err.println("Tried to move a shape in an unrendered thing: " + shape.getThing().getThingID() + ", " + shape.getName());
+ Log.error("Tried to move a shape in an unrendered thing: " + shape.getThing().getThingID() + ", " + shape.getName());
return;
}
J3DShapeRenderable shapeRenderable = renderable.getShapeRenderable(shape.getName());
if (shapeRenderable == null) {
- System.err.println("Tried to move an unknown shape: " + shape.getThing().getThingID() + ", " + shape.getName());
+ Log.error("Tried to move an unknown shape: " + shape.getThing().getThingID() + ", " + shape.getName());
return;
}
startRenderableMotion(shapeRenderable, path);
@@ -517,12 +518,12 @@
public void shapeMotionStopped(Shape shape, Transform3D position) {
J3DThingRenderable renderable = (J3DThingRenderable) getThingRenderable(shape.getThing().getThingID());
if (renderable == null) {
- System.err.println("Tried to move a shape in an unrendered thing: " + shape.getThing().getThingID() + ", " + shape.getName());
+ Log.error("Tried to move a shape in an unrendered thing: " + shape.getThing().getThingID() + ", " + shape.getName());
return;
}
J3DShapeRenderable shapeRenderable = renderable.getShapeRenderable(shape.getName());
if (shapeRenderable == null) {
- System.err.println("Tried to move an unknown shape: " + shape.getThing().getThingID() + ", " + shape.getName());
+ Log.error("Tried to move an unknown shape: " + shape.getThing().getThingID() + ", " + shape.getName());
return;
}
stopRenderableMotion(shapeRenderable, position);
@@ -535,7 +536,7 @@
universe.removeAllLocales();
if(!offScreen) {
canvas.stopRenderer();
- System.out.println("Stopped renderer");
+ Log.info("Stopped renderer");
}
}
@@ -547,7 +548,7 @@
}
objs[0] = getObj(door, 0);
if (objs[0] == null) {
- System.err.println("Could not load the door geometry!");
+ Log.error("Could not load the door geometry!");
objs[0] = getObj(errorGeometryProvider, 0);
}
if (objs[0] == null) {
@@ -601,7 +602,7 @@
private void removeUserRenderable(UserRenderable renderable) {
if (renderable == null) {
- System.err.println("User renderable == null");
+ Log.error("User renderable == null");
return;
}
physicsBehavior.stopRenderableMotion(renderable);
@@ -719,7 +720,7 @@
for (int i = 0; i < objs.length; i++) {
objs[i] = getObj(thing, i);
if(objs[i] != null && objs[i].getGroups().length == 0) {
- System.err.println("Got obj with no groups for thing " + thing.getThingID() + ": " + thing.getName());
+ Log.error("Got obj with no groups for thing " + thing.getThingID() + ": " + thing.getName());
objs[i] = null;
}
if (!gotObj && objs[i] != null) {
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java 2007-09-04 15:32:46 UTC (rev 357)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/MotionInputHandler.java 2007-09-04 19:00:02 UTC (rev 358)
@@ -20,13 +20,13 @@
import java.awt.event.MouseMotionListener;
import javax.media.j3d.Transform3D;
-import javax.swing.JPopupMenu;
import javax.vecmath.Point3d;
import com.ogoglio.client.UserInputListener;
import com.ogoglio.client.model.SplinePath;
import com.ogoglio.client.model.Thing;
import com.ogoglio.util.ArgumentUtils;
+import com.ogoglio.util.Log;
import com.ogoglio.viewer.render.ClickTarget;
import com.ogoglio.viewer.render.DoorRenderable;
import com.ogoglio.viewer.render.PageRenderable;
@@ -111,7 +111,7 @@
// called from within PhysicsBehavior
public void keyPressed(KeyEvent e) {
- System.out.println("Key down");
+ Log.info("Key down "+e.toString());
if (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_W) {
if (moveForward == false || run == true) {
dirty = true;
@@ -156,7 +156,7 @@
// called from within PhysicsBehavior
public void keyReleased(KeyEvent e) {
- System.out.println("Key up");
+ Log.info("Key up:"+e.toString());
if (e.getKeyCode() == KeyEvent.VK_UP || e.getKeyCode() == KeyEvent.VK_W) {
if (mo...
[truncated message content] |
|
From: <ian...@us...> - 2007-09-04 15:32:43
|
Revision: 357
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=357&view=rev
Author: iansmith
Date: 2007-09-04 08:32:46 -0700 (Tue, 04 Sep 2007)
Log Message:
-----------
for cont. int. server
Modified Paths:
--------------
maven/trunk/pom.xml
Modified: maven/trunk/pom.xml
===================================================================
--- maven/trunk/pom.xml 2007-09-04 15:26:50 UTC (rev 356)
+++ maven/trunk/pom.xml 2007-09-04 15:32:46 UTC (rev 357)
@@ -19,6 +19,41 @@
<module>dev-plugins</module>
</modules>
+ <profiles>
+ <profile>
+ <id>boot-server</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>0.3-SNAPSHOT</version>
+ <!-- CARGO INTERACTIONS WITH TOMCAT FOR BOOTING SERVER ONLY -->
+ <configuration>
+ <wait>true</wait>
+ <!-- tomcat 5.5 running on the same machine...-->
+ <container>
+ <containerId>tomcat5x</containerId>
+ <home>${cargo.tomcat5x.home}</home>
+ <log>${basedir}/tomcat5x.log</log>
+ <output>${basedir}/tomcat5x.out</output>
+ </container>
+ <!-- tomcat configuration -->
+ <configuration>
+ <type>standalone</type>
+ <home>${ogoglio.tmp.tomcat5x}</home>
+ <properties>
+ <cargo.servlet.port>
+ 8080
+ </cargo.servlet.port>
+ </properties>
+ </configuration>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
<ciManagement>
<system>continuum</system>
@@ -44,6 +79,7 @@
</url>
</scm>
+
<build>
<pluginManagement>
<plugins>
@@ -57,5 +93,18 @@
</plugins>
</pluginManagement>
</build>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.12</version>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-04 15:26:48
|
Revision: 356
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=356&view=rev
Author: iansmith
Date: 2007-09-04 08:26:50 -0700 (Tue, 04 Sep 2007)
Log Message:
-----------
1) Fixed poms to work properly if you simply do "clean install" in the master dir. This does leave a server running if the integrations tests "error" instead of fail.
2) log4j now undercontrol (shuts up hibernate).
3) you can boot tomcat with "mvn -Pboot-server cargo:start" in the master pom dir.
4) To send a war to the booted server use "mvn war:war cargo:deploy" in server directory
Modified Paths:
--------------
maven/trunk/ogoglio/pom.xml
maven/trunk/ogoglio-appdev/pom.xml
maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
maven/trunk/ogoglio-integration-test/pom.xml
maven/trunk/ogoglio-server/pom.xml
Added Paths:
-----------
maven/trunk/ogoglio-integration-test/src/test/resources/log4j.properties
maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties
Removed Paths:
-------------
maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties
Modified: maven/trunk/ogoglio/pom.xml
===================================================================
--- maven/trunk/ogoglio/pom.xml 2007-09-03 23:33:13 UTC (rev 355)
+++ maven/trunk/ogoglio/pom.xml 2007-09-04 15:26:50 UTC (rev 356)
@@ -19,6 +19,41 @@
<module>../dev-plugins</module>
</modules>
+ <profiles>
+ <profile>
+ <id>boot-server</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>0.3-SNAPSHOT</version>
+ <!-- CARGO INTERACTIONS WITH TOMCAT FOR BOOTING SERVER ONLY -->
+ <configuration>
+ <wait>true</wait>
+ <!-- tomcat 5.5 running on the same machine...-->
+ <container>
+ <containerId>tomcat5x</containerId>
+ <home>${cargo.tomcat5x.home}</home>
+ <log>${basedir}/tomcat5x.log</log>
+ <output>${basedir}/tomcat5x.out</output>
+ </container>
+ <!-- tomcat configuration -->
+ <configuration>
+ <type>standalone</type>
+ <home>${ogoglio.tmp.tomcat5x}</home>
+ <properties>
+ <cargo.servlet.port>
+ 8080
+ </cargo.servlet.port>
+ </properties>
+ </configuration>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ </profiles>
<ciManagement>
<system>continuum</system>
@@ -44,6 +79,7 @@
</url>
</scm>
+
<build>
<pluginManagement>
<plugins>
@@ -57,5 +93,18 @@
</plugins>
</pluginManagement>
</build>
+
+ <dependencyManagement>
+ <dependencies>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.12</version>
+ <scope>runtime</scope>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
+ </dependencyManagement>
+
</project>
Modified: maven/trunk/ogoglio-appdev/pom.xml
===================================================================
--- maven/trunk/ogoglio-appdev/pom.xml 2007-09-03 23:33:13 UTC (rev 355)
+++ maven/trunk/ogoglio-appdev/pom.xml 2007-09-04 15:26:50 UTC (rev 356)
@@ -35,6 +35,11 @@
<artifactId>commons-io</artifactId>
<version>1.3</version>
</dependency>
+ <dependency>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ <version>1.1</version>
+ </dependency>
<!-- used by some code in the project -->
<dependency>
Modified: maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java
===================================================================
--- maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2007-09-03 23:33:13 UTC (rev 355)
+++ maven/trunk/ogoglio-appdev/src/main/java/com/ogoglio/appdev/migrate/MigrationSupport.java 2007-09-04 15:26:50 UTC (rev 356)
@@ -4,6 +4,7 @@
import javax.naming.NamingException;
import javax.servlet.ServletConfig;
+import org.apache.commons.logging.LogFactory;
import org.hibernate.SessionFactory;
import org.hibernate.cfg.Configuration;
@@ -20,6 +21,7 @@
public static final boolean DDL_MODE_UPDATE=true;
public static final boolean DDL_MODE_CREATE=false;
+ static org.apache.commons.logging.Log log = LogFactory.getLog("com.ogoglio.migrate");
public MigrationSupport() {
}
@@ -33,7 +35,7 @@
SessionFactory sessionFactory = getCurrentConfiguration().buildSessionFactory();
int version = DBVersionPersistTasks.findVersion(sessionFactory);
if (version != getVersionNumber()) {
- System.err.println("DB Version Mismatch! Expected (" + getVersionNumber() + ") but got " + version + "!");
+ log.error("DB Version Mismatch! Expected (" + getVersionNumber() + ") but got " + version + "!");
sessionFactory.close();
return tryUpgrade(servletConf, ctx, version, getVersionNumber(),
DDL_MODE_UPDATE, true, null);
@@ -42,10 +44,10 @@
return true; // we are at the expected version
} catch (PersistException e) {
if (e.innerThrowable == null) {
- System.out.println("Serious problem with hibernate:" + e.getMessage());
+ log.error("Serious problem with hibernate:" + e.getMessage());
return false;
}
- System.err.println("Unable to figure out DB version number. Likely this is a fresh database....(" + e.innerThrowable.getClass().getName() + ")");
+ log.info("Unable to figure out DB version number. Likely this is a fresh database....(" + e.innerThrowable.getClass().getName() + ")");
return initVersionAndUpgrade(servletConf, ctx);
}
}
@@ -61,7 +63,7 @@
factory.close();
return true;
} catch (Throwable t) {
- System.err.println("Error trying initialized DB:" + t.getMessage());
+ log.error("Error trying initialized DB:" + t.getMessage());
return false;
}
}
@@ -95,7 +97,7 @@
try {
return DBVersionPersistTasks.updateVersion(targetVersion, expectedSize, sessionFactory);
} catch (PersistException e) {
- System.err.println("Problem updating the version of the database to version " + targetVersion + ":" + e.getMessage());
+ log.error("Problem updating the version of the database to version " + targetVersion + ":" + e.getMessage());
return false;
}
}
@@ -103,7 +105,7 @@
public boolean tryUpgrade(ServletConfig servletConfig, Context ctx, int db_is,
int db_wants_to_be, boolean isUpdate, boolean useJNDI, PropStorage propStore) {
if (getMigrationList().length != getVersionNumber()) {
- System.out.println("Internal error! Migration list length should be " + getVersionNumber() + " but is " + getMigrationList().length + "!");
+ log.error("Internal error! Migration list length should be " + getVersionNumber() + " but is " + getMigrationList().length + "!");
return false;
}
boolean canMigrate = false;
@@ -120,12 +122,12 @@
canMigrate = true;
}
} catch (NamingException e) {
- System.err.println("Naming exception trying to access " + MIGRATION_KEY + " from naming context!");
+ log.error("Naming exception trying to access " + MIGRATION_KEY + " from naming context!");
canMigrate=false;
}
if (!canMigrate) {
- System.err.println("Cannot migrate data! Property ogoglio.okToMigrateDB is false or non-existent!");
+ log.error("Cannot migrate data! Property ogoglio.okToMigrateDB is false or non-existent!");
return false;
}
String hbm_auto_flag="update";
@@ -136,8 +138,7 @@
for (int i = db_is; i < db_wants_to_be; ++i) {
Migration current = getMigrationList()[i];
- System.out.println("------------------------------------------------\n");
- System.out.println("DB: Attempting migration from " + i + " to " + (i + 1) + " with auto HBM:"+hbm_auto_flag);
+ log.info("DB: Attempting migration from " + i + " to " + (i + 1) + " with auto HBM:"+hbm_auto_flag);
//try to get hibernate to do the work
Configuration config = createConfigurationForHibernate(i + 1, hbm_auto_flag, useJNDI, propStore);
@@ -156,26 +157,25 @@
return false;
}
} catch (PersistException e) {
- System.err.println("Whoa! Patch failed at revision!"+(i+1)+" on class "+current.getClass().getName());
- System.err.println("Whoa! Persistance layer problem was:"+e.getMessage());
+ log.error("Whoa! Patch failed at revision!"+(i+1)+" on class "+current.getClass().getName());
+ log.error("Whoa! Persistance layer problem was:"+e.getMessage());
}
try {
if (!isUpdate) {
//we need to go ahead and create the data
if (!current.populate(factory, i, i+1)) {
- System.err.println("Whoa! Populate failed at revision!"+(i+1)+" on class "+current.getClass().getName());
+ log.error("Whoa! Populate failed at revision!"+(i+1)+" on class "+current.getClass().getName());
factory.close();
return false;
}
}
} catch (PersistException e) {
- System.err.println("Whoa! Populate failed at revision!"+(i+1)+" on class "+current.getClass().getName());
- System.err.println("Whoa! Persistance layer problem was:"+e.getMessage());
+ log.error("Whoa! Populate failed at revision!"+(i+1)+" on class "+current.getClass().getName());
+ log.error("Whoa! Persistance layer problem was:"+e.getMessage());
}
factory.close();
- System.out.println("------------------------------------------------\n");
}
return true;
}
Modified: maven/trunk/ogoglio-integration-test/pom.xml
===================================================================
--- maven/trunk/ogoglio-integration-test/pom.xml 2007-09-03 23:33:13 UTC (rev 355)
+++ maven/trunk/ogoglio-integration-test/pom.xml 2007-09-04 15:26:50 UTC (rev 356)
@@ -7,11 +7,11 @@
<!-- About this project -->
<parent>
- <groupId>com.ogoglio</groupId>
- <artifactId>ogoglio</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <relativePath>../ogoglio</relativePath>
- </parent>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>ogoglio</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../ogoglio</relativePath>
+ </parent>
<artifactId>ogoglio-integration-test</artifactId>
<packaging>pom</packaging>
@@ -25,12 +25,13 @@
<include>basic-config.properties</include>
<include>bootstrap.properties</include>
</includes>
- </testResource>
+ </testResource>
<testResource>
<filtering>false</filtering>
<directory>src/test/resources</directory>
<includes>
+ <include>log4j.properties</include>
<include>mail/*</include>
<include>sample-art3d/*</include>
</includes>
@@ -58,7 +59,7 @@
</execution>
</executions>
<configuration>
- <skip>true</skip> <!--skip unit tests -->
+ <skip>true</skip><!--skip unit tests -->
</configuration>
</plugin>
<!--need to compile b/c POM packaging doesn't get it by def -->
@@ -87,15 +88,14 @@
</goals>
</execution>
</executions>
- <configuration/>
+ <configuration />
</plugin>
<!--lots of CARGO magic to bring server up, do deploys... -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>0.3-SNAPSHOT</version>
- <configuration>
- </configuration>
+ <configuration></configuration>
<executions>
<execution>
<!--bring up server in /tmp -->
@@ -106,14 +106,13 @@
</goals>
<configuration>
<wait>false</wait>
-
<container>
<containerId>tomcat5x</containerId>
<home>${cargo.tomcat5x.home}</home>
<log>${basedir}/tomcat5x.log</log>
<output>${basedir}/tomcat5x.out</output>
</container>
- <!-- tomcat configuration -->
+ <!-- container configuration -->
<configuration>
<type>standalone</type>
<home>${ogoglio.tmp.tomcat5x}</home>
@@ -121,19 +120,19 @@
<cargo.servlet.port>
8080
</cargo.servlet.port>
- <cargo.logging>
- high
- </cargo.logging>
+ <cargo.logging>high</cargo.logging>
</properties>
<!-- tricky: this gets put in *before* the server even boots -->
<deployables>
<deployable>
- <groupId>com.ogoglio</groupId>
- <artifactId>ogoglio-server</artifactId>
- <type>war</type>
- <properties>
- <context>og</context>
- </properties>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>
+ ogoglio-server
+ </artifactId>
+ <type>war</type>
+ <properties>
+ <context>og</context>
+ </properties>
</deployable>
</deployables>
</configuration>
@@ -144,7 +143,7 @@
</plugins>
</build>
-
+
<dependencies>
<dependency>
<groupId>junit</groupId>
@@ -167,6 +166,14 @@
<artifactId>ogoglio-viewer-applet</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <!-- version, scope, optional inherited but overwritable -->
+ </dependency>
+
+
</dependencies>
</project>
Added: maven/trunk/ogoglio-integration-test/src/test/resources/log4j.properties
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/resources/log4j.properties (rev 0)
+++ maven/trunk/ogoglio-integration-test/src/test/resources/log4j.properties 2007-09-04 15:26:50 UTC (rev 356)
@@ -0,0 +1,49 @@
+### direct log messages to stdout ###
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+### direct messages to file hibernate.log ###
+#log4j.appender.file=org.apache.log4j.FileAppender
+#log4j.appender.file.File=hibernate.log
+#log4j.appender.file.layout=org.apache.log4j.PatternLayout
+#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+### set log levels - for more verbose logging change 'info' to 'debug' ###
+
+log4j.rootLogger=warn, stdout
+
+log4j.logger.com.ogoglio.migrate=info
+
+log4j.logger.org.hibernate=error
+#log4j.logger.org.hibernate=debug
+
+### log HQL query parser activity
+#log4j.logger.org.hibernate.hql.ast.AST=debug
+
+### log just the SQL
+#log4j.logger.org.hibernate.SQL=debug
+
+### log JDBC bind parameters ###
+#log4j.logger.org.hibernate.type=info
+#log4j.logger.org.hibernate.type=debug
+
+### log schema export/update ###
+#log4j.logger.org.hibernate.tool.hbm2ddl=info
+
+### log HQL parse trees
+#log4j.logger.org.hibernate.hql=debug
+
+### log cache activity ###
+#log4j.logger.org.hibernate.cache=debug
+
+### log transaction activity
+#log4j.logger.org.hibernate.transaction=debug
+
+### log JDBC resource acquisition
+#log4j.logger.org.hibernate.jdbc=debug
+
+### enable the following line if you want to track down connection ###
+### leakages when using DriverManagerConnectionProvider ###
+#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace
Modified: maven/trunk/ogoglio-server/pom.xml
===================================================================
--- maven/trunk/ogoglio-server/pom.xml 2007-09-03 23:33:13 UTC (rev 355)
+++ maven/trunk/ogoglio-server/pom.xml 2007-09-04 15:26:50 UTC (rev 356)
@@ -76,6 +76,7 @@
<filtering>false</filtering>
<directory>src/test/resources</directory>
<includes>
+ <include>log4j.properties</include>
<include>mail/*</include>
<include>templates/*</include>
</includes>
@@ -197,6 +198,13 @@
<artifactId>commons-httpclient</artifactId>
<version>3.0.1</version>
</dependency>
+
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <!-- version, scope, optional inherited but overwritable -->
+ </dependency>
+
<dependency>
<groupId>com.sun</groupId>
<artifactId>mail</artifactId>
Deleted: maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties 2007-09-03 23:33:13 UTC (rev 355)
+++ maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties 2007-09-04 15:26:50 UTC (rev 356)
@@ -1,47 +0,0 @@
-### direct log messages to stdout ###
-log4j.appender.stdout=org.apache.log4j.ConsoleAppender
-log4j.appender.stdout.Target=System.out
-log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
-log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-### direct messages to file hibernate.log ###
-#log4j.appender.file=org.apache.log4j.FileAppender
-#log4j.appender.file.File=hibernate.log
-#log4j.appender.file.layout=org.apache.log4j.PatternLayout
-#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
-
-### set log levels - for more verbose logging change 'info' to 'debug' ###
-
-log4j.rootLogger=warn, stdout
-
-#log4j.logger.org.hibernate=warn
-#log4j.logger.org.hibernate=debug
-
-### log HQL query parser activity
-#log4j.logger.org.hibernate.hql.ast.AST=debug
-
-### log just the SQL
-#log4j.logger.org.hibernate.SQL=debug
-
-### log JDBC bind parameters ###
-#log4j.logger.org.hibernate.type=info
-#log4j.logger.org.hibernate.type=debug
-
-### log schema export/update ###
-#log4j.logger.org.hibernate.tool.hbm2ddl=info
-
-### log HQL parse trees
-#log4j.logger.org.hibernate.hql=debug
-
-### log cache activity ###
-#log4j.logger.org.hibernate.cache=debug
-
-### log transaction activity
-#log4j.logger.org.hibernate.transaction=debug
-
-### log JDBC resource acquisition
-#log4j.logger.org.hibernate.jdbc=debug
-
-### enable the following line if you want to track down connection ###
-### leakages when using DriverManagerConnectionProvider ###
-#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace
Added: maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties (rev 0)
+++ maven/trunk/ogoglio-server/src/main/resources/log4j/log4j.properties 2007-09-04 15:26:50 UTC (rev 356)
@@ -0,0 +1,49 @@
+### direct log messages to stdout ###
+log4j.appender.stdout=org.apache.log4j.ConsoleAppender
+log4j.appender.stdout.Target=System.out
+log4j.appender.stdout.layout=org.apache.log4j.PatternLayout
+log4j.appender.stdout.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+### direct messages to file hibernate.log ###
+#log4j.appender.file=org.apache.log4j.FileAppender
+#log4j.appender.file.File=hibernate.log
+#log4j.appender.file.layout=org.apache.log4j.PatternLayout
+#log4j.appender.file.layout.ConversionPattern=%d{ABSOLUTE} %5p %c{1}:%L - %m%n
+
+### set log levels - for more verbose logging change 'info' to 'debug' ###
+
+log4j.rootLogger=warn, stdout
+
+log4j.logger.com.ogoglio.migrate=info
+
+log4j.logger.org.hibernate=error
+#log4j.logger.org.hibernate=debug
+
+### log HQL query parser activity
+#log4j.logger.org.hibernate.hql.ast.AST=debug
+
+### log just the SQL
+#log4j.logger.org.hibernate.SQL=debug
+
+### log JDBC bind parameters ###
+#log4j.logger.org.hibernate.type=info
+#log4j.logger.org.hibernate.type=debug
+
+### log schema export/update ###
+#log4j.logger.org.hibernate.tool.hbm2ddl=info
+
+### log HQL parse trees
+#log4j.logger.org.hibernate.hql=debug
+
+### log cache activity ###
+#log4j.logger.org.hibernate.cache=debug
+
+### log transaction activity
+#log4j.logger.org.hibernate.transaction=debug
+
+### log JDBC resource acquisition
+#log4j.logger.org.hibernate.jdbc=debug
+
+### enable the following line if you want to track down connection ###
+### leakages when using DriverManagerConnectionProvider ###
+#log4j.logger.org.hibernate.connection.DriverManagerConnectionProvider=trace
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-03 23:33:10
|
Revision: 355
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=355&view=rev
Author: iansmith
Date: 2007-09-03 16:33:13 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
egregious pom and directory hacking
Added Paths:
-----------
maven/trunk/pom.xml
Added: maven/trunk/pom.xml
===================================================================
--- maven/trunk/pom.xml (rev 0)
+++ maven/trunk/pom.xml 2007-09-03 23:33:13 UTC (rev 355)
@@ -0,0 +1,61 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>com.ogoglio</groupId>
+ <artifactId>ogoglio</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>ogoglio-appdev</module>
+ <module>ogoglio-body-editor-applet</module>
+ <module>ogoglio-common</module>
+ <module>ogoglio-test-applet</module>
+ <module>ogoglio-viewer-applet</module>
+ <module>ogoglio-server</module>
+ <module>ogoglio-integration-test</module>
+ <module>dev-plugins</module>
+ </modules>
+
+
+ <ciManagement>
+ <system>continuum</system>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <configuration>
+ <address>co...@tr...</address>
+ </configuration>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+
+ <scm>
+ <connection>
+ scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk
+ </connection>
+ <developerConnection>
+ scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk
+ </developerConnection>
+ <url>
+ http://ogoglio.svn.sourceforge.net/viewvc/ogoglio/maven/trunk
+ </url>
+ </scm>
+
+ <build>
+ <pluginManagement>
+ <plugins>
+ <!-- solves the problem with java3d not being able to link due to isolated classloader -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <childDelegation>true</childDelegation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
+ </build>
+</project>
+
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-03 23:26:24
|
Revision: 354
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=354&view=rev
Author: iansmith
Date: 2007-09-03 16:26:25 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
undoing previous pom hosage
Modified Paths:
--------------
maven/trunk/ogoglio/pom.xml
Removed Paths:
-------------
maven/trunk/ogoglio/dev-plugins
maven/trunk/ogoglio/ogoglio-appdev
maven/trunk/ogoglio/ogoglio-body-editor-applet
maven/trunk/ogoglio/ogoglio-common
maven/trunk/ogoglio/ogoglio-integration-test
maven/trunk/ogoglio/ogoglio-server
maven/trunk/ogoglio/ogoglio-test-applet
maven/trunk/ogoglio/ogoglio-viewer-applet
Deleted: maven/trunk/ogoglio/dev-plugins
===================================================================
--- maven/trunk/ogoglio/dev-plugins 2007-09-03 23:15:22 UTC (rev 353)
+++ maven/trunk/ogoglio/dev-plugins 2007-09-03 23:26:25 UTC (rev 354)
@@ -1 +0,0 @@
-link ../dev-plugins
\ No newline at end of file
Deleted: maven/trunk/ogoglio/ogoglio-appdev
===================================================================
--- maven/trunk/ogoglio/ogoglio-appdev 2007-09-03 23:15:22 UTC (rev 353)
+++ maven/trunk/ogoglio/ogoglio-appdev 2007-09-03 23:26:25 UTC (rev 354)
@@ -1 +0,0 @@
-link ../ogoglio-appdev
\ No newline at end of file
Deleted: maven/trunk/ogoglio/ogoglio-body-editor-applet
===================================================================
--- maven/trunk/ogoglio/ogoglio-body-editor-applet 2007-09-03 23:15:22 UTC (rev 353)
+++ maven/trunk/ogoglio/ogoglio-body-editor-applet 2007-09-03 23:26:25 UTC (rev 354)
@@ -1 +0,0 @@
-link ../ogoglio-body-editor-applet
\ No newline at end of file
Deleted: maven/trunk/ogoglio/ogoglio-common
===================================================================
--- maven/trunk/ogoglio/ogoglio-common 2007-09-03 23:15:22 UTC (rev 353)
+++ maven/trunk/ogoglio/ogoglio-common 2007-09-03 23:26:25 UTC (rev 354)
@@ -1 +0,0 @@
-link ../ogoglio-common
\ No newline at end of file
Deleted: maven/trunk/ogoglio/ogoglio-integration-test
===================================================================
--- maven/trunk/ogoglio/ogoglio-integration-test 2007-09-03 23:15:22 UTC (rev 353)
+++ maven/trunk/ogoglio/ogoglio-integration-test 2007-09-03 23:26:25 UTC (rev 354)
@@ -1 +0,0 @@
-link ../ogoglio-integration-test
\ No newline at end of file
Deleted: maven/trunk/ogoglio/ogoglio-server
===================================================================
--- maven/trunk/ogoglio/ogoglio-server 2007-09-03 23:15:22 UTC (rev 353)
+++ maven/trunk/ogoglio/ogoglio-server 2007-09-03 23:26:25 UTC (rev 354)
@@ -1 +0,0 @@
-link ../ogoglio-server
\ No newline at end of file
Deleted: maven/trunk/ogoglio/ogoglio-test-applet
===================================================================
--- maven/trunk/ogoglio/ogoglio-test-applet 2007-09-03 23:15:22 UTC (rev 353)
+++ maven/trunk/ogoglio/ogoglio-test-applet 2007-09-03 23:26:25 UTC (rev 354)
@@ -1 +0,0 @@
-link ../ogoglio-test-applet
\ No newline at end of file
Deleted: maven/trunk/ogoglio/ogoglio-viewer-applet
===================================================================
--- maven/trunk/ogoglio/ogoglio-viewer-applet 2007-09-03 23:15:22 UTC (rev 353)
+++ maven/trunk/ogoglio/ogoglio-viewer-applet 2007-09-03 23:26:25 UTC (rev 354)
@@ -1 +0,0 @@
-link ../ogoglio-viewer-applet
\ No newline at end of file
Modified: maven/trunk/ogoglio/pom.xml
===================================================================
--- maven/trunk/ogoglio/pom.xml 2007-09-03 23:15:22 UTC (rev 353)
+++ maven/trunk/ogoglio/pom.xml 2007-09-03 23:26:25 UTC (rev 354)
@@ -9,14 +9,14 @@
<packaging>pom</packaging>
<modules>
- <module>ogoglio-appdev</module>
- <module>ogoglio-body-editor-applet</module>
- <module>ogoglio-common</module>
- <module>ogoglio-test-applet</module>
- <module>ogoglio-viewer-applet</module>
- <module>ogoglio-server</module>
- <module>ogoglio-integration-test</module>
- <module>dev-plugins</module>
+ <module>../ogoglio-appdev</module>
+ <module>../ogoglio-body-editor-applet</module>
+ <module>../ogoglio-common</module>
+ <module>../ogoglio-test-applet</module>
+ <module>../ogoglio-viewer-applet</module>
+ <module>../ogoglio-server</module>
+ <module>../ogoglio-integration-test</module>
+ <module>../dev-plugins</module>
</modules>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-03 23:15:20
|
Revision: 353
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=353&view=rev
Author: iansmith
Date: 2007-09-03 16:15:22 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
pom hackery
Modified Paths:
--------------
maven/trunk/ogoglio/pom.xml
Modified: maven/trunk/ogoglio/pom.xml
===================================================================
--- maven/trunk/ogoglio/pom.xml 2007-09-03 23:04:22 UTC (rev 352)
+++ maven/trunk/ogoglio/pom.xml 2007-09-03 23:15:22 UTC (rev 353)
@@ -9,14 +9,14 @@
<packaging>pom</packaging>
<modules>
- <module>../ogoglio-appdev</module>
- <module>../ogoglio-body-editor-applet</module>
- <module>../ogoglio-common</module>
- <module>../ogoglio-test-applet</module>
- <module>../ogoglio-viewer-applet</module>
- <module>../ogoglio-server</module>
- <module>../ogoglio-integration-test</module>
- <module>../dev-plugins</module>
+ <module>ogoglio-appdev</module>
+ <module>ogoglio-body-editor-applet</module>
+ <module>ogoglio-common</module>
+ <module>ogoglio-test-applet</module>
+ <module>ogoglio-viewer-applet</module>
+ <module>ogoglio-server</module>
+ <module>ogoglio-integration-test</module>
+ <module>dev-plugins</module>
</modules>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-03 23:04:21
|
Revision: 352
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=352&view=rev
Author: iansmith
Date: 2007-09-03 16:04:22 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
more pom hacking
Added Paths:
-----------
maven/trunk/ogoglio/dev-plugins
maven/trunk/ogoglio/ogoglio-appdev
maven/trunk/ogoglio/ogoglio-body-editor-applet
maven/trunk/ogoglio/ogoglio-common
maven/trunk/ogoglio/ogoglio-integration-test
maven/trunk/ogoglio/ogoglio-server
maven/trunk/ogoglio/ogoglio-test-applet
maven/trunk/ogoglio/ogoglio-viewer-applet
Added: maven/trunk/ogoglio/dev-plugins
===================================================================
--- maven/trunk/ogoglio/dev-plugins (rev 0)
+++ maven/trunk/ogoglio/dev-plugins 2007-09-03 23:04:22 UTC (rev 352)
@@ -0,0 +1 @@
+link ../dev-plugins
\ No newline at end of file
Property changes on: maven/trunk/ogoglio/dev-plugins
___________________________________________________________________
Name: svn:special
+ *
Added: maven/trunk/ogoglio/ogoglio-appdev
===================================================================
--- maven/trunk/ogoglio/ogoglio-appdev (rev 0)
+++ maven/trunk/ogoglio/ogoglio-appdev 2007-09-03 23:04:22 UTC (rev 352)
@@ -0,0 +1 @@
+link ../ogoglio-appdev
\ No newline at end of file
Property changes on: maven/trunk/ogoglio/ogoglio-appdev
___________________________________________________________________
Name: svn:special
+ *
Added: maven/trunk/ogoglio/ogoglio-body-editor-applet
===================================================================
--- maven/trunk/ogoglio/ogoglio-body-editor-applet (rev 0)
+++ maven/trunk/ogoglio/ogoglio-body-editor-applet 2007-09-03 23:04:22 UTC (rev 352)
@@ -0,0 +1 @@
+link ../ogoglio-body-editor-applet
\ No newline at end of file
Property changes on: maven/trunk/ogoglio/ogoglio-body-editor-applet
___________________________________________________________________
Name: svn:special
+ *
Added: maven/trunk/ogoglio/ogoglio-common
===================================================================
--- maven/trunk/ogoglio/ogoglio-common (rev 0)
+++ maven/trunk/ogoglio/ogoglio-common 2007-09-03 23:04:22 UTC (rev 352)
@@ -0,0 +1 @@
+link ../ogoglio-common
\ No newline at end of file
Property changes on: maven/trunk/ogoglio/ogoglio-common
___________________________________________________________________
Name: svn:special
+ *
Added: maven/trunk/ogoglio/ogoglio-integration-test
===================================================================
--- maven/trunk/ogoglio/ogoglio-integration-test (rev 0)
+++ maven/trunk/ogoglio/ogoglio-integration-test 2007-09-03 23:04:22 UTC (rev 352)
@@ -0,0 +1 @@
+link ../ogoglio-integration-test
\ No newline at end of file
Property changes on: maven/trunk/ogoglio/ogoglio-integration-test
___________________________________________________________________
Name: svn:special
+ *
Added: maven/trunk/ogoglio/ogoglio-server
===================================================================
--- maven/trunk/ogoglio/ogoglio-server (rev 0)
+++ maven/trunk/ogoglio/ogoglio-server 2007-09-03 23:04:22 UTC (rev 352)
@@ -0,0 +1 @@
+link ../ogoglio-server
\ No newline at end of file
Property changes on: maven/trunk/ogoglio/ogoglio-server
___________________________________________________________________
Name: svn:special
+ *
Added: maven/trunk/ogoglio/ogoglio-test-applet
===================================================================
--- maven/trunk/ogoglio/ogoglio-test-applet (rev 0)
+++ maven/trunk/ogoglio/ogoglio-test-applet 2007-09-03 23:04:22 UTC (rev 352)
@@ -0,0 +1 @@
+link ../ogoglio-test-applet
\ No newline at end of file
Property changes on: maven/trunk/ogoglio/ogoglio-test-applet
___________________________________________________________________
Name: svn:special
+ *
Added: maven/trunk/ogoglio/ogoglio-viewer-applet
===================================================================
--- maven/trunk/ogoglio/ogoglio-viewer-applet (rev 0)
+++ maven/trunk/ogoglio/ogoglio-viewer-applet 2007-09-03 23:04:22 UTC (rev 352)
@@ -0,0 +1 @@
+link ../ogoglio-viewer-applet
\ No newline at end of file
Property changes on: maven/trunk/ogoglio/ogoglio-viewer-applet
___________________________________________________________________
Name: svn:special
+ *
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-03 22:14:08
|
Revision: 351
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=351&view=rev
Author: iansmith
Date: 2007-09-03 15:13:54 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
more pom hacking
Modified Paths:
--------------
maven/trunk/ogoglio-server/pom.xml
Modified: maven/trunk/ogoglio-server/pom.xml
===================================================================
--- maven/trunk/ogoglio-server/pom.xml 2007-09-03 22:13:29 UTC (rev 350)
+++ maven/trunk/ogoglio-server/pom.xml 2007-09-03 22:13:54 UTC (rev 351)
@@ -14,19 +14,6 @@
<artifactId>ogoglio-server</artifactId>
<packaging>war</packaging>
- <!-- mildly questionable: with this profile active by default, you don't get tests run -->
- <!-- when you do 'install' in this directory... this is b/c often you don't want to destroy -->
- <!-- the db (which the tests do) when doing server development... comment this out to get -->
- <!-- the maven default behavior -->
- <profiles>
- <profile>
- <id>server-side</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- </profile>
- </profiles>
-
<!-- -->
<!-- BUILD -->
<!-- -->
@@ -189,48 +176,6 @@
</execution>
</executions>
</plugin>
- <!-- CARGO CONFIG:INSTALL TO RUNNING SERVER -->
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>0.3-SNAPSHOT</version>
- <executions>
- <execution>
- <id>server-side</id>
- <inherited>true</inherited>
- <phase>install</phase>
- <goals>
- <goal>deploy</goal>
- </goals>
- <configuration>
- <container>
- <containerId>tomcat5x</containerId>
- </container>
- <!-- Configuration to use with the container -->
- <configuration>
- <type>existing</type>
- <home>${ogoglio.tmp.tomcat5x}</home>
- </configuration>
- <deployables>
- <deployable>
- <properties>
- <context>
- ${pom.artifactId}
- </context>
- </properties>
- </deployable>
- </deployables>
-
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
</plugins>
</build>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-03 22:13:27
|
Revision: 350
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=350&view=rev
Author: iansmith
Date: 2007-09-03 15:13:29 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
more pom hacking
Modified Paths:
--------------
maven/trunk/ogoglio-integration-test/pom.xml
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
Modified: maven/trunk/ogoglio-integration-test/pom.xml
===================================================================
--- maven/trunk/ogoglio-integration-test/pom.xml 2007-09-03 22:13:05 UTC (rev 349)
+++ maven/trunk/ogoglio-integration-test/pom.xml 2007-09-03 22:13:29 UTC (rev 350)
@@ -5,15 +5,6 @@
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
- <profiles>
- <profile>
- <id>integration-test</id>
- <activation>
- <activeByDefault>true</activeByDefault>
- </activation>
- </profile>
- </profiles>
-
<!-- About this project -->
<parent>
<groupId>com.ogoglio</groupId>
@@ -34,7 +25,8 @@
<include>basic-config.properties</include>
<include>bootstrap.properties</include>
</includes>
- </testResource>
+ </testResource>
+
<testResource>
<filtering>false</filtering>
<directory>src/test/resources</directory>
@@ -45,7 +37,32 @@
</testResource>
</testResources>
<plugins>
+ <!--only run tests at integration time -->
<plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>over the wire tests</id>
+ <phase>integration-test</phase>
+ <goals>
+ <goal>test</goal>
+ </goals>
+ <configuration>
+ <excludes>
+ <exclude>
+ **/SpaceDuplicatorTest.java
+ </exclude>
+ </excludes>
+ <skip>false</skip>
+ </configuration>
+ </execution>
+ </executions>
+ <configuration>
+ <skip>true</skip> <!--skip unit tests -->
+ </configuration>
+ </plugin>
+ <!--need to compile b/c POM packaging doesn't get it by def -->
+ <plugin>
<artifactId>maven-compiler-plugin</artifactId>
<executions>
<execution>
@@ -58,6 +75,7 @@
</executions>
<configuration />
</plugin>
+ <!--need to do resources b/c POM packaging doesn't get them by def -->
<plugin>
<artifactId>maven-resources-plugin</artifactId>
<executions>
@@ -69,31 +87,61 @@
</goals>
</execution>
</executions>
- <configuration />
+ <configuration/>
</plugin>
+ <!--lots of CARGO magic to bring server up, do deploys... -->
<plugin>
- <artifactId>maven-surefire-plugin</artifactId>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>0.3-SNAPSHOT</version>
+ <configuration>
+ </configuration>
<executions>
<execution>
- <id>over the wire tests</id>
- <phase>integration-test</phase>
+ <!--bring up server in /tmp -->
+ <id>boot-server</id>
+ <phase>pre-integration-test</phase>
<goals>
- <goal>test</goal>
+ <goal>start</goal>
</goals>
<configuration>
- <excludes>
- <exclude>
- **/SpaceDuplicatorTest.java
- </exclude>
- </excludes>
- <skip>false</skip>
+ <wait>false</wait>
+
+ <container>
+ <containerId>tomcat5x</containerId>
+ <home>${cargo.tomcat5x.home}</home>
+ <log>${basedir}/tomcat5x.log</log>
+ <output>${basedir}/tomcat5x.out</output>
+ </container>
+ <!-- tomcat configuration -->
+ <configuration>
+ <type>standalone</type>
+ <home>${ogoglio.tmp.tomcat5x}</home>
+ <properties>
+ <cargo.servlet.port>
+ 8080
+ </cargo.servlet.port>
+ <cargo.logging>
+ high
+ </cargo.logging>
+ </properties>
+ <!-- tricky: this gets put in *before* the server even boots -->
+ <deployables>
+ <deployable>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>ogoglio-server</artifactId>
+ <type>war</type>
+ <properties>
+ <context>og</context>
+ </properties>
+ </deployable>
+ </deployables>
+ </configuration>
</configuration>
</execution>
</executions>
- <configuration>
- <skip>true</skip>
- </configuration>
</plugin>
+
</plugins>
</build>
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-09-03 22:13:05 UTC (rev 349)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-09-03 22:13:29 UTC (rev 350)
@@ -315,6 +315,11 @@
}
private UserDocument[] verifyUserDocsBySize(WebAPIClient webClient1, long spaceID, int expectedLen, String expectedUsername) throws IOException {
+ try {
+ System.out.println("Sleeping in client test! *****");
+ Thread.sleep(2500);
+ } catch (Exception e) {}
+
UserDocument[] userDocs = webClient1.getUserDocuments(spaceID);
assertEquals(expectedLen, userDocs.length);
if (expectedUsername != null) {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-03 22:13:09
|
Revision: 349
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=349&view=rev
Author: iansmith
Date: 2007-09-03 15:13:05 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
more pom hacking
Modified Paths:
--------------
maven/trunk/ogoglio/pom.xml
Removed Paths:
-------------
maven/trunk/ogoglio/continuumcs.xml
maven/trunk/ogoglio/pom-client-side.xml
Deleted: maven/trunk/ogoglio/continuumcs.xml
===================================================================
--- maven/trunk/ogoglio/continuumcs.xml 2007-09-03 17:11:43 UTC (rev 348)
+++ maven/trunk/ogoglio/continuumcs.xml 2007-09-03 22:13:05 UTC (rev 349)
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>com.ogoglio</groupId>
- <artifactId>ogoglio-client-side</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <modules>
- <module>../ogoglio-appdev</module>
- <module>../ogoglio-body-editor-applet</module>
- <module>../ogoglio-common</module>
- <module>../ogoglio-test-applet</module>
- <module>../ogoglio-viewer-applet</module>
- <module>../dev-plugins</module>
- </modules>
-
- <scm>
- <connection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</connection>
- <developerConnection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</developerConnection>
- <url>http://ogoglio.svn.sourceforge.net/viewvc/ogoglio/maven/trunk</url>
- </scm>
-
-</project>
\ No newline at end of file
Deleted: maven/trunk/ogoglio/pom-client-side.xml
===================================================================
--- maven/trunk/ogoglio/pom-client-side.xml 2007-09-03 17:11:43 UTC (rev 348)
+++ maven/trunk/ogoglio/pom-client-side.xml 2007-09-03 22:13:05 UTC (rev 349)
@@ -1,28 +0,0 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>com.ogoglio</groupId>
- <artifactId>ogoglio-client-side</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>pom</packaging>
-
- <modules>
- <module>../ogoglio-appdev</module>
- <module>../ogoglio-body-editor-applet</module>
- <module>../ogoglio-common</module>
- <module>../ogoglio-test-applet</module>
- <module>../ogoglio-viewer-applet</module>
- <module>../dev-plugins</module>
- </modules>
-
- <scm>
- <connection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</connection>
- <developerConnection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</developerConnection>
- <url>http://ogoglio.svn.sourceforge.net/viewvc/ogoglio/maven/trunk</url>
- </scm>
-
-</project>
\ No newline at end of file
Modified: maven/trunk/ogoglio/pom.xml
===================================================================
--- maven/trunk/ogoglio/pom.xml 2007-09-03 17:11:43 UTC (rev 348)
+++ maven/trunk/ogoglio/pom.xml 2007-09-03 22:13:05 UTC (rev 349)
@@ -8,117 +8,17 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
- <profiles>
- <profile>
- <id>kill-server</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>0.3-SNAPSHOT</version>
- <!-- CARGO INTERACTIONS WITH TOMCAT FOR KILLING SERVER ONLY -->
- <configuration>
- <!-- tomcat 5.5 running on the same machine...-->
- <container>
- <containerId>tomcat5x</containerId>
- <home>${cargo.tomcat5x.home}</home>
- </container>
- <!-- tomcat configuration -->
- <configuration>
- <type>existing</type>
- <home>${ogoglio.tmp.tomcat5x}</home>
- <properties>
- <cargo.servlet.port>
- 8080
- </cargo.servlet.port>
- </properties>
- </configuration>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>boot-server</id>
- <build>
- <plugins>
- <!-- CARGO INTERACTIONS WITH TOMCAT FOR BOOTING SERVER ONLY -->
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>0.3-SNAPSHOT</version>
- <!-- CARGO INTERACTIONS WITH TOMCAT FOR BOOTING SERVER ONLY -->
- <configuration>
- <wait>${boot-server.wait}</wait>
- <!-- tomcat 5.5 running on the same machine...-->
- <container>
- <containerId>tomcat5x</containerId>
- <home>${cargo.tomcat5x.home}</home>
- <log>${basedir}/tomcat5x.log</log>
- <output>${basedir}/tomcat5x.out</output>
- </container>
- <!-- tomcat configuration -->
- <configuration>
- <type>standalone</type>
- <home>${ogoglio.tmp.tomcat5x}</home>
- <properties>
- <cargo.servlet.port>
- 8080
- </cargo.servlet.port>
- </properties>
- </configuration>
- </configuration>
- </plugin>
- </plugins>
- </build>
- </profile>
- <profile>
- <id>all</id>
- <modules>
- <module>../ogoglio-appdev</module>
- <module>../ogoglio-body-editor-applet</module>
- <module>../ogoglio-common</module>
- <module>../ogoglio-test-applet</module>
- <module>../ogoglio-viewer-applet</module>
- <module>../ogoglio-server</module>
- <module>../ogoglio-integration-test</module>
- <module>../dev-plugins</module>
- </modules>
- </profile>
- <profile>
- <id>client-side</id>
- <modules>
- <module>../ogoglio-appdev</module>
- <module>../ogoglio-body-editor-applet</module>
- <module>../ogoglio-common</module>
- <module>../ogoglio-test-applet</module>
- <module>../ogoglio-viewer-applet</module>
- <module>../dev-plugins</module>
- </modules>
- </profile>
- <profile>
- <id>server-side</id>
- <modules>
- <module>../ogoglio-server</module>
- </modules>
- </profile>
- <profile>
- <id>integration-test</id>
- <modules>
- <module>../ogoglio-integration-test</module>
- </modules>
- </profile>
- </profiles>
+ <modules>
+ <module>../ogoglio-appdev</module>
+ <module>../ogoglio-body-editor-applet</module>
+ <module>../ogoglio-common</module>
+ <module>../ogoglio-test-applet</module>
+ <module>../ogoglio-viewer-applet</module>
+ <module>../ogoglio-server</module>
+ <module>../ogoglio-integration-test</module>
+ <module>../dev-plugins</module>
+ </modules>
- <distributionManagement>
- <snapshotRepository>
- <id>local-disk</id>
- <uniqueVersion>false</uniqueVersion>
- <name>local disk</name>
- <url>${my.local.repo}</url>
- </snapshotRepository>
- </distributionManagement>
<ciManagement>
<system>continuum</system>
@@ -133,9 +33,15 @@
</ciManagement>
<scm>
- <connection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</connection>
- <developerConnection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</developerConnection>
- <url>http://ogoglio.svn.sourceforge.net/viewvc/ogoglio/maven/trunk</url>
+ <connection>
+ scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk
+ </connection>
+ <developerConnection>
+ scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk
+ </developerConnection>
+ <url>
+ http://ogoglio.svn.sourceforge.net/viewvc/ogoglio/maven/trunk
+ </url>
</scm>
<build>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-03 17:11:41
|
Revision: 348
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=348&view=rev
Author: iansmith
Date: 2007-09-03 10:11:43 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
Futzing with continuum.
Added Paths:
-----------
maven/trunk/ogoglio/continuumcs.xml
Copied: maven/trunk/ogoglio/continuumcs.xml (from rev 347, maven/trunk/ogoglio/pom-client-side.xml)
===================================================================
--- maven/trunk/ogoglio/continuumcs.xml (rev 0)
+++ maven/trunk/ogoglio/continuumcs.xml 2007-09-03 17:11:43 UTC (rev 348)
@@ -0,0 +1,28 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>com.ogoglio</groupId>
+ <artifactId>ogoglio-client-side</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>../ogoglio-appdev</module>
+ <module>../ogoglio-body-editor-applet</module>
+ <module>../ogoglio-common</module>
+ <module>../ogoglio-test-applet</module>
+ <module>../ogoglio-viewer-applet</module>
+ <module>../dev-plugins</module>
+ </modules>
+
+ <scm>
+ <connection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</connection>
+ <developerConnection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</developerConnection>
+ <url>http://ogoglio.svn.sourceforge.net/viewvc/ogoglio/maven/trunk</url>
+ </scm>
+
+</project>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-03 17:06:11
|
Revision: 347
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=347&view=rev
Author: iansmith
Date: 2007-09-03 10:06:14 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
Futzing with automatic builds.
Modified Paths:
--------------
maven/trunk/ogoglio/pom-client-side.xml
Modified: maven/trunk/ogoglio/pom-client-side.xml
===================================================================
--- maven/trunk/ogoglio/pom-client-side.xml 2007-09-03 17:05:17 UTC (rev 346)
+++ maven/trunk/ogoglio/pom-client-side.xml 2007-09-03 17:06:14 UTC (rev 347)
@@ -18,4 +18,11 @@
<module>../ogoglio-viewer-applet</module>
<module>../dev-plugins</module>
</modules>
+
+ <scm>
+ <connection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</connection>
+ <developerConnection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</developerConnection>
+ <url>http://ogoglio.svn.sourceforge.net/viewvc/ogoglio/maven/trunk</url>
+ </scm>
+
</project>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-03 17:05:15
|
Revision: 346
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=346&view=rev
Author: iansmith
Date: 2007-09-03 10:05:17 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
Futzing with automatic builds.
Added Paths:
-----------
maven/trunk/ogoglio/pom-client-side.xml
Added: maven/trunk/ogoglio/pom-client-side.xml
===================================================================
--- maven/trunk/ogoglio/pom-client-side.xml (rev 0)
+++ maven/trunk/ogoglio/pom-client-side.xml 2007-09-03 17:05:17 UTC (rev 346)
@@ -0,0 +1,21 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<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>com.ogoglio</groupId>
+ <artifactId>ogoglio-client-side</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <packaging>pom</packaging>
+
+ <modules>
+ <module>../ogoglio-appdev</module>
+ <module>../ogoglio-body-editor-applet</module>
+ <module>../ogoglio-common</module>
+ <module>../ogoglio-test-applet</module>
+ <module>../ogoglio-viewer-applet</module>
+ <module>../dev-plugins</module>
+ </modules>
+</project>
\ No newline at end of file
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-09-03 16:58:16
|
Revision: 345
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=345&view=rev
Author: trevorolio
Date: 2007-09-03 09:58:15 -0700 (Mon, 03 Sep 2007)
Log Message:
-----------
Tweak for new script lifecycle functions.
Added google map to globe template.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/resources/populate/template-14/Globe.js
maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js
Modified: maven/trunk/ogoglio-server/src/main/resources/populate/template-14/Globe.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/template-14/Globe.js 2007-09-03 03:26:23 UTC (rev 344)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/template-14/Globe.js 2007-09-03 16:58:15 UTC (rev 345)
@@ -9,15 +9,32 @@
}
function onClick(username, shapeName){
- toggleSpinning();
}
+function onContextClick(username, shapeName){
+ return new Array(new ContextMenuItemInfo("Google Map", true, "gmap"));
+}
+
+function onContextMenuItemChosen(username, nonce){
+ if(nonce == "gmap"){
+ space.showInfoPanel(thingID, username, nonce);
+ }
+}
+
+var htmlPrefix = '<html><body>';
+var htmlSuffix = '</body></html>';
+var googleMapHTML = '<iframe width="250" height="250" frameborder="no" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps?f=q&hl=en&geocode=&q=400+pennsylvania+ave,+washington+dc&sll=47.5669,-122.368681&sspn=0.009483,0.016458&ie=UTF8&om=1&s=AARTsJqSBDjaBccWHYlD36UE4aHiKV35QA&ll=38.900051,-77.013302&spn=0.016699,0.021458&z=14&output=embed"></iframe><br/><a href="http://maps.google.com/maps?f=q&hl=en&geocode=&q=400+pennsylvania+ave,+washington+dc&sll=47.5669,-122.368681&sspn=0.009483,0.016458&ie=UTF8&om=1&ll=38.900051,-77.013302&spn=0.016699,0.021458&z=14&source=embed" style="color:#0000FF;text-align:left;font-size:small">View Larger Map</a>';
+
+function onService(method, parameterNames, parameterValues){
+ return new HTTPResponse(200, htmlPrefix + googleMapHTML + htmlSuffix, "text/html");
+}
+
function toggleSpinning(){
if(spinning){
space.stopShapeMotion(thingID, "Globe", new Point(0, 0, 0), new Quaternion(1, 0, 0, 0));
spinning = false;
} else {
- var path = new SplinePath(25000, true, false);
+ var path = new SplinePath(240000, true, false);
path.addKeyFrame(new SplineKeyFrame(0, 0, 0, 0, 0));
path.addKeyFrame(new SplineKeyFrame(0, 0, 0, 2 * math.PI, 1));
space.startShapeMotion(thingID, "Globe", path);
Modified: maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js
===================================================================
--- maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js 2007-09-03 03:26:23 UTC (rev 344)
+++ maven/trunk/ogoglio-server/src/main/resources/populate/template-28/WhiteBoard.js 2007-09-03 16:58:15 UTC (rev 345)
@@ -13,6 +13,10 @@
pageID = space.createTextPage(thingID, 4, 2, htmlPrefix + formatBoardText(getTextSetting()) + htmlSuffix, 0, 2, 0.1, 0, math.PI, 0);
}
+function cleanup(){
+ space.removeSetting(textSettingKey);
+}
+
function formatBoardText(text){
var result = '';
for(var i=0; i < text.length; i++){
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-03 03:26:20
|
Revision: 344
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=344&view=rev
Author: iansmith
Date: 2007-09-02 20:26:23 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
Minor POM hackery to support automagic svn.
Modified Paths:
--------------
maven/trunk/ogoglio/pom.xml
maven/trunk/ogoglio-server/pom.xml
Modified: maven/trunk/ogoglio/pom.xml
===================================================================
--- maven/trunk/ogoglio/pom.xml 2007-09-03 00:22:17 UTC (rev 343)
+++ maven/trunk/ogoglio/pom.xml 2007-09-03 03:26:23 UTC (rev 344)
@@ -10,15 +10,47 @@
<profiles>
<profile>
+ <id>kill-server</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>0.3-SNAPSHOT</version>
+ <!-- CARGO INTERACTIONS WITH TOMCAT FOR KILLING SERVER ONLY -->
+ <configuration>
+ <!-- tomcat 5.5 running on the same machine...-->
+ <container>
+ <containerId>tomcat5x</containerId>
+ <home>${cargo.tomcat5x.home}</home>
+ </container>
+ <!-- tomcat configuration -->
+ <configuration>
+ <type>existing</type>
+ <home>${ogoglio.tmp.tomcat5x}</home>
+ <properties>
+ <cargo.servlet.port>
+ 8080
+ </cargo.servlet.port>
+ </properties>
+ </configuration>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
<id>boot-server</id>
<build>
<plugins>
+ <!-- CARGO INTERACTIONS WITH TOMCAT FOR BOOTING SERVER ONLY -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>0.3-SNAPSHOT</version>
<!-- CARGO INTERACTIONS WITH TOMCAT FOR BOOTING SERVER ONLY -->
<configuration>
+ <wait>${boot-server.wait}</wait>
<!-- tomcat 5.5 running on the same machine...-->
<container>
<containerId>tomcat5x</containerId>
@@ -88,7 +120,24 @@
</snapshotRepository>
</distributionManagement>
+ <ciManagement>
+ <system>continuum</system>
+ <notifiers>
+ <notifier>
+ <type>mail</type>
+ <configuration>
+ <address>co...@tr...</address>
+ </configuration>
+ </notifier>
+ </notifiers>
+ </ciManagement>
+ <scm>
+ <connection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</connection>
+ <developerConnection>scm:svn:https://ogoglio.svn.sourceforge.net/svnroot/ogoglio/maven/trunk</developerConnection>
+ <url>http://ogoglio.svn.sourceforge.net/viewvc/ogoglio/maven/trunk</url>
+ </scm>
+
<build>
<pluginManagement>
<plugins>
Modified: maven/trunk/ogoglio-server/pom.xml
===================================================================
--- maven/trunk/ogoglio-server/pom.xml 2007-09-03 00:22:17 UTC (rev 343)
+++ maven/trunk/ogoglio-server/pom.xml 2007-09-03 03:26:23 UTC (rev 344)
@@ -109,7 +109,7 @@
<executions>
<execution>
<id>copy-applets</id>
- <phase>compile</phase>
+ <phase>package</phase>
<goals>
<goal>copy</goal>
</goals>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-09-03 00:22:15
|
Revision: 343
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=343&view=rev
Author: trevorolio
Date: 2007-09-02 17:22:17 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
Fixed a bug in ObjParser which barfed if the mtl file is references but missing.
Fixed a bug in the integration tests around space membership which assumed that there were no existing memberships and confused the space owner web client with the member web client.
Added destruct and cleanup functions to template scripts, so that templates may tidy up during space shutdown or thing removal, respectively.
Modified Paths:
--------------
maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/obj/ObjParser.java
Modified: maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/obj/ObjParser.java
===================================================================
--- maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/obj/ObjParser.java 2007-09-03 00:22:14 UTC (rev 342)
+++ maven/trunk/ogoglio-common/src/main/java/com/ogoglio/viewer/j3d/obj/ObjParser.java 2007-09-03 00:22:17 UTC (rev 343)
@@ -49,7 +49,7 @@
this.geoProvider = geoProvider;
objStream = geoProvider.getGeometryStream(lodIndex);
- if(objStream == null) {
+ if (objStream == null) {
throw new IOException("No geometry from " + geoProvider);
}
objTokenizer = new LineTokenizer(objStream);
@@ -62,6 +62,7 @@
public Obj parse() throws ObjParseException, IOException {
String[] tokens = null;
while ((tokens = objTokenizer.readNextLine()) != null) {
+ toString(tokens);
if ("v".equals(tokens[0])) {
parseV(tokens);
} else if ("vt".equals(tokens[0])) {
@@ -102,9 +103,11 @@
}
String fileName = toString(tokens, 1, tokens.length - 1);
InputStream materialStream = geoProvider.getSubGeometryStream(fileName);
- MtlParser parser = new MtlParser(fileName, materialStream, geoProvider);
- ObjMtl mtl = parser.parse();
- obj.setMtl(mtl);
+ if (materialStream != null) {
+ MtlParser parser = new MtlParser(fileName, materialStream, geoProvider);
+ ObjMtl mtl = parser.parse();
+ obj.setMtl(mtl);
+ }
}
private void closeWorkingSmoothingGroup() {
@@ -177,7 +180,7 @@
private void parseG(String[] tokens) throws ObjParseException {
String groupName = "defaultGroup";
- if(tokens.length > 1) {
+ if (tokens.length > 1) {
groupName = tokens[1];
if (tokens.length >= 3) { //handle weird moving texture name in group line
if (tokens[1].indexOf("Texture") != -1) {
@@ -226,7 +229,7 @@
continue;
}
results[i] = Integer.parseInt(inputs[i]);
- if(results[i] < 0) {
+ if (results[i] < 0) {
results[i] = obj.vertexCount() + results[i] + 1; //handle relative negative indices (which I originally thought was non-spec)
}
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-09-03 00:22:11
|
Revision: 342
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=342&view=rev
Author: trevorolio
Date: 2007-09-02 17:22:14 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
Fixed a bug in ObjParser which barfed if the mtl file is references but missing.
Fixed a bug in the integration tests around space membership which assumed that there were no existing memberships and confused the space owner web client with the member web client.
Added destruct and cleanup functions to template scripts, so that templates may tidy up during space shutdown or thing removal, respectively.
Modified Paths:
--------------
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-09-03 00:22:09 UTC (rev 341)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-09-03 00:22:14 UTC (rev 342)
@@ -245,18 +245,18 @@
WebAPIAuthenticator basicAuthenticator = new WebAPIAuthenticatorFactory().authenticate(wire1, descriptor1, USERNAME1, PASSWORD1);
assertNotNull("got null auth cookie", basicAuthenticator.getAuthCookie());
WebAPIClient basicWebClient = new WebAPIClient(descriptor1, basicAuthenticator, wire1);
-
+
TemplateDocument newTemplateDoc = basicWebClient.createTemplate("Viewed Test Template");
assertNotNull(newTemplateDoc);
basicWebClient.uploadTemplateGeometryStream(newTemplateDoc.getOwnerUsername(), newTemplateDoc.getTemplateID(), 0, UIConstants.getResource("sample-art3d/TestCube.obj"));
basicWebClient.uploadTemplateResourceStream(newTemplateDoc.getOwnerUsername(), newTemplateDoc.getTemplateID(), "TestCube.mtl", UIConstants.getResource("sample-art3d/TestCube.mtl"));
basicWebClient.uploadTemplateResourceStream(newTemplateDoc.getOwnerUsername(), newTemplateDoc.getTemplateID(), "TestCube.gif", UIConstants.getResource("sample-art3d/TestCube.gif"));
basicWebClient.updateTemplateScript(newTemplateDoc.getOwnerUsername(), newTemplateDoc.getTemplateID(), StreamUtils.readInput(UIConstants.getResource("sample-art3d/TestCube.js")));
-
+
TemplateDocument[] templateDocs = basicWebClient.getTemplateDocuments(basicAuthenticator.getUsername());
assertNotNull(templateDocs);
assertTrue(templateDocs.length > 0);
-
+
SpaceDocument spaceDocument = basicWebClient.createSpace("Applet Test Space");
assertNotNull(spaceDocument);
PossessionDocument possDoc = basicWebClient.createPossession(newTemplateDoc.getTemplateID());
@@ -267,23 +267,23 @@
ThingDocument thingDoc = basicWebClient.getThingDocument(spaceDocument.getSpaceID(), possDoc.getThingID());
thingDoc.setZ(-10);
basicWebClient.updateThing(spaceDocument.getSpaceID(), thingDoc);
-
+
AppletTestWindow testWindow = openAppletTestWindow(spaceDocument, basicAuthenticator);
testWindow.applet.sendChatMessage("Hey, this is a chat message");
assertEquals(basicAuthenticator.getAuthDocument(true).getUsername(), testWindow.applet.getUsername());
testWindow.cleanup();
-
+
basicWebClient.deleteSpace(spaceDocument.getSpaceID());
}
- private AppletTestWindow openAppletTestWindow(SpaceDocument spaceDocument, WebAPIAuthenticator authenticator){
+ private AppletTestWindow openAppletTestWindow(SpaceDocument spaceDocument, WebAPIAuthenticator authenticator) {
AppletTestWindow testWindow = new AppletTestWindow(descriptor1.getServiceURI(), spaceDocument.getSpaceID(), authenticator.getAuthCookie(), new Dimension(500, 500), true);
testWindow.setVisible(true);
testWindow.start();
long startTime = System.currentTimeMillis();
- while(!testWindow.applet.completedInitialLoad() && System.currentTimeMillis() < startTime + 10000){
+ while (!testWindow.applet.completedInitialLoad() && System.currentTimeMillis() < startTime + 10000) {
try {
Thread.sleep(500);
} catch (InterruptedException e) {
@@ -292,7 +292,7 @@
assertTrue(testWindow.applet.completedInitialLoad());
return testWindow;
}
-
+
private void checkThingScripting(WebAPIClient webClient, ThingDocument thingDocument, SpaceDocument spaceDocument) throws IOException {
//make sure script will return a value
String script = webClient.getTemplateScript(webClient.getAuthenticator().getUsername(), thingDocument.getTemplateID());
@@ -349,29 +349,30 @@
private void checkSpaceAuthWithMembership(WebAPIAuthenticator memberAuth, WebAPIClient memberClient, WebAPIClient ownerClient, SpaceDocument spaceDocument) throws IOException {
SpaceMemberDocument[] membershipDocs;
membershipDocs = memberClient.getUsersSpaceMemberships();
- assertEquals(1, membershipDocs.length);
- assertEquals(spaceDocument.getSpaceID(), membershipDocs[0].getSpaceID());
- assertEquals(memberAuth.getUsername(), membershipDocs[0].getMemberUsername());
+ int numMemberships = membershipDocs.length;
+ ownerClient.addSpaceMember(spaceDocument.getSpaceID(), memberAuth.getUsername(), SpaceMemberDocument.MEMBER);
+ membershipDocs = memberClient.getUsersSpaceMemberships();
+ assertEquals(numMemberships + 1, membershipDocs.length);
+ assertEquals(spaceDocument.getSpaceID(), membershipDocs[membershipDocs.length - 1].getSpaceID());
+ assertEquals(memberAuth.getUsername(), membershipDocs[membershipDocs.length - 1].getMemberUsername());
SpaceMemberDocument[] spaceMemberDocs = ownerClient.getSpaceMemberDocuments(spaceDocument.getSpaceID());
assertFalse("member doc length = " + spaceMemberDocs.length, spaceMemberDocs.length == 0);
assertEquals(spaceMemberDocs[0].getMemberUsername(), memberAuth.getUsername());
ownerClient.removeSpaceMember(spaceDocument.getSpaceID(), memberAuth.getUsername());
membershipDocs = memberClient.getUsersSpaceMemberships();
- assertEquals(0, membershipDocs.length);
+ assertEquals(numMemberships, membershipDocs.length);
}
private void checkSpaceMembership(long spaceID, WebAPIClient webClient1) throws IOException {
- SpaceMemberDocument[] membershipDocs = webClient1.getUsersSpaceMemberships();
- assertNotNull(membershipDocs);
- assertEquals(0, membershipDocs.length);
-
webClient1.addSpaceMember(spaceID, USERNAME2, SpaceMemberDocument.MEMBER);
- membershipDocs = webClient1.getSpaceMemberDocuments(spaceID);
- assertNotNull(membershipDocs);
+ SpaceMemberDocument[] membershipDocs = webClient1.getSpaceMemberDocuments(spaceID);
assertEquals(1, membershipDocs.length);
assertEquals(USERNAME2, membershipDocs[0].getMemberUsername());
assertEquals(SpaceMemberDocument.MEMBER, membershipDocs[0].getRole());
+ webClient1.removeSpaceMember(spaceID, USERNAME2);
+ membershipDocs = webClient1.getSpaceMemberDocuments(spaceID);
+ assertEquals(0, membershipDocs.length);
}
private void checkSettings(long spaceID, WebAPIClient webClient1) throws IOException {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-09-03 00:22:06
|
Revision: 341
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=341&view=rev
Author: trevorolio
Date: 2007-09-02 17:22:09 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
Fixed a bug in ObjParser which barfed if the mtl file is references but missing.
Fixed a bug in the integration tests around space membership which assumed that there were no existing memberships and confused the space owner web client with the member web client.
Added destruct and cleanup functions to template scripts, so that templates may tidy up during space shutdown or thing removal, respectively.
Modified Paths:
--------------
maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/SpaceScriptEngine.java
Modified: maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/SpaceScriptEngine.java
===================================================================
--- maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/SpaceScriptEngine.java 2007-09-02 23:21:36 UTC (rev 340)
+++ maven/trunk/ogoglio-server/src/main/java/com/ogoglio/sim/script/SpaceScriptEngine.java 2007-09-03 00:22:09 UTC (rev 341)
@@ -50,8 +50,12 @@
private ScriptSpace scriptSpace = null;
- public static final String CONSTRUCT_FUNCTION_NAME = "construct";
+ public static final String CONSTRUCT_FUNCTION_NAME = "construct"; //called when a things is added to a space or when a space starts
+ public static final String DESTRUCT_FUNCTION_NAME = "destruct"; //called on each thing the space stops
+
+ public static final String CLEANUP_FUNCTION_NAME = "cleanup"; //called on each thing when removed from a space
+
public static final String ONSERVICE_FUNCTION_NAME = "onService";
private static final String ONCLICK_FUNCTION_NAME = "onClick";
@@ -104,7 +108,11 @@
spaceSimulator.getSpace().addListener(this, false);
}
- public void cleanup() {
+ public void cleanup() { //this happens when a space is stopped, not necessarily when it's deleted
+ Object[] scopes = thingScopes.getValues();
+ for (int i = 0; i < scopes.length; i++) {
+ callAndIgnoreFunction(DESTRUCT_FUNCTION_NAME, (ScriptableObject) scopes[i]); //yes, we call destruct in cleanup()... it's weird but right
+ }
scriptSpace.cleanup();
}
@@ -313,9 +321,9 @@
Object value = parameterMap.get(parameterNames[i]);
if (value instanceof String) {
parameterValues[i] = (String) parameterMap.get(parameterNames[i]);
- } else if(value instanceof String[]){
- String[] array = (String[])value;
- if(array.length > 0){
+ } else if (value instanceof String[]) {
+ String[] array = (String[]) value;
+ if (array.length > 0) {
parameterValues[i] = array[0];
}
} else {
@@ -364,8 +372,22 @@
public void thingAdded(Thing thing) {
}
+ private void callAndIgnoreFunction(String functionName, ScriptableObject thingScope){
+ Context context = Context.enter();
+ try {
+ callJavascriptFunction(context, thingScope, functionName, new Object[0]);
+ } catch (Exception e) {
+ //We don't care if a script dies in cleanup, and there's no log once a space
+ } finally {
+ Context.exit();
+ }
+ }
+
public void thingReloaded(Thing thing) {
- thingScopes.removeForward(new Long(thing.getThingID()));
+ ScriptableObject thingScope = (ScriptableObject) thingScopes.removeForward(new Long(thing.getThingID()));
+ if (thingScope != null) {
+ callAndIgnoreFunction(DESTRUCT_FUNCTION_NAME, thingScope);
+ }
scriptSpace.cancelThingTasks(thing.getThingID());
try {
constructThingScript(thing);
@@ -381,7 +403,10 @@
}
public void thingRemoved(Thing thing) {
- thingScopes.removeForward(new Long(thing.getThingID()));
+ ScriptableObject thingScope = (ScriptableObject) thingScopes.removeForward(new Long(thing.getThingID()));
+ if (thingScope != null) {
+ callAndIgnoreFunction(CLEANUP_FUNCTION_NAME, thingScope);
+ }
scriptSpace.cancelThingTasks(thing.getThingID());
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-02 23:21:38
|
Revision: 340
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=340&view=rev
Author: iansmith
Date: 2007-09-02 16:21:36 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
POM munging. Small changes to make things more symmetric.
Modified Paths:
--------------
maven/trunk/ogoglio/pom.xml
maven/trunk/ogoglio-server/pom.xml
Modified: maven/trunk/ogoglio/pom.xml
===================================================================
--- maven/trunk/ogoglio/pom.xml 2007-09-02 20:29:33 UTC (rev 339)
+++ maven/trunk/ogoglio/pom.xml 2007-09-02 23:21:36 UTC (rev 340)
@@ -67,45 +67,6 @@
</profile>
<profile>
<id>server-side</id>
- <build>
- <plugins>
- <plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>0.3-SNAPSHOT</version>
- <executions>
- <execution>
- <id>server-side</id>
- <inherited>true</inherited>
- <phase>install</phase>
- <goals>
- <goal>deploy</goal>
- </goals>
- <configuration>
- <container>
- <containerId>
- tomcat5x
- </containerId>
- </container>
- <!-- Configuration to use with the container -->
- <configuration>
- <type>existing</type>
- <home>
- ${ogoglio.tmp.tomcat5x}
- </home>
- </configuration>
- </configuration>
- </execution>
- </executions>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip>
- </configuration>
- </plugin>
- </plugins>
- </build>
<modules>
<module>../ogoglio-server</module>
</modules>
@@ -127,16 +88,19 @@
</snapshotRepository>
</distributionManagement>
+
<build>
- <plugins>
- <!-- solves the problem with java3d not being able to link due to isolated classloader -->
- <plugin>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <childDelegation>true</childDelegation>
- </configuration>
- </plugin>
- </plugins>
+ <pluginManagement>
+ <plugins>
+ <!-- solves the problem with java3d not being able to link due to isolated classloader -->
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <childDelegation>true</childDelegation>
+ </configuration>
+ </plugin>
+ </plugins>
+ </pluginManagement>
</build>
</project>
Modified: maven/trunk/ogoglio-server/pom.xml
===================================================================
--- maven/trunk/ogoglio-server/pom.xml 2007-09-02 20:29:33 UTC (rev 339)
+++ maven/trunk/ogoglio-server/pom.xml 2007-09-02 23:21:36 UTC (rev 340)
@@ -83,10 +83,17 @@
<include>test-config.properties</include>
<include>basic-config.properties</include>
<include>bootstrap.properties</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <filtering>false</filtering>
+ <directory>src/test/resources</directory>
+ <includes>
<include>mail/*</include>
<include>templates/*</include>
</includes>
</testResource>
+
</testResources>
@@ -181,22 +188,47 @@
</configuration>
</execution>
</executions>
-
</plugin>
- <!-- CARGO CONFIG -->
+ <!-- CARGO CONFIG:INSTALL TO RUNNING SERVER -->
<plugin>
<groupId>org.codehaus.cargo</groupId>
<artifactId>cargo-maven2-plugin</artifactId>
<version>0.3-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>server-side</id>
+ <inherited>true</inherited>
+ <phase>install</phase>
+ <goals>
+ <goal>deploy</goal>
+ </goals>
+ <configuration>
+ <container>
+ <containerId>tomcat5x</containerId>
+ </container>
+ <!-- Configuration to use with the container -->
+ <configuration>
+ <type>existing</type>
+ <home>${ogoglio.tmp.tomcat5x}</home>
+ </configuration>
+ <deployables>
+ <deployable>
+ <properties>
+ <context>
+ ${pom.artifactId}
+ </context>
+ </properties>
+ </deployable>
+ </deployables>
+
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <!-- Deployer configuration -->
- <deployables>
- <deployable>
- <properties>
- <context>${pom.artifactId}</context>
- </properties>
- </deployable>
- </deployables>
+ <skip>true</skip>
</configuration>
</plugin>
</plugins>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <ian...@us...> - 2007-09-02 20:29:37
|
Revision: 339
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=339&view=rev
Author: iansmith
Date: 2007-09-02 13:29:33 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
Converted ogoglio to use a master pom arrangement.
Modified Paths:
--------------
maven/trunk/dev-plugins/pom.xml
maven/trunk/dev-plugins/src/main/java/com/transmutable/plugin/StaticVelocitySitePlugin.java
maven/trunk/ogoglio/pom.xml
maven/trunk/ogoglio-appdev/pom.xml
maven/trunk/ogoglio-body-editor-applet/pom.xml
maven/trunk/ogoglio-common/.classpath
maven/trunk/ogoglio-common/pom.xml
maven/trunk/ogoglio-integration-test/pom.xml
maven/trunk/ogoglio-server/pom.xml
maven/trunk/ogoglio-test-applet/pom.xml
maven/trunk/ogoglio-viewer-applet/pom.xml
Property Changed:
----------------
maven/trunk/ogoglio/
Modified: maven/trunk/dev-plugins/pom.xml
===================================================================
--- maven/trunk/dev-plugins/pom.xml 2007-09-02 20:04:48 UTC (rev 338)
+++ maven/trunk/dev-plugins/pom.xml 2007-09-02 20:29:33 UTC (rev 339)
@@ -1,36 +1,44 @@
-<?xml version="1.0" encoding="UTF-8"?>
-<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>com.ogoglio</groupId>
- <artifactId>dev-plugins</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>maven-plugin</packaging>
-
- <build>
- <plugins>
- <plugin>
- <groupId>org.apache.maven.plugins</groupId>
- <artifactId>maven-surefire-plugin</artifactId>
- <configuration>
- <skip>true</skip><!-- this is critical to avoid running unit tests -->
- </configuration>
- </plugin>
- </plugins>
- </build>
-
- <dependencies>
- <dependency>
- <groupId>org.apache.maven</groupId>
- <artifactId>maven-plugin-api</artifactId>
- <version>2.0</version>
- </dependency>
+<?xml version="1.0" encoding="UTF-8"?>
+<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>
- <dependency>
- <groupId>org.apache.velocity</groupId>
- <artifactId>velocity</artifactId>
- <version>1.5</version>
- </dependency>
- </dependencies>
-
-</project>
-
+ <!-- About this project -->
+ <parent>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>ogoglio</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../ogoglio</relativePath>
+ </parent>
+ <artifactId>dev-plugins</artifactId>
+ <packaging>maven-plugin</packaging>
+
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.apache.maven.plugins</groupId>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip><!-- this is critical to avoid running unit tests -->
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.maven</groupId>
+ <artifactId>maven-plugin-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+
+ <dependency>
+ <groupId>org.apache.velocity</groupId>
+ <artifactId>velocity</artifactId>
+ <version>1.5</version>
+ </dependency>
+ </dependencies>
+
+</project>
+
Modified: maven/trunk/dev-plugins/src/main/java/com/transmutable/plugin/StaticVelocitySitePlugin.java
===================================================================
--- maven/trunk/dev-plugins/src/main/java/com/transmutable/plugin/StaticVelocitySitePlugin.java 2007-09-02 20:04:48 UTC (rev 338)
+++ maven/trunk/dev-plugins/src/main/java/com/transmutable/plugin/StaticVelocitySitePlugin.java 2007-09-02 20:29:33 UTC (rev 339)
@@ -30,7 +30,14 @@
private File targetDirectory;
public void execute() throws MojoExecutionException {
-
+ if (templateDirectory==null) {
+ getLog().warn("No velocity templates configured!");
+ return;
+ } else if ((!templateDirectory.exists()) || (!templateDirectory.canRead())) {
+ getLog().warn("Can't find any velocity templates to compile!");
+ return;
+ }
+
if (targetDirectory.exists()==false) {
if (targetDirectory.mkdir()==false) {
getLog().error("Unable to create target directory:"+targetDirectory.getName());
Property changes on: maven/trunk/ogoglio
___________________________________________________________________
Name: svn:ignore
- target
+ target
tomcat5x.out
Modified: maven/trunk/ogoglio/pom.xml
===================================================================
--- maven/trunk/ogoglio/pom.xml 2007-09-02 20:04:48 UTC (rev 338)
+++ maven/trunk/ogoglio/pom.xml 2007-09-02 20:29:33 UTC (rev 339)
@@ -8,46 +8,135 @@
<version>0.0.1-SNAPSHOT</version>
<packaging>pom</packaging>
+ <profiles>
+ <profile>
+ <id>boot-server</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>0.3-SNAPSHOT</version>
+ <!-- CARGO INTERACTIONS WITH TOMCAT FOR BOOTING SERVER ONLY -->
+ <configuration>
+ <!-- tomcat 5.5 running on the same machine...-->
+ <container>
+ <containerId>tomcat5x</containerId>
+ <home>${cargo.tomcat5x.home}</home>
+ <log>${basedir}/tomcat5x.log</log>
+ <output>${basedir}/tomcat5x.out</output>
+ </container>
+ <!-- tomcat configuration -->
+ <configuration>
+ <type>standalone</type>
+ <home>${ogoglio.tmp.tomcat5x}</home>
+ <properties>
+ <cargo.servlet.port>
+ 8080
+ </cargo.servlet.port>
+ </properties>
+ </configuration>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ </profile>
+ <profile>
+ <id>all</id>
+ <modules>
+ <module>../ogoglio-appdev</module>
+ <module>../ogoglio-body-editor-applet</module>
+ <module>../ogoglio-common</module>
+ <module>../ogoglio-test-applet</module>
+ <module>../ogoglio-viewer-applet</module>
+ <module>../ogoglio-server</module>
+ <module>../ogoglio-integration-test</module>
+ <module>../dev-plugins</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>client-side</id>
+ <modules>
+ <module>../ogoglio-appdev</module>
+ <module>../ogoglio-body-editor-applet</module>
+ <module>../ogoglio-common</module>
+ <module>../ogoglio-test-applet</module>
+ <module>../ogoglio-viewer-applet</module>
+ <module>../dev-plugins</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>server-side</id>
+ <build>
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>0.3-SNAPSHOT</version>
+ <executions>
+ <execution>
+ <id>server-side</id>
+ <inherited>true</inherited>
+ <phase>install</phase>
+ <goals>
+ <goal>deploy</goal>
+ </goals>
+ <configuration>
+ <container>
+ <containerId>
+ tomcat5x
+ </containerId>
+ </container>
+ <!-- Configuration to use with the container -->
+ <configuration>
+ <type>existing</type>
+ <home>
+ ${ogoglio.tmp.tomcat5x}
+ </home>
+ </configuration>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-plugin</artifactId>
+ <configuration>
+ <skip>true</skip>
+ </configuration>
+ </plugin>
+ </plugins>
+ </build>
+ <modules>
+ <module>../ogoglio-server</module>
+ </modules>
+ </profile>
+ <profile>
+ <id>integration-test</id>
+ <modules>
+ <module>../ogoglio-integration-test</module>
+ </modules>
+ </profile>
+ </profiles>
+
+ <distributionManagement>
+ <snapshotRepository>
+ <id>local-disk</id>
+ <uniqueVersion>false</uniqueVersion>
+ <name>local disk</name>
+ <url>${my.local.repo}</url>
+ </snapshotRepository>
+ </distributionManagement>
+
<build>
<plugins>
- <!-- CARGO INTERACTIONS WITH TOMCAT -->
+ <!-- solves the problem with java3d not being able to link due to isolated classloader -->
<plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>0.3-SNAPSHOT</version>
- <!-- CARGO CONFIG -->
+ <artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <!-- tomcat 5.5 running on the same machine...-->
- <container>
- <containerId>tomcat5x</containerId>
- <home>${cargo.tomcat5x.home}</home>
- <log>${project.build.directory}/tomcat5x.log</log>
- <output>${project.build.directory}/tomcat5x.out</output>
- </container>
-
- <!-- tomcat configuration -->
- <configuration>
- <type>standalone</type>
- <home>${ogoglio.tmp.tomcat5x}</home>
- <properties>
- <cargo.servlet.port>
- 8080
- </cargo.servlet.port>
- </properties>
- </configuration>
+ <childDelegation>true</childDelegation>
</configuration>
</plugin>
</plugins>
</build>
- <modules>
- <module>../ogoglio-appdev</module>
- <module>../ogoglio-body-editor-applet</module>
- <module>../ogoglio-common</module>
- <module>../ogoglio-integration-test</module>
- <module>../ogoglio-server</module>
- <module>../ogoglio-test-applet</module>
- <module>../ogoglio-viewer-applet</module>
- </modules>
-
</project>
Modified: maven/trunk/ogoglio-appdev/pom.xml
===================================================================
--- maven/trunk/ogoglio-appdev/pom.xml 2007-09-02 20:04:48 UTC (rev 338)
+++ maven/trunk/ogoglio-appdev/pom.xml 2007-09-02 20:29:33 UTC (rev 339)
@@ -2,12 +2,16 @@
<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>com.ogoglio</groupId>
- <modelVersion>4.0.0</modelVersion>
+ <!-- About this project -->
+ <parent>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>ogoglio</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../ogoglio</relativePath>
+ </parent>
<artifactId>ogoglio-appdev</artifactId>
- <packaging>jar</packaging>
- <version>0.0.1</version>
<dependencies>
<dependency>
Modified: maven/trunk/ogoglio-body-editor-applet/pom.xml
===================================================================
--- maven/trunk/ogoglio-body-editor-applet/pom.xml 2007-09-02 20:04:48 UTC (rev 338)
+++ maven/trunk/ogoglio-body-editor-applet/pom.xml 2007-09-02 20:29:33 UTC (rev 339)
@@ -2,58 +2,17 @@
<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>com.ogoglio</groupId>
+
+ <!-- About this project -->
+ <parent>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>ogoglio</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../ogoglio</relativePath>
+ </parent>
<artifactId>ogoglio-body-editor-applet</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>jar</packaging>
- <build>
- <plugins>
- </plugins>
- </build>
- <profiles>
- <!-- LINUX -->
- <profile>
- <id>linux</id>
- <dependencies>
- <!-- jav3d stuff -->
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>j3d-core</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>vecmath</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- <!-- OSX -->
- <profile>
- <id>osx</id>
- <dependencies>
- <!-- jav3d stuff -->
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>j3d-core</artifactId>
- <version>1.3</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>vecmath</artifactId>
- <version>1.3</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
<dependencies>
<!-- ogoglio -->
<dependency>
Modified: maven/trunk/ogoglio-common/.classpath
===================================================================
--- maven/trunk/ogoglio-common/.classpath 2007-09-02 20:04:48 UTC (rev 338)
+++ maven/trunk/ogoglio-common/.classpath 2007-09-02 20:29:33 UTC (rev 339)
@@ -2,7 +2,9 @@
<classpath>
<classpathentry kind="src" path="src/main/java"/>
<classpathentry kind="src" path="src/test/java"/>
+ <classpathentry excluding="**" kind="src" output="src/main/resources/avatar" path="src/main/resources/avatar"/>
<classpathentry excluding="**" kind="src" output="src/main/resources/templates" path="src/main/resources/templates"/>
+ <classpathentry excluding="**" kind="src" output="src/test/resources" path="src/test/resources"/>
<classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/>
<classpathentry kind="con" path="org.maven.ide.eclipse.MAVEN2_CLASSPATH_CONTAINER"/>
<classpathentry kind="output" path="target/classes"/>
Modified: maven/trunk/ogoglio-common/pom.xml
===================================================================
--- maven/trunk/ogoglio-common/pom.xml 2007-09-02 20:04:48 UTC (rev 338)
+++ maven/trunk/ogoglio-common/pom.xml 2007-09-02 20:29:33 UTC (rev 339)
@@ -5,65 +5,15 @@
<modelVersion>4.0.0</modelVersion>
<!-- About this project -->
- <groupId>com.ogoglio</groupId>
+ <parent>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>ogoglio</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../ogoglio</relativePath>
+ </parent>
<artifactId>ogoglio-common</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <profiles>
- <!-- LINUX -->
- <profile>
- <id>linux</id>
- <dependencies>
- <!-- jav3d stuff -->
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>j3d-core</artifactId>
- <version>1.5.1</version>
- <scope>supplied</scope>
- </dependency>
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>j3d-core-utils</artifactId>
- <version>1.5.1</version>
- <scope>supplied</scope>
- </dependency>
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>vecmath</artifactId>
- <version>1.5.1</version>
- <scope>supplied</scope>
- </dependency>
- </dependencies>
- </profile>
- <!-- OSX -->
- <profile>
- <id>osx</id>
- <dependencies>
- <!-- jav3d stuff -->
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>j3d-core</artifactId>
- <version>1.3</version>
- <scope>supplied</scope>
- </dependency>
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>j3d-core-utils</artifactId>
- <version>1.3</version>
- <scope>supplied</scope>
- </dependency>
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>vecmath</artifactId>
- <version>1.3</version>
- <scope>supplied</scope>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
<build>
-
<resources>
<!-- FILTER RESOURCES FOR SOME CONSTANTS-->
<resource>
@@ -71,6 +21,7 @@
<directory>src/main/resources/avatar</directory>
</resource>
+ <!-- for loading indicator -->
<resource>
<targetPath>templates</targetPath>
<directory>src/main/resources/templates</directory>
Modified: maven/trunk/ogoglio-integration-test/pom.xml
===================================================================
--- maven/trunk/ogoglio-integration-test/pom.xml 2007-09-02 20:04:48 UTC (rev 338)
+++ maven/trunk/ogoglio-integration-test/pom.xml 2007-09-02 20:29:33 UTC (rev 339)
@@ -4,10 +4,26 @@
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>com.ogoglio</groupId>
+
+ <profiles>
+ <profile>
+ <id>integration-test</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
+ </profile>
+ </profiles>
+
+ <!-- About this project -->
+ <parent>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>ogoglio</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../ogoglio</relativePath>
+ </parent>
<artifactId>ogoglio-integration-test</artifactId>
<packaging>pom</packaging>
- <version>0.0.1-SNAPSHOT</version>
+
<build>
<testResources>
<testResource>
@@ -17,6 +33,12 @@
<include>test-config.properties</include>
<include>basic-config.properties</include>
<include>bootstrap.properties</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <filtering>false</filtering>
+ <directory>src/test/resources</directory>
+ <includes>
<include>mail/*</include>
<include>sample-art3d/*</include>
</includes>
@@ -74,6 +96,7 @@
</plugin>
</plugins>
</build>
+
<dependencies>
<dependency>
<groupId>junit</groupId>
Modified: maven/trunk/ogoglio-server/pom.xml
===================================================================
--- maven/trunk/ogoglio-server/pom.xml 2007-09-02 20:04:48 UTC (rev 338)
+++ maven/trunk/ogoglio-server/pom.xml 2007-09-02 20:29:33 UTC (rev 339)
@@ -4,74 +4,41 @@
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>com.ogoglio</groupId>
+ <!-- About this project -->
+ <parent>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>ogoglio</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../ogoglio</relativePath>
+ </parent>
<artifactId>ogoglio-server</artifactId>
<packaging>war</packaging>
- <version>0.0.1-SNAPSHOT</version>
- <distributionManagement>
- <snapshotRepository>
- <id>local-disk</id>
- <uniqueVersion>false</uniqueVersion>
- <name>local disk</name>
- <url>${my.local.repo}</url>
- </snapshotRepository>
- </distributionManagement>
-
- <!-- -->
- <!-- profiles -->
- <!-- -->
+ <!-- mildly questionable: with this profile active by default, you don't get tests run -->
+ <!-- when you do 'install' in this directory... this is b/c often you don't want to destroy -->
+ <!-- the db (which the tests do) when doing server development... comment this out to get -->
+ <!-- the maven default behavior -->
<profiles>
- <!-- LINUX -->
<profile>
- <id>linux</id>
- <dependencies>
- <!-- jav3d stuff -->
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>j3d-core</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>vecmath</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
+ <id>server-side</id>
+ <activation>
+ <activeByDefault>true</activeByDefault>
+ </activation>
</profile>
- <!-- OSX -->
- <profile>
- <id>osx</id>
- <dependencies>
- <!-- jav3d stuff -->
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>j3d-core</artifactId>
- <version>1.3</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>vecmath</artifactId>
- <version>1.3</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
</profiles>
- <!-- -->
+
+ <!-- -->
<!-- BUILD -->
- <!-- -->
+ <!-- -->
<build>
-
<!-- touching templates causes rebuild -->
- <scriptSourceDirectory>${basedir}/src/main/resources/siteTemplates</scriptSourceDirectory>
-
- <!-- -->
+ <scriptSourceDirectory>
+ ${basedir}/src/main/resources/siteTemplates
+ </scriptSourceDirectory>
+
+ <!-- -->
<!-- RESOURCES -->
- <!-- -->
+ <!-- -->
<resources>
<resource>
<directory>src/main/resources/hibernate</directory>
@@ -105,9 +72,9 @@
</resource>
</resources>
- <!-- -->
+ <!-- -->
<!-- TEST RESOURCES -->
- <!-- -->
+ <!-- -->
<testResources>
<testResource>
<directory>src/test/resources</directory>
@@ -123,31 +90,10 @@
</testResources>
- <!-- -->
+ <!-- -->
<!-- PLUGINS -->
- <!-- -->
+ <!-- -->
<plugins>
- <!-- our own plugin for building the static code -->
- <plugin>
- <groupId>com.ogoglio</groupId>
- <artifactId>dev-plugins</artifactId>
- <executions>
- <execution>
- <phase>compile</phase>
- <goals>
- <goal>buildHtml</goal>
- </goals>
- <configuration>
- <templateDirectory>
- src/main/resources/siteTemplates
- </templateDirectory>
- <targetDirectory>
- target/${artifactId}-${version}
- </targetDirectory>
- </configuration>
- </execution>
- </executions>
- </plugin>
<!-- DEPENDENCY PLUGIN: We need to pull in applets -->
<plugin>
@@ -206,46 +152,53 @@
<resource>
<!-- this basedir is a workaround for bug -->
<!-- http://jira.codehaus.org/browse/MWAR-64 -->
- <directory>${basedir}/src/main/webapp/</directory>
+ <directory>
+ ${basedir}/src/main/webapp/
+ </directory>
<filtering>true</filtering>
</resource>
</webResources>
</configuration>
</plugin>
- <!-- CARGO FOR DEPLOY SERVER -->
+ <!-- Our plugin config for building templates -->
<plugin>
- <groupId>org.codehaus.cargo</groupId>
- <artifactId>cargo-maven2-plugin</artifactId>
- <version>0.3-SNAPSHOT</version>
- <configuration>
- <container>
- <containerId>tomcat5x</containerId>
- </container>
- <!-- Configuration to use with the container -->
- <configuration>
- <type>existing</type>
- <home>${ogoglio.tmp.tomcat5x}</home>
- <!-- Deployer configuration -->
- <deployables>
- <deployable>
- <properties>
- <context>${pom.artifactId}</context>
- </properties>
- </deployable>
- </deployables>
- </configuration>
- </configuration>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>dev-plugins</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
<executions>
<execution>
- <id>install</id>
- <phase>integration-test</phase><!-- just must be after packaging -->
+ <phase>compile</phase>
<goals>
- <goal>deploy</goal>
+ <goal>buildHtml</goal>
</goals>
- <!-- CARGO CONFIG -->
+ <configuration>
+ <templateDirectory>
+ src/main/resources/siteTemplates
+ </templateDirectory>
+ <targetDirectory>
+ target/${artifactId}-${version}
+ </targetDirectory>
+ </configuration>
</execution>
</executions>
+
</plugin>
+ <!-- CARGO CONFIG -->
+ <plugin>
+ <groupId>org.codehaus.cargo</groupId>
+ <artifactId>cargo-maven2-plugin</artifactId>
+ <version>0.3-SNAPSHOT</version>
+ <configuration>
+ <!-- Deployer configuration -->
+ <deployables>
+ <deployable>
+ <properties>
+ <context>${pom.artifactId}</context>
+ </properties>
+ </deployable>
+ </deployables>
+ </configuration>
+ </plugin>
</plugins>
</build>
@@ -287,9 +240,9 @@
<scope>compile</scope>
</dependency>
- <!-- -->
+ <!-- -->
<!-- OGOGLIO DEPENDENCIES-->
- <!-- -->
+ <!-- -->
<dependency>
<groupId>com.ogoglio</groupId>
<artifactId>ogoglio-common</artifactId>
@@ -300,9 +253,9 @@
<artifactId>ogoglio-appdev</artifactId>
<version>0.0.1-SNAPSHOT</version>
</dependency>
- <!-- -->
+ <!-- -->
<!-- BOGUS DEPENDENCIES-->
- <!-- -->
+ <!-- -->
<dependency>
<groupId>com.ogoglio</groupId>
<artifactId>ogoglio-viewer-applet</artifactId>
Modified: maven/trunk/ogoglio-test-applet/pom.xml
===================================================================
--- maven/trunk/ogoglio-test-applet/pom.xml 2007-09-02 20:04:48 UTC (rev 338)
+++ maven/trunk/ogoglio-test-applet/pom.xml 2007-09-02 20:29:33 UTC (rev 339)
@@ -2,13 +2,16 @@
<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>
-
- <modelVersion>4.0.0</modelVersion>
- <groupId>com.ogoglio</groupId>
+ <!-- About this project -->
+ <parent>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>ogoglio</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../ogoglio</relativePath>
+ </parent>
<artifactId>ogoglio-test-applet</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>jar</packaging>
<build>
<plugins>
@@ -16,12 +19,10 @@
<groupId>org.apache.maven.plugins</groupId>
<artifactId>maven-surefire-plugin</artifactId>
<configuration>
- <skip>true</skip><!-- ugh no unit tests -->
+ <skip>true</skip><!-- ugh, no unit tests -->
</configuration>
</plugin>
</plugins>
</build>
-
- <dependencies></dependencies>
</project>
Modified: maven/trunk/ogoglio-viewer-applet/pom.xml
===================================================================
--- maven/trunk/ogoglio-viewer-applet/pom.xml 2007-09-02 20:04:48 UTC (rev 338)
+++ maven/trunk/ogoglio-viewer-applet/pom.xml 2007-09-02 20:29:33 UTC (rev 339)
@@ -3,55 +3,16 @@
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>com.ogoglio</groupId>
+
+ <!-- About this project -->
+ <parent>
+ <groupId>com.ogoglio</groupId>
+ <artifactId>ogoglio</artifactId>
+ <version>0.0.1-SNAPSHOT</version>
+ <relativePath>../ogoglio</relativePath>
+ </parent>
<artifactId>ogoglio-viewer-applet</artifactId>
- <version>0.0.1-SNAPSHOT</version>
- <packaging>jar</packaging>
- <!-- -->
- <!-- profiles -->
- <!-- -->
- <profiles>
- <!-- LINUX -->
- <profile>
- <id>linux</id>
- <dependencies>
- <!-- jav3d stuff -->
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>j3d-core</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>vecmath</artifactId>
- <version>1.5.1</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- <!-- OSX -->
- <profile>
- <id>osx</id>
- <dependencies>
- <!-- jav3d stuff -->
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>j3d-core</artifactId>
- <version>1.3</version>
- <scope>runtime</scope>
- </dependency>
- <dependency>
- <groupId>java3d</groupId>
- <artifactId>vecmath</artifactId>
- <version>1.3</version>
- <scope>runtime</scope>
- </dependency>
- </dependencies>
- </profile>
- </profiles>
-
<dependencies>
<dependency>
<groupId>netscape</groupId>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-09-02 20:04:50
|
Revision: 337
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=337&view=rev
Author: trevorolio
Date: 2007-09-02 13:04:44 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
Added a basic sanity check with the viewer applet during the integration tests.
It doesn't do much more than load a space with a test cube for the moment.
This test does not check that the applet will load properly from the server, but simply that the java code will actually open a space client, load a thing via the web api, and render it once.
Modified Paths:
--------------
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/AppletTestWindow.java
maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/AppletTestWindow.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/AppletTestWindow.java 2007-09-02 20:04:41 UTC (rev 336)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/AppletTestWindow.java 2007-09-02 20:04:44 UTC (rev 337)
@@ -14,7 +14,6 @@
package com.ogoglio.client.test;
-import java.applet.Applet;
import java.applet.AppletContext;
import java.applet.AppletStub;
import java.awt.BorderLayout;
@@ -24,70 +23,55 @@
import java.awt.GraphicsEnvironment;
import java.net.MalformedURLException;
import java.net.URI;
+import java.net.URISyntaxException;
import java.net.URL;
import java.util.HashMap;
import com.ogoglio.client.WebAPIAuthenticator;
import com.ogoglio.client.WebAPIClientWire;
import com.ogoglio.client.WebAPIDescriptor;
+import com.ogoglio.util.ArgumentUtils;
import com.ogoglio.util.PropStorage;
import com.ogoglio.viewer.applet.ViewerApplet;
public class AppletTestWindow extends Frame {
- //static Dimension appDimension = new Dimension(640, 500);
- //static Dimension appDimension = new Dimension(500, 522);
- static Dimension appDimension = new Dimension(1000, 640);
+ Dimension appDimension = new Dimension(500, 500);
- Applet applet = null;
+ public ViewerApplet applet = null;
EnvironmentStub clientStub1 = null;
- String host = "127.0.0.1:8080";
+ URI serviceURI = null;
- String serviceURI = "http://" + host + "/og/";
+ public AppletTestWindow(URI serviceURI, long spaceID, String authCookie, Dimension appDimension, boolean decorated) {
+ ArgumentUtils.assertNotNull(appDimension);
+ this.appDimension = appDimension;
+ ArgumentUtils.assertNotNull(serviceURI);
+ this.serviceURI = serviceURI;
- URL codeBase = getURL(serviceURI);
-
- static boolean fullScreen = false;
-
- public AppletTestWindow() {
setLayout(new BorderLayout());
setSize(appDimension);
setLocation(30, 50);
setResizable(false);
- if (fullScreen) {
+ if (!decorated) {
this.setUndecorated(true);
}
-
HashMap parameters1 = new HashMap();
- try {
- PropStorage ps=new PropStorage();
- ps.loadPropertySet(PropStorage.BOOTSTRAP_PROPS);
- WebAPIAuthenticator authenticator = new WebAPIAuthenticator(new WebAPIClientWire(), new WebAPIDescriptor(new URI(serviceURI)),
- ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUser"),
- ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUserPW"));
- parameters1.put("loginCookie", authenticator.getAuthCookie());
- } catch (Exception e) {
- e.printStackTrace();
- }
- //parameters1.put("loginCookie", "guestApplet_Test_Window2");
+ parameters1.put("loginCookie", authCookie);
+ parameters1.put("spaceID", "" + spaceID);
+ parameters1.put("serviceURI", serviceURI.toString());
- parameters1.put("spaceID", "" + System.getProperty("AppletTestWindow.space"));
- parameters1.put("serviceURI", serviceURI);
-
//parameters1.put("x", "0");
//parameters1.put("y", "1000");
//parameters1.put("z", "0");
//parameters1.put("rx", "-1.6");
//parameters1.put("ry", "0");
//parameters1.put("rz", "0");
-
//parameters1.put("movable", "false");
clientStub1 = new EnvironmentStub(parameters1);
applet = new ViewerApplet();
- //applet = new BodyEditorApplet();
applet.setStub(clientStub1);
add(applet, BorderLayout.CENTER);
}
@@ -108,11 +92,19 @@
}
public URL getCodeBase() {
- return codeBase;
+ try {
+ return serviceURI.toURL();
+ } catch (MalformedURLException e) {
+ throw new IllegalStateException("Could not convert serviceURI to URL: " + serviceURI);
+ }
}
public URL getDocumentBase() {
- return codeBase;
+ try {
+ return serviceURI.toURL();
+ } catch (MalformedURLException e) {
+ throw new IllegalStateException("Could not convert serviceURI to URL: " + serviceURI);
+ }
}
public String getParameter(String name) {
@@ -130,26 +122,43 @@
applet.start();
}
- private static URL getURL(String url) {
- try {
- return new URL(url);
- } catch (MalformedURLException e) {
- throw new IllegalStateException("Bad url: " + url);
- }
+ public void cleanup(){
+ applet.destroy();
}
public static void main(String[] args) {
GraphicsEnvironment graphicsEnv = GraphicsEnvironment.getLocalGraphicsEnvironment();
GraphicsDevice device = graphicsEnv.getDefaultScreenDevice();
+ Dimension dim = new Dimension(1024, 800);
+ boolean fullScreen = args.length > 0 && "fullscreen".equals(args[0]);
if (fullScreen) {
- appDimension = new Dimension(device.getDisplayMode().getWidth(), device.getDisplayMode().getWidth());
+ dim = new Dimension(device.getDisplayMode().getWidth(), device.getDisplayMode().getWidth());
}
- AppletTestWindow test = new AppletTestWindow();
- test.setVisible(true);
- if (fullScreen) {
- device.setFullScreenWindow(test);
+ String serviceURI = "http://127.0.0.1:8080/og/";
+ String loginCookie = null;
+ try {
+ PropStorage ps = new PropStorage();
+ ps.loadPropertySet(PropStorage.BOOTSTRAP_PROPS);
+ WebAPIAuthenticator authenticator = new WebAPIAuthenticator(new WebAPIClientWire(), new WebAPIDescriptor(new URI(serviceURI)), ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUser"), ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUserPW"));
+ loginCookie = authenticator.getAuthCookie();
+ } catch (Exception e) {
+ e.printStackTrace();
+ System.exit(1);
}
- test.start();
+
+ long spaceID = Long.parseLong(System.getProperty("AppletTestWindow.space"));
+
+ try {
+ AppletTestWindow test = new AppletTestWindow(new URI(serviceURI), spaceID, loginCookie, dim, fullScreen);
+ test.setVisible(true);
+ if (fullScreen) {
+ device.setFullScreenWindow(test);
+ }
+ test.start();
+ } catch (URISyntaxException e) {
+ e.printStackTrace();
+ System.exit(1);
+ }
}
}
Modified: maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java
===================================================================
--- maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-09-02 20:04:41 UTC (rev 336)
+++ maven/trunk/ogoglio-integration-test/src/test/java/com/ogoglio/client/test/ClientTest.java 2007-09-02 20:04:44 UTC (rev 337)
@@ -13,6 +13,7 @@
limitations under the License. */
package com.ogoglio.client.test;
+import java.awt.Dimension;
import java.awt.Shape;
import java.io.FileNotFoundException;
import java.io.IOException;
@@ -28,6 +29,7 @@
import junit.framework.TestCase;
import nanoxml.XMLElement;
+import com.ogoglio.client.AuthenticationFailedException;
import com.ogoglio.client.SpaceClient;
import com.ogoglio.client.WebAPIAuthenticator;
import com.ogoglio.client.WebAPIAuthenticatorFactory;
@@ -97,88 +99,83 @@
}
- public void testWebAdmin() {
- try {
- PropStorage ps = new PropStorage();
- if (ps.loadPropertySet(PropStorage.BOOTSTRAP_PROPS) == false) {
- fail("unable to load properties bootstrap.properties!");
- }
+ public void testWebAdmin() throws AuthenticationFailedException, IOException {
+ PropStorage ps = new PropStorage();
+ if (ps.loadPropertySet(PropStorage.BOOTSTRAP_PROPS) == false) {
+ fail("unable to load properties bootstrap.properties!");
+ }
- WebAPIAuthenticator adminAuthenticator = new WebAPIAuthenticatorFactory().authenticate(wire1, descriptor1, ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUser"), ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUserPW"));
+ WebAPIAuthenticator adminAuthenticator = new WebAPIAuthenticatorFactory().authenticate(wire1, descriptor1, ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUser"), ps.getKeyFromSet(PropStorage.BOOTSTRAP_PROPS, "bootstrapUserPW"));
- assertNotNull("got null auth cookie", adminAuthenticator.getAuthCookie());
+ assertNotNull("got null auth cookie", adminAuthenticator.getAuthCookie());
- WebAPIClient adminWebClient = new WebAPIClient(descriptor1, adminAuthenticator, wire1);
- adminWebClient.createAccount(USERNAME1, AccountDocument.ACCOUNT_LEVEL_ADVANCED, "Susan", "Examplar", "http://example.com/susan/", "su...@ex...", PASSWORD1);
- adminWebClient.createAccount(USERNAME2, AccountDocument.ACCOUNT_LEVEL_ADVANCED, "Tina", "Examplar", "http://example.com/tina/", "ti...@ex...", PASSWORD1);
+ WebAPIClient adminWebClient = new WebAPIClient(descriptor1, adminAuthenticator, wire1);
+ adminWebClient.createAccount(USERNAME1, AccountDocument.ACCOUNT_LEVEL_ADVANCED, "Susan", "Examplar", "http://example.com/susan/", "su...@ex...", PASSWORD1);
+ adminWebClient.createAccount(USERNAME2, AccountDocument.ACCOUNT_LEVEL_ADVANCED, "Tina", "Examplar", "http://example.com/tina/", "ti...@ex...", PASSWORD1);
- assertNotNull(adminWebClient.getAccountDocument(USERNAME1));
- assertNotNull(adminWebClient.getAccountDocument(USERNAME2));
+ assertNotNull(adminWebClient.getAccountDocument(USERNAME1));
+ assertNotNull(adminWebClient.getAccountDocument(USERNAME2));
- WebAPIAuthenticator basicAuthenticator = new WebAPIAuthenticatorFactory().authenticate(wire1, descriptor1, USERNAME1, PASSWORD1);
- assertNotNull("got null auth cookie", basicAuthenticator.getAuthCookie());
- WebAPIClient basicWebClient = new WebAPIClient(descriptor1, basicAuthenticator, wire1);
- try {
- String failedUsername = "Bogosity" + System.currentTimeMillis();
- AccountDocument doc = basicWebClient.createAccount(failedUsername, AccountDocument.ACCOUNT_LEVEL_BASIC, "Shouldnt", "Exist", null, failedUsername + "@example.com", "1234");
- if (doc != null) {
- fail();
- }
- } catch (Exception e) {
- //this should happen, because basic accounts can't create new accounts
+ WebAPIAuthenticator basicAuthenticator = new WebAPIAuthenticatorFactory().authenticate(wire1, descriptor1, USERNAME1, PASSWORD1);
+ assertNotNull("got null auth cookie", basicAuthenticator.getAuthCookie());
+ WebAPIClient basicWebClient = new WebAPIClient(descriptor1, basicAuthenticator, wire1);
+ try {
+ String failedUsername = "Bogosity" + System.currentTimeMillis();
+ AccountDocument doc = basicWebClient.createAccount(failedUsername, AccountDocument.ACCOUNT_LEVEL_BASIC, "Shouldnt", "Exist", null, failedUsername + "@example.com", "1234");
+ if (doc != null) {
+ fail();
}
+ } catch (Exception e) {
+ //this should happen, because basic accounts can't create new accounts
+ }
- WebAPIGuestAuthenticator guestAuthenticator = new WebAPIAuthenticatorFactory().authenticate(descriptor1, WebConstants.GUEST_COOKIE_PREFIX + "Test_Suite_Guest1");
- WebAPIClient guestWebClient = new WebAPIClient(descriptor1, guestAuthenticator, wire1);
+ WebAPIGuestAuthenticator guestAuthenticator = new WebAPIAuthenticatorFactory().authenticate(descriptor1, WebConstants.GUEST_COOKIE_PREFIX + "Test_Suite_Guest1");
+ WebAPIClient guestWebClient = new WebAPIClient(descriptor1, guestAuthenticator, wire1);
- ServiceStateDocument serviceStateDoc = adminWebClient.setRegistrationState(ServiceStateDocument.REGISTRATION_STATE_CLOSED);
- assertEquals(ServiceStateDocument.REGISTRATION_STATE_CLOSED, serviceStateDoc.getRegistrationState());
- assertNull(adminWebClient.createAccount("shouldnotexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
- assertNull(basicWebClient.createAccount("shouldnotexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
- assertNull(guestWebClient.createAccount("shouldnotexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
+ ServiceStateDocument serviceStateDoc = adminWebClient.setRegistrationState(ServiceStateDocument.REGISTRATION_STATE_CLOSED);
+ assertEquals(ServiceStateDocument.REGISTRATION_STATE_CLOSED, serviceStateDoc.getRegistrationState());
+ assertNull(adminWebClient.createAccount("shouldnotexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
+ assertNull(basicWebClient.createAccount("shouldnotexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
+ assertNull(guestWebClient.createAccount("shouldnotexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
- serviceStateDoc = adminWebClient.setRegistrationState(ServiceStateDocument.REGISTRATION_STATE_OPEN);
- assertEquals(ServiceStateDocument.REGISTRATION_STATE_OPEN, serviceStateDoc.getRegistrationState());
- assertNotNull(adminWebClient.createAccount("shouldexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
- assertNotNull(basicWebClient.createAccount("shouldexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
- assertNotNull(guestWebClient.createAccount("shouldexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
+ serviceStateDoc = adminWebClient.setRegistrationState(ServiceStateDocument.REGISTRATION_STATE_OPEN);
+ assertEquals(ServiceStateDocument.REGISTRATION_STATE_OPEN, serviceStateDoc.getRegistrationState());
+ assertNotNull(adminWebClient.createAccount("shouldexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
+ assertNotNull(basicWebClient.createAccount("shouldexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
+ assertNotNull(guestWebClient.createAccount("shouldexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
- serviceStateDoc = adminWebClient.setRegistrationState(ServiceStateDocument.REGISTRATION_STATE_ADMIN_ONLY);
- assertEquals(ServiceStateDocument.REGISTRATION_STATE_ADMIN_ONLY, serviceStateDoc.getRegistrationState());
- assertNotNull(adminWebClient.createAccount("shouldexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
- assertNull(basicWebClient.createAccount("shouldnotexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
- assertNull(guestWebClient.createAccount("shouldnotexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
+ serviceStateDoc = adminWebClient.setRegistrationState(ServiceStateDocument.REGISTRATION_STATE_ADMIN_ONLY);
+ assertEquals(ServiceStateDocument.REGISTRATION_STATE_ADMIN_ONLY, serviceStateDoc.getRegistrationState());
+ assertNotNull(adminWebClient.createAccount("shouldexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
+ assertNull(basicWebClient.createAccount("shouldnotexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
+ assertNull(guestWebClient.createAccount("shouldnotexist" + System.currentTimeMillis(), AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, System.currentTimeMillis() + "@example.com", "1234"));
- String username = "testuser" + Math.abs(new Random().nextLong());
- adminWebClient.createAccount(username, AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, username + "@example.com", "1234");
+ String username = "testuser" + Math.abs(new Random().nextLong());
+ adminWebClient.createAccount(username, AccountDocument.ACCOUNT_LEVEL_BASIC, "Test", "Sims", null, username + "@example.com", "1234");
- AccountDocument accountDoc = adminWebClient.getAccountDocument(username);
- assertNotNull(accountDoc);
- assertEquals("Test", accountDoc.getFirstName());
- assertEquals("Sims", accountDoc.getLastName());
+ AccountDocument accountDoc = adminWebClient.getAccountDocument(username);
+ assertNotNull(accountDoc);
+ assertEquals("Test", accountDoc.getFirstName());
+ assertEquals("Sims", accountDoc.getLastName());
- Date frozenDate = new Date(System.currentTimeMillis() + 1000000);
- accountDoc.setFrozenUntil(frozenDate);
- accountDoc.setAccountLevel(AccountDocument.ACCOUNT_LEVEL_ADMIN);
- adminWebClient.updateAccount(accountDoc);
- accountDoc = adminWebClient.getAccountDocument(username);
- assertTrue(frozenDate.getTime() - accountDoc.getFrozenUntil().getTime() < 1000);
- assertEquals(AccountDocument.ACCOUNT_LEVEL_ADMIN, accountDoc.getAccountLevel());
- accountDoc.setFrozenUntil(new Date(1000));
- accountDoc.setAccountLevel(AccountDocument.ACCOUNT_LEVEL_BASIC);
- accountDoc = adminWebClient.updateAccount(accountDoc);
- AccountDocument ac2 = adminWebClient.getAccountDocument(username);
- assertNull(accountDoc.getFrozenUntil());
- assertNull(ac2.getFrozenUntil());
- assertEquals(AccountDocument.ACCOUNT_LEVEL_BASIC, accountDoc.getAccountLevel());
+ Date frozenDate = new Date(System.currentTimeMillis() + 1000000);
+ accountDoc.setFrozenUntil(frozenDate);
+ accountDoc.setAccountLevel(AccountDocument.ACCOUNT_LEVEL_ADMIN);
+ adminWebClient.updateAccount(accountDoc);
+ accountDoc = adminWebClient.getAccountDocument(username);
+ assertTrue(frozenDate.getTime() - accountDoc.getFrozenUntil().getTime() < 1000);
+ assertEquals(AccountDocument.ACCOUNT_LEVEL_ADMIN, accountDoc.getAccountLevel());
+ accountDoc.setFrozenUntil(new Date(1000));
+ accountDoc.setAccountLevel(AccountDocument.ACCOUNT_LEVEL_BASIC);
+ accountDoc = adminWebClient.updateAccount(accountDoc);
+ AccountDocument ac2 = adminWebClient.getAccountDocument(username);
+ assertNull(accountDoc.getFrozenUntil());
+ assertNull(ac2.getFrozenUntil());
+ assertEquals(AccountDocument.ACCOUNT_LEVEL_BASIC, accountDoc.getAccountLevel());
- } catch (Exception e) {
- e.printStackTrace();
- fail("Might want to check to make sure database exists and library account exists...");
- }
}
- public void testWebAPIClient() {
+ public void testWebAPIClient() throws IOException {
SpaceClient spaceClient1 = null;
SpaceClient guestSpaceClient1 = null;
@@ -214,7 +211,7 @@
assertEquals(1, thingDocs.length);
checkThingScripting(webClient1, thingDocs[0], spaceDocument);
-
+
checkPageManipulation(webClient1, thingDocs[0], spaceDocument);
//figure out the last template added
@@ -233,10 +230,6 @@
guestSpaceClient1 = checkGuestCookieOperation(spaceDocument.getSpaceID(), webClient1, WebConstants.GUEST_COOKIE_PREFIX + "Test_Suite_Guest");
checkDeletingSpaceDestroysThings(spaceDocument.getSpaceID(), webClient1, USERNAME1);
-
- } catch (IOException e) {
- e.printStackTrace();
- fail();
} finally {
if (spaceClient1 != null) {
spaceClient1.cleanup();
@@ -248,6 +241,58 @@
}
+ public void testApplet() throws AuthenticationFailedException, IOException {
+ WebAPIAuthenticator basicAuthenticator = new WebAPIAuthenticatorFactory().authenticate(wire1, descriptor1, USERNAME1, PASSWORD1);
+ assertNotNull("got null auth cookie", basicAuthenticator.getAuthCookie());
+ WebAPIClient basicWebClient = new WebAPIClient(descriptor1, basicAuthenticator, wire1);
+
+ TemplateDocument newTemplateDoc = basicWebClient.createTemplate("Viewed Test Template");
+ assertNotNull(newTemplateDoc);
+ basicWebClient.uploadTemplateGeometryStream(newTemplateDoc.getOwnerUsername(), newTemplateDoc.getTemplateID(), 0, UIConstants.getResource("sample-art3d/TestCube.obj"));
+ basicWebClient.uploadTemplateResourceStream(newTemplateDoc.getOwnerUsername(), newTemplateDoc.getTemplateID(), "TestCube.mtl", UIConstants.getResource("sample-art3d/TestCube.mtl"));
+ basicWebClient.uploadTemplateResourceStream(newTemplateDoc.getOwnerUsername(), newTemplateDoc.getTemplateID(), "TestCube.gif", UIConstants.getResource("sample-art3d/TestCube.gif"));
+ basicWebClient.updateTemplateScript(newTemplateDoc.getOwnerUsername(), newTemplateDoc.getTemplateID(), StreamUtils.readInput(UIConstants.getResource("sample-art3d/TestCube.js")));
+
+ TemplateDocument[] templateDocs = basicWebClient.getTemplateDocuments(basicAuthenticator.getUsername());
+ assertNotNull(templateDocs);
+ assertTrue(templateDocs.length > 0);
+
+ SpaceDocument spaceDocument = basicWebClient.createSpace("Applet Test Space");
+ assertNotNull(spaceDocument);
+ PossessionDocument possDoc = basicWebClient.createPossession(newTemplateDoc.getTemplateID());
+ assertNotNull(possDoc);
+ possDoc = basicWebClient.addPossessionToSpace(possDoc.getPossessionID(), spaceDocument.getSpaceID());
+ assertTrue(possDoc.getThingID() != -1);
+
+ ThingDocument thingDoc = basicWebClient.getThingDocument(spaceDocument.getSpaceID(), possDoc.getThingID());
+ thingDoc.setZ(-10);
+ basicWebClient.updateThing(spaceDocument.getSpaceID(), thingDoc);
+
+ AppletTestWindow testWindow = openAppletTestWindow(spaceDocument, basicAuthenticator);
+
+ testWindow.applet.sendChatMessage("Hey, this is a chat message");
+ assertEquals(basicAuthenticator.getAuthDocument(true).getUsername(), testWindow.applet.getUsername());
+ testWindow.cleanup();
+
+ basicWebClient.deleteSpace(spaceDocument.getSpaceID());
+ }
+
+ private AppletTestWindow openAppletTestWindow(SpaceDocument spaceDocument, WebAPIAuthenticator authenticator){
+ AppletTestWindow testWindow = new AppletTestWindow(descriptor1.getServiceURI(), spaceDocument.getSpaceID(), authenticator.getAuthCookie(), new Dimension(500, 500), true);
+ testWindow.setVisible(true);
+ testWindow.start();
+
+ long startTime = System.currentTimeMillis();
+ while(!testWindow.applet.completedInitialLoad() && System.currentTimeMillis() < startTime + 10000){
+ try {
+ Thread.sleep(500);
+ } catch (InterruptedException e) {
+ }
+ }
+ assertTrue(testWindow.applet.completedInitialLoad());
+ return testWindow;
+ }
+
private void checkThingScripting(WebAPIClient webClient, ThingDocument thingDocument, SpaceDocument spaceDocument) throws IOException {
//make sure script will return a value
String script = webClient.getTemplateScript(webClient.getAuthenticator().getUsername(), thingDocument.getTemplateID());
@@ -255,13 +300,13 @@
assertFalse(script.indexOf("onService(") == -1);
//look for the monkey
- String thingServiceResponse = webClient.getThingService(spaceDocument.getSpaceID(), thingDocument.getThingID());
+ String thingServiceResponse = webClient.getThingService(spaceDocument.getSpaceID(), thingDocument.getThingID());
assertEquals("monkey", thingServiceResponse);
//try with no script
webClient.updateTemplateScript(webClient.getAuthenticator().getUsername(), thingDocument.getTemplateID(), "");
webClient.reloadThing(spaceDocument.getSpaceID(), thingDocument.getThingID());
- thingServiceResponse = webClient.getThingService(spaceDocument.getSpaceID(), thingDocument.getThingID());
+ thingServiceResponse = webClient.getThingService(spaceDocument.getSpaceID(), thingDocument.getThingID());
assertEquals("", thingServiceResponse);
//reinstall script
@@ -278,7 +323,7 @@
return userDocs;
}
- private void checkAuthDoc(WebAPIAuthenticator auth1, WebAPIAuthenticator auth2) {
+ private void checkAuthDoc(WebAPIAuthenticator auth1, WebAPIAuthenticator auth2) throws IOException {
AuthDocument authDoc = getAuthDoc(null);
assertFalse(authDoc.isAuthenticated());
assertNull(authDoc.getUsername());
@@ -296,14 +341,9 @@
assertEquals(USERNAME2, authDoc.getUsername());
}
- private AuthDocument getAuthDoc(String authCookie) {
- try {
- XMLElement element = wire1.fetchAuthenticatedXML(descriptor1.getMeAuthURI(), authCookie);
- return new AuthDocument(element);
- } catch (IOException e) {
- fail("Error fetching auth document with no auth cookie: " + e);
- return null;
- }
+ private AuthDocument getAuthDoc(String authCookie) throws IOException {
+ XMLElement element = wire1.fetchAuthenticatedXML(descriptor1.getMeAuthURI(), authCookie);
+ return new AuthDocument(element);
}
private void checkSpaceAuthWithMembership(WebAPIAuthenticator memberAuth, WebAPIClient memberClient, WebAPIClient ownerClient, SpaceDocument spaceDocument) throws IOException {
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <tre...@us...> - 2007-09-02 20:04:49
|
Revision: 338
http://ogoglio.svn.sourceforge.net/ogoglio/?rev=338&view=rev
Author: trevorolio
Date: 2007-09-02 13:04:48 -0700 (Sun, 02 Sep 2007)
Log Message:
-----------
Added a basic sanity check with the viewer applet during the integration tests.
It doesn't do much more than load a space with a test cube for the moment.
This test does not check that the applet will load properly from the server, but simply that the java code will actually open a space client, load a thing via the web api, and render it once.
Modified Paths:
--------------
maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
Modified: maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java
===================================================================
--- maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2007-09-02 20:04:44 UTC (rev 337)
+++ maven/trunk/ogoglio-viewer-applet/src/main/java/com/ogoglio/viewer/applet/ViewerApplet.java 2007-09-02 20:04:48 UTC (rev 338)
@@ -43,7 +43,7 @@
import com.ogoglio.viewer.render.Renderer;
public class ViewerApplet extends Applet {
-
+
public static final String MOVE_NONCE = "move";
private SplashPanel splashPanel = new SplashPanel();
@@ -130,6 +130,31 @@
validate();
}
+ public void destroy() {
+ if (renderer != null) {
+ renderer.stopRenderer();
+ }
+ if (spaceClient != null) {
+ spaceClient.cleanup();
+ }
+ }
+
+ public void stop() {
+ if (renderer != null) {
+ renderer.stopRenderer();
+ }
+ if (spaceClient != null) {
+ spaceClient.cleanup();
+ }
+ }
+
+ public boolean completedInitialLoad(){
+ if(renderer == null){
+ return false;
+ }
+ return renderer.completedInitialLoad();
+ }
+
private float getFloatParameter(String name, float defaultValue) {
String stringValue = getParameter(name);
if (stringValue == null || stringValue.trim().length() == 0) {
@@ -183,7 +208,7 @@
spaceClient.mouseContextItemChosen(thing, nonce, id);
}
- public void populatePopup(long nonce, String errorIfAny, Vector contextMenu) {
+ private void populatePopup(long nonce, String errorIfAny, Vector contextMenu) {
if (!popupMap.containsKey(new Long(nonce))) {
System.err.println("[Internal Error] context menu data (" + nonce + ") couldn't be matched to a menu!");
return;
@@ -272,16 +297,6 @@
return spaceClient.getUsername();
}
- public void destroy() {
- renderer.stopRenderer();
- spaceClient.cleanup();
- }
-
- public void stop() {
- renderer.stopRenderer();
- spaceClient.cleanup();
- }
-
private class SpaceClientListener implements SpaceClient.Listener {
public void disconnected() {
@@ -359,7 +374,7 @@
}
});
addSeparator();
-
+
waitingItem = add("Retreiving menu...");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|