|
From: <fg...@us...> - 2006-11-13 21:01:32
|
Revision: 104
http://svn.sourceforge.net/openutils/?rev=104&view=rev
Author: fgiust
Date: 2006-11-13 13:01:16 -0800 (Mon, 13 Nov 2006)
Log Message:
-----------
split openutils-usermanagement
Modified Paths:
--------------
trunk/openutils-usermanagement/pom.xml
Added Paths:
-----------
trunk/openutils-usermanagement-dataobjects/
trunk/openutils-usermanagement-dataobjects/pom.xml
trunk/openutils-usermanagement-dataobjects/src/
trunk/openutils-usermanagement-dataobjects/src/main/
trunk/openutils-usermanagement-dataobjects/src/main/java/
trunk/openutils-usermanagement-dataobjects/src/main/java/it/
trunk/openutils-usermanagement-dataobjects/src/main/java/it/openutils/
trunk/openutils-usermanagement-dataobjects/src/main/java/it/openutils/usermanagement/
Modified: trunk/openutils-usermanagement/pom.xml
===================================================================
--- trunk/openutils-usermanagement/pom.xml 2006-11-06 22:53:52 UTC (rev 103)
+++ trunk/openutils-usermanagement/pom.xml 2006-11-13 21:01:16 UTC (rev 104)
@@ -21,6 +21,11 @@
</dependency>
<dependency>
<groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-usermanagement-dataobjects</artifactId>
+ <version>1.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils-bshd5</artifactId>
<version>1.0.2</version>
</dependency>
Added: trunk/openutils-usermanagement-dataobjects/pom.xml
===================================================================
--- trunk/openutils-usermanagement-dataobjects/pom.xml (rev 0)
+++ trunk/openutils-usermanagement-dataobjects/pom.xml 2006-11-13 21:01:16 UTC (rev 104)
@@ -0,0 +1,54 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>2</version>
+ <relativePath>../openutils-parent</relativePath>
+ </parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-usermanagement-dataobjects</artifactId>
+ <packaging>jar</packaging>
+ <name>openutils-usermanagement-dataobjects</name>
+ <version>1.1-SNAPSHOT</version>
+ <description>Usermanagement dataobjects</description>
+ <dependencies>
+ <dependency>
+ <groupId>javax.persistence</groupId>
+ <artifactId>persistence-api</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.acegisecurity</groupId>
+ <artifactId>acegi-security</artifactId>
+ <version>1.0.2</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-remoting</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-support</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>logkit</groupId>
+ <artifactId>logkit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/openutils-usermanagement-dataobjects/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2006-11-13 21:17:01
|
Revision: 105
http://svn.sourceforge.net/openutils/?rev=105&view=rev
Author: fgiust
Date: 2006-11-13 13:16:40 -0800 (Mon, 13 Nov 2006)
Log Message:
-----------
leave only minimal dependencies in usermanagement/dataobjects
Modified Paths:
--------------
trunk/openutils-parent/pom.xml
trunk/openutils-usermanagement-dataobjects/pom.xml
Added Paths:
-----------
trunk/openutils-usermanagement-dataobjects/src/main/java/it/openutils/usermanagement/dataobjects/
Removed Paths:
-------------
trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/dataobjects/
Property Changed:
----------------
trunk/openutils-usermanagement-dataobjects/
Modified: trunk/openutils-parent/pom.xml
===================================================================
--- trunk/openutils-parent/pom.xml 2006-11-13 21:01:16 UTC (rev 104)
+++ trunk/openutils-parent/pom.xml 2006-11-13 21:16:40 UTC (rev 105)
@@ -124,6 +124,7 @@
<module>../openutils-deployment</module>
<module>../openutils-log4j</module>
<module>../openutils-spring</module>
+ <module>../openutils-usermanagement-dataobjects</module>
<module>../openutils-usermanagement</module>
<module>../openutils-testing</module>
</modules>
Property changes on: trunk/openutils-usermanagement-dataobjects
___________________________________________________________________
Name: svn:ignore
+ .classpath
.project
.settings
target
Modified: trunk/openutils-usermanagement-dataobjects/pom.xml
===================================================================
--- trunk/openutils-usermanagement-dataobjects/pom.xml 2006-11-13 21:01:16 UTC (rev 104)
+++ trunk/openutils-usermanagement-dataobjects/pom.xml 2006-11-13 21:16:40 UTC (rev 105)
@@ -1,4 +1,5 @@
-<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">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sourceforge.openutils</groupId>
@@ -13,12 +14,19 @@
<version>1.1-SNAPSHOT</version>
<description>Usermanagement dataobjects</description>
<dependencies>
- <dependency>
- <groupId>javax.persistence</groupId>
- <artifactId>persistence-api</artifactId>
- <version>1.0</version>
- </dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.2.0.ga</version>
+ <exclusions>
+ <exclusion>
+ <!-- not needed here, just load annotations -->
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
<version>2.2</version>
@@ -41,13 +49,25 @@
<artifactId>spring-support</artifactId>
</exclusion>
<exclusion>
- <groupId>logkit</groupId>
- <artifactId>logkit</artifactId>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
</exclusion>
<exclusion>
- <groupId>avalon-framework</groupId>
- <artifactId>avalon-framework</artifactId>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
</exclusion>
+ <exclusion>
+ <groupId>oro</groupId>
+ <artifactId>oro</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
</exclusions>
</dependency>
</dependencies>
Copied: trunk/openutils-usermanagement-dataobjects/src/main/java/it/openutils/usermanagement/dataobjects (from rev 104, trunk/openutils-usermanagement/src/main/java/it/openutils/usermanagement/dataobjects)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2006-12-10 17:36:38
|
Revision: 141
http://svn.sourceforge.net/openutils/?rev=141&view=rev
Author: fgiust
Date: 2006-12-10 09:36:38 -0800 (Sun, 10 Dec 2006)
Log Message:
-----------
upgrade to acegi 1.0.3
Modified Paths:
--------------
trunk/openutils-parent/pom.xml
trunk/openutils-usermanagement/pom.xml
trunk/openutils-usermanagement-dataobjects/pom.xml
Modified: trunk/openutils-parent/pom.xml
===================================================================
--- trunk/openutils-parent/pom.xml 2006-12-09 20:18:26 UTC (rev 140)
+++ trunk/openutils-parent/pom.xml 2006-12-10 17:36:38 UTC (rev 141)
@@ -14,11 +14,11 @@
<url>http://sourceforge.net/tracker/?group_id=150467&atid=784057</url>
</issueManagement>
<scm>
- <connection>scm:svn:https://svn.sourceforge.net/svnroot/openutils/trunk/openutils-site</connection>
+ <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-site</connection>
<developerConnection>
- scm:svn:https://svn.sourceforge.net/svnroot/openutils/trunk/openutils-site
+ scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-site
</developerConnection>
- <url>http://svn.sourceforge.net/viewcvs.cgi/openutils/trunk/openutils-site</url>
+ <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/trunk/openutils-site</url>
</scm>
<organization>
<name>Openmind</name>
Modified: trunk/openutils-usermanagement/pom.xml
===================================================================
--- trunk/openutils-usermanagement/pom.xml 2006-12-09 20:18:26 UTC (rev 140)
+++ trunk/openutils-usermanagement/pom.xml 2006-12-10 17:36:38 UTC (rev 141)
@@ -70,7 +70,7 @@
<dependency>
<groupId>org.acegisecurity</groupId>
<artifactId>acegi-security</artifactId>
- <version>1.0.2</version>
+ <version>1.0.3</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
Modified: trunk/openutils-usermanagement-dataobjects/pom.xml
===================================================================
--- trunk/openutils-usermanagement-dataobjects/pom.xml 2006-12-09 20:18:26 UTC (rev 140)
+++ trunk/openutils-usermanagement-dataobjects/pom.xml 2006-12-10 17:36:38 UTC (rev 141)
@@ -33,7 +33,7 @@
<dependency>
<groupId>org.acegisecurity</groupId>
<artifactId>acegi-security</artifactId>
- <version>1.0.2</version>
+ <version>1.0.3</version>
<exclusions>
<exclusion>
<groupId>org.springframework</groupId>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2006-12-10 17:38:07
|
Revision: 143
http://svn.sourceforge.net/openutils/?rev=143&view=rev
Author: fgiust
Date: 2006-12-10 09:38:08 -0800 (Sun, 10 Dec 2006)
Log Message:
-----------
upgrade libs
Modified Paths:
--------------
trunk/openutils-deployment/pom.xml
trunk/openutils-spring/pom.xml
trunk/openutils-testing/pom.xml
Modified: trunk/openutils-deployment/pom.xml
===================================================================
--- trunk/openutils-deployment/pom.xml 2006-12-10 17:37:01 UTC (rev 142)
+++ trunk/openutils-deployment/pom.xml 2006-12-10 17:38:08 UTC (rev 143)
@@ -14,7 +14,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.1</version>
+ <version>2.2</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
@@ -30,7 +30,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
- <version>2.0</version>
+ <version>2.0.1</version>
<optional>true</optional>
<exclusions>
<exclusion>
Modified: trunk/openutils-spring/pom.xml
===================================================================
--- trunk/openutils-spring/pom.xml 2006-12-10 17:37:01 UTC (rev 142)
+++ trunk/openutils-spring/pom.xml 2006-12-10 17:38:08 UTC (rev 143)
@@ -14,7 +14,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
- <version>2.0</version>
+ <version>2.0.1</version>
<optional>true</optional>
<exclusions>
<exclusion>
@@ -46,7 +46,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.1</version>
+ <version>2.2</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
Modified: trunk/openutils-testing/pom.xml
===================================================================
--- trunk/openutils-testing/pom.xml 2006-12-10 17:37:01 UTC (rev 142)
+++ trunk/openutils-testing/pom.xml 2006-12-10 17:38:08 UTC (rev 143)
@@ -19,23 +19,23 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
- <version>2.0</version>
+ <version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-context</artifactId>
- <version>2.0</version>
+ <version>2.0.1</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-hibernate3</artifactId>
- <version>2.0</version>
+ <version>2.0.1</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.1</version>
+ <version>2.2</version>
</dependency>
<dependency>
<groupId>dbunit</groupId>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2007-01-04 14:15:10
|
Revision: 144
http://svn.sourceforge.net/openutils/?rev=144&view=rev
Author: fgiust
Date: 2007-01-04 06:15:02 -0800 (Thu, 04 Jan 2007)
Log Message:
-----------
move parent and make room for new modules
Modified Paths:
--------------
trunk/openutils-bshd5/pom.xml
trunk/openutils-deployment/pom.xml
trunk/openutils-log4j/pom.xml
trunk/openutils-spring/pom.xml
trunk/openutils-testing/pom.xml
trunk/openutils-usermanagement/pom.xml
trunk/openutils-usermanagement-dataobjects/pom.xml
Added Paths:
-----------
trunk/LICENSE.txt
trunk/openutils-backup/
trunk/openutils-backup/pom.xml
trunk/openutils-backup/src/
trunk/openutils-backup/src/main/
trunk/openutils-backup/src/main/java/
trunk/openutils-backup/src/main/resources/
trunk/openutils-backup/src/test/
trunk/openutils-backup/src/test/java/
trunk/openutils-backup/src/test/resources/
trunk/openutils-dbmigration/
trunk/openutils-dbmigration/pom.xml
trunk/openutils-dbmigration/src/
trunk/openutils-dbmigration/src/main/
trunk/openutils-dbmigration/src/main/java/
trunk/openutils-dbmigration/src/main/resources/
trunk/openutils-dbmigration/src/test/
trunk/openutils-dbmigration/src/test/java/
trunk/openutils-dbmigration/src/test/resources/
trunk/openutils-tags-spring/
trunk/openutils-tags-spring/pom.xml
trunk/openutils-tags-spring/src/
trunk/openutils-tags-spring/src/main/
trunk/openutils-tags-spring/src/main/java/
trunk/openutils-tags-spring/src/main/resources/
trunk/openutils-tags-spring/src/test/
trunk/openutils-tags-spring/src/test/java/
trunk/openutils-tags-spring/src/test/resources/
trunk/openutils-web/
trunk/openutils-web/pom.xml
trunk/openutils-web/src/
trunk/openutils-web/src/main/
trunk/openutils-web/src/main/java/
trunk/openutils-web/src/main/resources/
trunk/openutils-web/src/test/
trunk/openutils-web/src/test/java/
trunk/openutils-web/src/test/resources/
trunk/pom.xml
trunk/src/
Removed Paths:
-------------
trunk/openutils-parent/LICENSE.txt
trunk/openutils-parent/pom.xml
trunk/openutils-parent/src/
Property Changed:
----------------
trunk/
Property changes on: trunk
___________________________________________________________________
Name: svn:ignore
- openutils-springjsp
+ openutils-springjsp
target
Copied: trunk/LICENSE.txt (from rev 109, trunk/openutils-parent/LICENSE.txt)
===================================================================
--- trunk/LICENSE.txt (rev 0)
+++ trunk/LICENSE.txt 2007-01-04 14:15:02 UTC (rev 144)
@@ -0,0 +1,3 @@
+
+ Opentils modules are released under different licenses.
+ Please see license information for each module.
Added: trunk/openutils-backup/pom.xml
===================================================================
--- trunk/openutils-backup/pom.xml (rev 0)
+++ trunk/openutils-backup/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -0,0 +1,37 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>openutils-backup</artifactId>
+ <name>openutils data backup</name>
+ <version>1.0-SNAPSHOT</version>
+ <description />
+ <dependencies>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.13</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/openutils-backup/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/openutils-bshd5/pom.xml
===================================================================
--- trunk/openutils-bshd5/pom.xml 2006-12-10 17:38:08 UTC (rev 143)
+++ trunk/openutils-bshd5/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -3,8 +3,8 @@
<parent>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils</artifactId>
- <version>2</version>
- <relativePath>../openutils-parent</relativePath>
+ <version>3</version>
+ <relativePath>..</relativePath>
</parent>
<artifactId>openutils-bshd5</artifactId>
<name>openutils base Spring-Hibernate DAO for java 5.0</name>
Property changes on: trunk/openutils-dbmigration
___________________________________________________________________
Name: svn:ignore
+ target
Added: trunk/openutils-dbmigration/pom.xml
===================================================================
--- trunk/openutils-dbmigration/pom.xml (rev 0)
+++ trunk/openutils-dbmigration/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -0,0 +1,37 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>openutils-dbmigration</artifactId>
+ <name>openutils db migration framework</name>
+ <version>1.0-SNAPSHOT</version>
+ <description />
+ <dependencies>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.13</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/openutils-dbmigration/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/openutils-deployment/pom.xml
===================================================================
--- trunk/openutils-deployment/pom.xml 2006-12-10 17:38:08 UTC (rev 143)
+++ trunk/openutils-deployment/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -3,8 +3,8 @@
<parent>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils</artifactId>
- <version>2</version>
- <relativePath>../openutils-parent</relativePath>
+ <version>3</version>
+ <relativePath>..</relativePath>
</parent>
<artifactId>openutils-deployment</artifactId>
<name>openutils deployment tools</name>
Modified: trunk/openutils-log4j/pom.xml
===================================================================
--- trunk/openutils-log4j/pom.xml 2006-12-10 17:38:08 UTC (rev 143)
+++ trunk/openutils-log4j/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -4,8 +4,8 @@
<parent>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils</artifactId>
- <version>2</version>
- <relativePath>../openutils-parent</relativePath>
+ <version>3</version>
+ <relativePath>..</relativePath>
</parent>
<artifactId>openutils-log4j</artifactId>
<packaging>jar</packaging>
Deleted: trunk/openutils-parent/LICENSE.txt
===================================================================
--- trunk/openutils-parent/LICENSE.txt 2006-12-10 17:38:08 UTC (rev 143)
+++ trunk/openutils-parent/LICENSE.txt 2007-01-04 14:15:02 UTC (rev 144)
@@ -1,3 +0,0 @@
-
- Opentils modules are released under different licenses.
- Please see license information for each module.
Deleted: trunk/openutils-parent/pom.xml
===================================================================
--- trunk/openutils-parent/pom.xml 2006-12-10 17:38:08 UTC (rev 143)
+++ trunk/openutils-parent/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -1,131 +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>net.sourceforge.openutils</groupId>
- <artifactId>openutils</artifactId>
- <packaging>pom</packaging>
- <version>2</version>
- <name>openutils</name>
- <description>openutils parent POM</description>
- <url>http://openutils.sourceforge.net</url>
- <issueManagement>
- <system>sourceforge</system>
- <url>http://sourceforge.net/tracker/?group_id=150467&atid=784057</url>
- </issueManagement>
- <scm>
- <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-site</connection>
- <developerConnection>
- scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk/openutils-site
- </developerConnection>
- <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/trunk/openutils-site</url>
- </scm>
- <organization>
- <name>Openmind</name>
- <url>http://www.openmindonline.it</url>
- </organization>
- <licenses>
- <license>
- <name>The Apache Software License, Version 2.0</name>
- <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
- </license>
- </licenses>
- <developers>
- <developer>
- <id>fgiust</id>
- <name>Fabrizio Giustina</name>
- <email>fg...@ap...</email>
- <organization>openmind</organization>
- <roles>
- <role>Project admin and developer</role>
- </roles>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>ronya_z</id>
- <name>Daniela Fuscio</name>
- <email>dan...@op...</email>
- <organization>openmind</organization>
- <roles>
- <role>developer</role>
- </roles>
- <timezone>+1</timezone>
- </developer>
- <developer>
- <id>fberar</id>
- <name>Fabrizio Berardi</name>
- <email>fab...@op...</email>
- <organization>openmind</organization>
- <roles>
- <role>developer</role>
- </roles>
- <timezone>+1</timezone>
- </developer>
- </developers>
- <build>
- <plugins>
- <plugin>
- <artifactId>maven-compiler-plugin</artifactId>
- <configuration>
- <source>1.5</source>
- <target>1.5</target>
- </configuration>
- </plugin>
- <plugin>
- <artifactId>maven-source-plugin</artifactId>
- <executions>
- <execution>
- <id>attach-sources</id>
- <goals>
- <goal>jar</goal>
- </goals>
- </execution>
- </executions>
- </plugin>
- </plugins>
- </build>
- <reporting>
- <plugins>
- <plugin>
- <artifactId>maven-project-info-reports-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-changes-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-surefire-report-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-changelog-plugin</artifactId>
- </plugin>
- <plugin>
- <artifactId>maven-jxr-plugin</artifactId>
- </plugin>
- </plugins>
- </reporting>
- <distributionManagement>
- <site>
- <id>sourceforge</id>
- <name>sourceforge</name>
- <url>scp://shell.sourceforge.net/home/groups/o/op/openutils/htdocs/</url>
- </site>
- <downloadUrl>http://prdownloads.sourceforge.net/150467</downloadUrl>
- <repository>
- <id>openutils</id>
- <url>scp://shell.sourceforge.net/home/groups/o/op/openutils/htdocs/repository/releases</url>
- </repository>
- <snapshotRepository>
- <id>openutils.snapshots</id>
- <url>scp://shell.sourceforge.net/home/groups/o/op/openutils/htdocs/repository/snapshots</url>
- </snapshotRepository>
- </distributionManagement>
- <modules>
- <module>../openutils-bshd5</module>
- <module>../openutils-deployment</module>
- <module>../openutils-log4j</module>
- <module>../openutils-spring</module>
- <module>../openutils-usermanagement-dataobjects</module>
- <module>../openutils-usermanagement</module>
- <module>../openutils-testing</module>
- </modules>
-</project>
Modified: trunk/openutils-spring/pom.xml
===================================================================
--- trunk/openutils-spring/pom.xml 2006-12-10 17:38:08 UTC (rev 143)
+++ trunk/openutils-spring/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -3,8 +3,8 @@
<parent>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils</artifactId>
- <version>2</version>
- <relativePath>../openutils-parent</relativePath>
+ <version>3</version>
+ <relativePath>..</relativePath>
</parent>
<artifactId>openutils-spring</artifactId>
<name>openutils spring tools</name>
Property changes on: trunk/openutils-tags-spring
___________________________________________________________________
Name: svn:ignore
+ target
Added: trunk/openutils-tags-spring/pom.xml
===================================================================
--- trunk/openutils-tags-spring/pom.xml (rev 0)
+++ trunk/openutils-tags-spring/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -0,0 +1,13 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>openutils-tags-spring</artifactId>
+ <name>openutils tags for spring MVC</name>
+ <version>1.0-SNAPSHOT</version>
+ <description />
+</project>
\ No newline at end of file
Property changes on: trunk/openutils-tags-spring/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/openutils-testing/pom.xml
===================================================================
--- trunk/openutils-testing/pom.xml 2006-12-10 17:38:08 UTC (rev 143)
+++ trunk/openutils-testing/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -3,8 +3,8 @@
<parent>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils</artifactId>
- <version>2</version>
- <relativePath>../openutils-parent</relativePath>
+ <version>3</version>
+ <relativePath>..</relativePath>
</parent>
<artifactId>openutils-testing</artifactId>
<name>openutils test utils</name>
Modified: trunk/openutils-usermanagement/pom.xml
===================================================================
--- trunk/openutils-usermanagement/pom.xml 2006-12-10 17:38:08 UTC (rev 143)
+++ trunk/openutils-usermanagement/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -4,8 +4,8 @@
<parent>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils</artifactId>
- <version>2</version>
- <relativePath>../openutils-parent</relativePath>
+ <version>3</version>
+ <relativePath>..</relativePath>
</parent>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils-usermanagement</artifactId>
Modified: trunk/openutils-usermanagement-dataobjects/pom.xml
===================================================================
--- trunk/openutils-usermanagement-dataobjects/pom.xml 2006-12-10 17:38:08 UTC (rev 143)
+++ trunk/openutils-usermanagement-dataobjects/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -3,8 +3,8 @@
<parent>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils</artifactId>
- <version>2</version>
- <relativePath>../openutils-parent</relativePath>
+ <version>3</version>
+ <relativePath>..</relativePath>
</parent>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils-usermanagement-dataobjects</artifactId>
Property changes on: trunk/openutils-web
___________________________________________________________________
Name: svn:ignore
+ target
Added: trunk/openutils-web/pom.xml
===================================================================
--- trunk/openutils-web/pom.xml (rev 0)
+++ trunk/openutils-web/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -0,0 +1,43 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>openutils-web</artifactId>
+ <name>openutils generic web utilities</name>
+ <version>1.0-SNAPSHOT</version>
+ <description />
+ <dependencies>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.13</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/openutils-web/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Copied: trunk/pom.xml (from rev 141, trunk/openutils-parent/pom.xml)
===================================================================
--- trunk/pom.xml (rev 0)
+++ trunk/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
@@ -0,0 +1,135 @@
+<?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>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <packaging>pom</packaging>
+ <version>3</version>
+ <name>openutils</name>
+ <description>openutils parent POM</description>
+ <url>http://openutils.sourceforge.net</url>
+ <issueManagement>
+ <system>sourceforge</system>
+ <url>http://sourceforge.net/tracker/?group_id=150467&atid=784057</url>
+ </issueManagement>
+ <scm>
+ <connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk</connection>
+ <developerConnection>
+ scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk
+ </developerConnection>
+ <url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/trunk</url>
+ </scm>
+ <organization>
+ <name>Openmind</name>
+ <url>http://www.openmindonline.it</url>
+ </organization>
+ <licenses>
+ <license>
+ <name>The Apache Software License, Version 2.0</name>
+ <url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
+ </license>
+ </licenses>
+ <developers>
+ <developer>
+ <id>fgiust</id>
+ <name>Fabrizio Giustina</name>
+ <email>fg...@ap...</email>
+ <organization>openmind</organization>
+ <roles>
+ <role>Project admin and developer</role>
+ </roles>
+ <timezone>+1</timezone>
+ </developer>
+ <developer>
+ <id>ronya_z</id>
+ <name>Daniela Fuscio</name>
+ <email>dan...@op...</email>
+ <organization>openmind</organization>
+ <roles>
+ <role>developer</role>
+ </roles>
+ <timezone>+1</timezone>
+ </developer>
+ <developer>
+ <id>fberar</id>
+ <name>Fabrizio Berardi</name>
+ <email>fab...@op...</email>
+ <organization>openmind</organization>
+ <roles>
+ <role>developer</role>
+ </roles>
+ <timezone>+1</timezone>
+ </developer>
+ </developers>
+ <build>
+ <plugins>
+ <plugin>
+ <artifactId>maven-compiler-plugin</artifactId>
+ <configuration>
+ <source>1.5</source>
+ <target>1.5</target>
+ </configuration>
+ </plugin>
+ <plugin>
+ <artifactId>maven-source-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>attach-sources</id>
+ <goals>
+ <goal>jar</goal>
+ </goals>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
+ </build>
+ <reporting>
+ <plugins>
+ <plugin>
+ <artifactId>maven-project-info-reports-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-changes-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-surefire-report-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-changelog-plugin</artifactId>
+ </plugin>
+ <plugin>
+ <artifactId>maven-jxr-plugin</artifactId>
+ </plugin>
+ </plugins>
+ </reporting>
+ <distributionManagement>
+ <site>
+ <id>sourceforge</id>
+ <name>sourceforge</name>
+ <url>scp://shell.sourceforge.net/home/groups/o/op/openutils/htdocs/</url>
+ </site>
+ <downloadUrl>http://prdownloads.sourceforge.net/150467</downloadUrl>
+ <repository>
+ <id>openutils</id>
+ <url>scp://shell.sourceforge.net/home/groups/o/op/openutils/htdocs/repository/releases</url>
+ </repository>
+ <snapshotRepository>
+ <id>openutils.snapshots</id>
+ <url>scp://shell.sourceforge.net/home/groups/o/op/openutils/htdocs/repository/snapshots</url>
+ </snapshotRepository>
+ </distributionManagement>
+ <modules>
+ <module>openutils-bshd5</module>
+ <module>openutils-deployment</module>
+ <module>openutils-log4j</module>
+ <module>openutils-spring</module>
+ <module>openutils-usermanagement-dataobjects</module>
+ <module>openutils-usermanagement</module>
+ <module>openutils-testing</module>
+ <module>openutils-web</module>
+ <module>openutils-tags-spring</module>
+ <module>openutils-dbmigration</module>
+ <module>openutils-backup</module>
+ </modules>
+</project>
Copied: trunk/src (from rev 109, trunk/openutils-parent/src)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2007-01-04 15:45:46
|
Revision: 145
http://svn.sourceforge.net/openutils/?rev=145&view=rev
Author: fgiust
Date: 2007-01-04 07:45:45 -0800 (Thu, 04 Jan 2007)
Log Message:
-----------
new utility filter
Modified Paths:
--------------
trunk/openutils-spring/pom.xml
trunk/openutils-tags-spring/pom.xml
trunk/openutils-testing/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java
trunk/pom.xml
Added Paths:
-----------
trunk/openutils-web/src/main/java/it/
trunk/openutils-web/src/main/java/it/openutils/
trunk/openutils-web/src/main/java/it/openutils/web/
trunk/openutils-web/src/main/java/it/openutils/web/filters/
trunk/openutils-web/src/main/java/it/openutils/web/filters/NoCachingFilter.java
Property Changed:
----------------
trunk/openutils-backup/
trunk/openutils-bshd5/
trunk/openutils-dbmigration/
trunk/openutils-deployment/
trunk/openutils-log4j/
trunk/openutils-spring/
trunk/openutils-tags-spring/
trunk/openutils-testing/
trunk/openutils-usermanagement/
trunk/openutils-usermanagement-dataobjects/
trunk/openutils-web/
Property changes on: trunk/openutils-backup
___________________________________________________________________
Name: svn:ignore
+ .checkstyle
target
Property changes on: trunk/openutils-bshd5
___________________________________________________________________
Name: svn:ignore
- .wtpmodules
target
.classpath
.project
.settings
+ .wtpmodules
target
.classpath
.project
.settings
.checkstyle
Property changes on: trunk/openutils-dbmigration
___________________________________________________________________
Name: svn:ignore
- target
+ target
.checkstyle
Property changes on: trunk/openutils-deployment
___________________________________________________________________
Name: svn:ignore
- .wtpmodules
target
.classpath
.project
.settings
+ .wtpmodules
target
.classpath
.project
.settings
.checkstyle
Property changes on: trunk/openutils-log4j
___________________________________________________________________
Name: svn:ignore
- .wtpmodules
.project
.classpath
target
.settings
+ .wtpmodules
.project
.classpath
target
.settings
.checkstyle
Property changes on: trunk/openutils-spring
___________________________________________________________________
Name: svn:ignore
- .wtpmodules
.settings
target
.classpath
.project
+ .wtpmodules
.settings
target
.classpath
.project
.checkstyle
Modified: trunk/openutils-spring/pom.xml
===================================================================
--- trunk/openutils-spring/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
+++ trunk/openutils-spring/pom.xml 2007-01-04 15:45:45 UTC (rev 145)
@@ -1,4 +1,5 @@
-<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">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sourceforge.openutils</groupId>
@@ -59,6 +60,12 @@
<version>1.0.1</version>
</dependency>
<dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.2.1.ga</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
<groupId>javax.servlet</groupId>
<artifactId>servlet-api</artifactId>
<version>2.4</version>
Property changes on: trunk/openutils-tags-spring
___________________________________________________________________
Name: svn:ignore
- target
+ target
.checkstyle
Modified: trunk/openutils-tags-spring/pom.xml
===================================================================
--- trunk/openutils-tags-spring/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
+++ trunk/openutils-tags-spring/pom.xml 2007-01-04 15:45:45 UTC (rev 145)
@@ -1,4 +1,5 @@
-<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">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sourceforge.openutils</groupId>
@@ -10,4 +11,12 @@
<name>openutils tags for spring MVC</name>
<version>1.0-SNAPSHOT</version>
<description />
+ <dependencies>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Property changes on: trunk/openutils-testing
___________________________________________________________________
Name: svn:ignore
- .classpath
.project
.settings
target
+ .classpath
.project
.settings
target
.checkstyle
Modified: trunk/openutils-testing/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java
===================================================================
--- trunk/openutils-testing/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2007-01-04 14:15:02 UTC (rev 144)
+++ trunk/openutils-testing/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2007-01-04 15:45:45 UTC (rev 145)
@@ -187,6 +187,7 @@
* Returns the full test name.
* @see junit.framework.TestCase#getName()
*/
+ @Override
public String getName()
{
return ClassUtils.getShortClassName(this.getClass()) + "::" + super.getName();
Property changes on: trunk/openutils-usermanagement
___________________________________________________________________
Name: svn:ignore
- target
.classpath
.project
.settings
db
*.log
+ target
.classpath
.project
.settings
db
*.log
.checkstyle
Property changes on: trunk/openutils-usermanagement-dataobjects
___________________________________________________________________
Name: svn:ignore
- .classpath
.project
.settings
target
+ .classpath
.project
.settings
target
.checkstyle
Property changes on: trunk/openutils-web
___________________________________________________________________
Name: svn:ignore
- target
+ target
.checkstyle
Added: trunk/openutils-web/src/main/java/it/openutils/web/filters/NoCachingFilter.java
===================================================================
--- trunk/openutils-web/src/main/java/it/openutils/web/filters/NoCachingFilter.java (rev 0)
+++ trunk/openutils-web/src/main/java/it/openutils/web/filters/NoCachingFilter.java 2007-01-04 15:45:45 UTC (rev 145)
@@ -0,0 +1,51 @@
+package it.openutils.web.filters;
+
+import java.io.IOException;
+
+import javax.servlet.Filter;
+import javax.servlet.FilterChain;
+import javax.servlet.FilterConfig;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletResponse;
+
+
+/**
+ * Simple webapp filter that disables caching by setting the appropriate headers on the response.
+ * @author fgiust
+ * @version $Id$
+ */
+public class NoCachingFilter implements Filter
+{
+
+ /**
+ * {@inheritDoc}
+ */
+ public void init(FilterConfig filterConfig)
+ {
+ // unused
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void destroy()
+ {
+ // unused
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) throws IOException,
+ ServletException
+ {
+ HttpServletResponse httpResponse = (HttpServletResponse) response;
+
+ httpResponse.setHeader("Cache-Control", "no-cache");
+ httpResponse.setDateHeader("Expires", 0);
+ httpResponse.setHeader("Pragma", "No-cache");
+ chain.doFilter(request, response);
+ }
+}
\ No newline at end of file
Property changes on: trunk/openutils-web/src/main/java/it/openutils/web/filters/NoCachingFilter.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-01-04 14:15:02 UTC (rev 144)
+++ trunk/pom.xml 2007-01-04 15:45:45 UTC (rev 145)
@@ -15,9 +15,7 @@
</issueManagement>
<scm>
<connection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk</connection>
- <developerConnection>
- scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk
- </developerConnection>
+ <developerConnection>scm:svn:https://openutils.svn.sourceforge.net/svnroot/openutils/trunk</developerConnection>
<url>http://openutils.svn.sourceforge.net/viewcvs.cgi/openutils/trunk</url>
</scm>
<organization>
@@ -82,6 +80,32 @@
</execution>
</executions>
</plugin>
+ <plugin>
+ <artifactId>maven-eclipse-plugin</artifactId>
+ <version>2.3</version>
+ <configuration>
+ <wtpversion>1.5</wtpversion>
+ <additionalBuildcommands>
+ <additionalBuildcommand>com.atlassw.tools.eclipse.checkstyle.CheckstyleBuilder</additionalBuildcommand>
+ </additionalBuildcommands>
+ <additionalProjectnatures>
+ <additionalProjectnature>com.atlassw.tools.eclipse.checkstyle.CheckstyleNature</additionalProjectnature>
+ </additionalProjectnatures>
+ <additionalConfig>
+ <file>
+ <name>.checkstyle</name>
+ <content>
+ <![CDATA[<fileset-config file-format-version="1.2.0" simple-config="true">
+ <fileset name="all" enabled="true" check-config-name="project" local="false">
+ <file-match-pattern match-pattern="." include-pattern="true" />
+ </fileset>
+ <filter name="NonSrcDirs" enabled="true" />
+</fileset-config>]]>
+ </content>
+ </file>
+ </additionalConfig>
+ </configuration>
+ </plugin>
</plugins>
</build>
<reporting>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fc...@us...> - 2007-02-01 14:20:22
|
Revision: 167
http://svn.sourceforge.net/openutils/?rev=167&view=rev
Author: fcarone
Date: 2007-02-01 06:20:19 -0800 (Thu, 01 Feb 2007)
Log Message:
-----------
initial project for configuration dataobjects
Modified Paths:
--------------
trunk/pom.xml
Added Paths:
-----------
trunk/openutils-configuration-dataobjects/
trunk/openutils-configuration-dataobjects/pom.xml
trunk/openutils-configuration-dataobjects/src/
trunk/openutils-configuration-dataobjects/src/main/
trunk/openutils-configuration-dataobjects/src/main/java/
trunk/openutils-configuration-dataobjects/src/main/resources/
trunk/openutils-configuration-dataobjects/src/test/
trunk/openutils-configuration-dataobjects/src/test/java/
trunk/openutils-configuration-dataobjects/src/test/resources/
Property changes on: trunk/openutils-configuration-dataobjects
___________________________________________________________________
Name: svn:ignore
+ .settings
target
.checkstyle
.classpath
.project
Added: trunk/openutils-configuration-dataobjects/pom.xml
===================================================================
--- trunk/openutils-configuration-dataobjects/pom.xml (rev 0)
+++ trunk/openutils-configuration-dataobjects/pom.xml 2007-02-01 14:20:19 UTC (rev 167)
@@ -0,0 +1,73 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-configuration-dataobjects</artifactId>
+ <packaging>jar</packaging>
+ <name>openutils-configuration-dataobjects</name>
+ <version>1.1.2-SNAPSHOT</version>
+ <description>Configuration dataobjects</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.2.0.ga</version>
+ <exclusions>
+ <exclusion>
+ <!-- not needed here, just load annotations -->
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.acegisecurity</groupId>
+ <artifactId>acegi-security</artifactId>
+ <version>1.0.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-remoting</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-support</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-collections</groupId>
+ <artifactId>commons-collections</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>oro</groupId>
+ <artifactId>oro</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-codec</groupId>
+ <artifactId>commons-codec</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/openutils-configuration-dataobjects/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-02-01 14:16:10 UTC (rev 166)
+++ trunk/pom.xml 2007-02-01 14:20:19 UTC (rev 167)
@@ -155,5 +155,6 @@
<module>openutils-tags-spring</module>
<module>openutils-dbmigration</module>
<module>openutils-backup</module>
+ <module>openutils-configuration-dataobjects</module>
</modules>
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fc...@us...> - 2007-02-01 15:16:53
|
Revision: 176
http://svn.sourceforge.net/openutils/?rev=176&view=rev
Author: fcarone
Date: 2007-02-01 07:16:39 -0800 (Thu, 01 Feb 2007)
Log Message:
-----------
initial project for configuration services and dao
Modified Paths:
--------------
trunk/openutils-configuration-dataobjects/pom.xml
trunk/pom.xml
Added Paths:
-----------
trunk/openutils-configuration/
trunk/openutils-configuration/pom.xml
trunk/openutils-configuration/src/
trunk/openutils-configuration/src/main/
trunk/openutils-configuration/src/main/java/
trunk/openutils-configuration/src/main/resources/
trunk/openutils-configuration/src/test/
trunk/openutils-configuration/src/test/java/
trunk/openutils-configuration/src/test/resources/
Property changes on: trunk/openutils-configuration
___________________________________________________________________
Name: svn:ignore
+ .settings
target
.checkstyle
.classpath
.project
Added: trunk/openutils-configuration/pom.xml
===================================================================
--- trunk/openutils-configuration/pom.xml (rev 0)
+++ trunk/openutils-configuration/pom.xml 2007-02-01 15:16:39 UTC (rev 176)
@@ -0,0 +1,89 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-configuration</artifactId>
+ <packaging>jar</packaging>
+ <name>openutils-configuration</name>
+ <version>1.0.0</version>
+ <description>Configuration classes</description>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-spring</artifactId>
+ <version>1.0</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-configuration-dataobjects</artifactId>
+ <version>1.0.0</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-bshd5</artifactId>
+ <version>1.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-testing</artifactId>
+ <version>1.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.2.0.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.2.1</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>xerces</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xml-apis</artifactId>
+ <groupId>xml-apis</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.1.2.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>dbunit</groupId>
+ <artifactId>dbunit</artifactId>
+ <version>2.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/openutils-configuration/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/openutils-configuration-dataobjects/pom.xml
===================================================================
--- trunk/openutils-configuration-dataobjects/pom.xml 2007-02-01 15:05:37 UTC (rev 175)
+++ trunk/openutils-configuration-dataobjects/pom.xml 2007-02-01 15:16:39 UTC (rev 176)
@@ -10,7 +10,7 @@
<artifactId>openutils-configuration-dataobjects</artifactId>
<packaging>jar</packaging>
<name>openutils-configuration-dataobjects</name>
- <version>1.1.2-SNAPSHOT</version>
+ <version>1.0.0</version>
<description>Configuration dataobjects</description>
<dependencies>
<dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-02-01 15:05:37 UTC (rev 175)
+++ trunk/pom.xml 2007-02-01 15:16:39 UTC (rev 176)
@@ -156,5 +156,6 @@
<module>openutils-dbmigration</module>
<module>openutils-backup</module>
<module>openutils-configuration-dataobjects</module>
+ <module>openutils-configuration</module>
</modules>
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fc...@us...> - 2007-02-01 17:18:36
|
Revision: 186
http://svn.sourceforge.net/openutils/?rev=186&view=rev
Author: fcarone
Date: 2007-02-01 09:16:27 -0800 (Thu, 01 Feb 2007)
Log Message:
-----------
more changes to pom files
Modified Paths:
--------------
trunk/openutils-configuration/pom.xml
trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java
trunk/openutils-dbmigration/pom.xml
trunk/openutils-deployment/pom.xml
trunk/openutils-testing/pom.xml
trunk/openutils-usermanagement/pom.xml
trunk/pom.xml
Modified: trunk/openutils-configuration/pom.xml
===================================================================
--- trunk/openutils-configuration/pom.xml 2007-02-01 17:14:59 UTC (rev 185)
+++ trunk/openutils-configuration/pom.xml 2007-02-01 17:16:27 UTC (rev 186)
@@ -42,6 +42,12 @@
<version>1.0.1</version>
</dependency>
<dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.13</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
<version>3.2.0.ga</version>
Modified: trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java
===================================================================
--- trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java 2007-02-01 17:14:59 UTC (rev 185)
+++ trunk/openutils-configuration/src/test/java/it/openutils/configuration/dao/ConfigurationCodeDAOTest.java 2007-02-01 17:16:27 UTC (rev 186)
@@ -24,7 +24,7 @@
{
List<ConfigurationCode> all = instance.findAll();
Assert.assertNotNull(all, "Nothing returned by findAll");
- Assert.assertEquals(2, all.size());
+ Assert.assertEquals(all.size(), 2);
}
/**
@@ -83,7 +83,7 @@
{
instance.delete(new Long("1"));
List<ConfigurationCode> all = instance.findAll();
- Assert.assertEquals(1, all.size());
+ Assert.assertEquals(all.size(), 1);
}
}
Modified: trunk/openutils-dbmigration/pom.xml
===================================================================
--- trunk/openutils-dbmigration/pom.xml 2007-02-01 17:14:59 UTC (rev 185)
+++ trunk/openutils-dbmigration/pom.xml 2007-02-01 17:16:27 UTC (rev 186)
@@ -81,7 +81,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.1</version>
+ <version>4.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Modified: trunk/openutils-deployment/pom.xml
===================================================================
--- trunk/openutils-deployment/pom.xml 2007-02-01 17:14:59 UTC (rev 185)
+++ trunk/openutils-deployment/pom.xml 2007-02-01 17:16:27 UTC (rev 186)
@@ -53,7 +53,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.1</version>
+ <version>4.0</version>
<scope>test</scope>
</dependency>
</dependencies>
Modified: trunk/openutils-testing/pom.xml
===================================================================
--- trunk/openutils-testing/pom.xml 2007-02-01 17:14:59 UTC (rev 185)
+++ trunk/openutils-testing/pom.xml 2007-02-01 17:16:27 UTC (rev 186)
@@ -1,60 +1,68 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>net.sourceforge.openutils</groupId>
- <artifactId>openutils</artifactId>
- <version>3</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>openutils-testing</artifactId>
- <name>openutils test utils</name>
- <version>1.1-SNAPSHOT</version>
- <description>openutils test utils</description>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>2.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>2.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-hibernate3</artifactId>
- <version>2.0.1</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.2</version>
- </dependency>
- <dependency>
- <groupId>dbunit</groupId>
- <artifactId>dbunit</artifactId>
- <version>2.1</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <classifier>jdk15</classifier>
- <version>5.1</version>
- <optional>true</optional>
- </dependency>
- </dependencies>
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>openutils-testing</artifactId>
+ <name>openutils test utils</name>
+ <version>1.1-SNAPSHOT</version>
+ <description>openutils test utils</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.13</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-hibernate3</artifactId>
+ <version>2.0.1</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>dbunit</groupId>
+ <artifactId>dbunit</artifactId>
+ <version>2.1</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ <version>5.1</version>
+ <optional>true</optional>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Modified: trunk/openutils-usermanagement/pom.xml
===================================================================
--- trunk/openutils-usermanagement/pom.xml 2007-02-01 17:14:59 UTC (rev 185)
+++ trunk/openutils-usermanagement/pom.xml 2007-02-01 17:16:27 UTC (rev 186)
@@ -103,7 +103,7 @@
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
- <version>3.8.1</version>
+ <version>4.0</version>
<scope>test</scope>
</dependency>
<dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-02-01 17:14:59 UTC (rev 185)
+++ trunk/pom.xml 2007-02-01 17:16:27 UTC (rev 186)
@@ -158,4 +158,25 @@
<module>openutils-configuration-dataobjects</module>
<module>openutils-configuration</module>
</modules>
+ <repositories>
+ <repository>
+ <id>repository.openmindonline.it</id>
+ <name>openmind repository</name>
+ <url>http://repository.openmindonline.it</url>
+ <snapshots>
+ <enabled>false</enabled>
+ </snapshots>
+ </repository>
+ <repository>
+ <id>snapshots.openmindonline.it</id>
+ <name>openmind snapshots repository</name>
+ <url>http://snapshots.openmindonline.it</url>
+ <snapshots>
+ <enabled>true</enabled>
+ </snapshots>
+ <releases>
+ <enabled>false</enabled>
+ </releases>
+ </repository>
+ </repositories>
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fc...@us...> - 2007-02-01 17:43:17
|
Revision: 187
http://svn.sourceforge.net/openutils/?rev=187&view=rev
Author: fcarone
Date: 2007-02-01 09:43:12 -0800 (Thu, 01 Feb 2007)
Log Message:
-----------
added derby dialect with identities
Modified Paths:
--------------
trunk/openutils-configuration/src/test/resources/database.properties
trunk/pom.xml
Added Paths:
-----------
trunk/openutils-configuration/src/test/java/org/
trunk/openutils-configuration/src/test/java/org/hibernate/
trunk/openutils-configuration/src/test/java/org/hibernate/dialect/
trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java
Added: trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java
===================================================================
--- trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java (rev 0)
+++ trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java 2007-02-01 17:43:12 UTC (rev 187)
@@ -0,0 +1,31 @@
+package org.hibernate.dialect;
+
+import org.hibernate.id.IdentityGenerator;
+
+
+/**
+ * Dialetto di derby modificato in modo da permettere l'inserimento in tabelle identity durante i tests. Patch inviata
+ * ad hibernate http://opensource.atlassian.com/projects/hibernate/browse/HHH-2347
+ */
+public class DerbyDialectWithIdentities extends DerbyDialect
+{
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getIdentityColumnString()
+ {
+ return "generated by default as identity"; //$NON-NLS-1
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public Class getNativeIdentifierGeneratorClass()
+ {
+ return IdentityGenerator.class;
+ }
+}
Property changes on: trunk/openutils-configuration/src/test/java/org/hibernate/dialect/DerbyDialectWithIdentities.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Modified: trunk/openutils-configuration/src/test/resources/database.properties
===================================================================
--- trunk/openutils-configuration/src/test/resources/database.properties 2007-02-01 17:16:27 UTC (rev 186)
+++ trunk/openutils-configuration/src/test/resources/database.properties 2007-02-01 17:43:12 UTC (rev 187)
@@ -1,11 +1,6 @@
-# ATTENZIONE: queste propriet\xE0 sono utilizzate solo per gli unit tests
-# i file per la configurazione del db utilizzati dall'applicazione web sono in
-# src/main/web-app/WEB-INF
-
hibernate.connection.driver=org.apache.derby.jdbc.EmbeddedDriver
-hibernate.dialect=org.hibernate.dialect.DerbyDialect
-hibernate.connection.username=ikam
+hibernate.dialect=org.hibernate.dialect.DerbyDialectWithIdentities
+hibernate.connection.username=configuration
hibernate.connection.password=
-hibernate.connection.url=jdbc:derby:target/db/openutils-usermanagement-db-test;create=true
-hibernate.hbm2ddl.auto=update
-
+hibernate.connection.url=jdbc:derby:target/db/configuration-db-test;create=true
+hibernate.hbm2ddl.auto=create
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-02-01 17:16:27 UTC (rev 186)
+++ trunk/pom.xml 2007-02-01 17:43:12 UTC (rev 187)
@@ -158,25 +158,4 @@
<module>openutils-configuration-dataobjects</module>
<module>openutils-configuration</module>
</modules>
- <repositories>
- <repository>
- <id>repository.openmindonline.it</id>
- <name>openmind repository</name>
- <url>http://repository.openmindonline.it</url>
- <snapshots>
- <enabled>false</enabled>
- </snapshots>
- </repository>
- <repository>
- <id>snapshots.openmindonline.it</id>
- <name>openmind snapshots repository</name>
- <url>http://snapshots.openmindonline.it</url>
- <snapshots>
- <enabled>true</enabled>
- </snapshots>
- <releases>
- <enabled>false</enabled>
- </releases>
- </repository>
- </repositories>
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2007-02-05 17:19:17
|
Revision: 197
http://svn.sourceforge.net/openutils/?rev=197&view=rev
Author: fgiust
Date: 2007-02-05 09:18:55 -0800 (Mon, 05 Feb 2007)
Log Message:
-----------
testing module splitted
Modified Paths:
--------------
trunk/openutils-testing-junit/pom.xml
trunk/pom.xml
Added Paths:
-----------
trunk/openutils-testing-junit/
trunk/openutils-testing-testng/
trunk/openutils-testing-testng/pom.xml
trunk/openutils-testing-testng/src/
trunk/openutils-testing-testng/src/main/
trunk/openutils-testing-testng/src/main/java/
Removed Paths:
-------------
trunk/openutils-testing/
Property Changed:
----------------
trunk/openutils-configuration/
Property changes on: trunk/openutils-configuration
___________________________________________________________________
Name: svn:ignore
- .settings
target
.checkstyle
.classpath
.project
+ .settings
target
.checkstyle
.classpath
.project
derby.log
Copied: trunk/openutils-testing-junit (from rev 195, trunk/openutils-testing)
Modified: trunk/openutils-testing-junit/pom.xml
===================================================================
--- trunk/openutils-testing/pom.xml 2007-02-05 08:27:20 UTC (rev 195)
+++ trunk/openutils-testing-junit/pom.xml 2007-02-05 17:18:55 UTC (rev 197)
@@ -8,8 +8,8 @@
<version>3</version>
<relativePath>..</relativePath>
</parent>
- <artifactId>openutils-testing</artifactId>
- <name>openutils test utils</name>
+ <artifactId>openutils-testing-junit</artifactId>
+ <name>openutils test utils (junit)</name>
<version>1.1-SNAPSHOT</version>
<description>openutils test utils</description>
<dependencies>
@@ -46,23 +46,15 @@
<version>2.2</version>
</dependency>
<dependency>
- <groupId>dbunit</groupId>
+ <groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
- <version>2.1</version>
+ <version>2.2</version>
<optional>true</optional>
</dependency>
<dependency>
<groupId>junit</groupId>
<artifactId>junit</artifactId>
<version>3.8.1</version>
- <optional>true</optional>
</dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <classifier>jdk15</classifier>
- <version>5.1</version>
- <optional>true</optional>
- </dependency>
</dependencies>
</project>
\ No newline at end of file
Added: trunk/openutils-testing-testng/pom.xml
===================================================================
--- trunk/openutils-testing-testng/pom.xml (rev 0)
+++ trunk/openutils-testing-testng/pom.xml 2007-02-05 17:18:55 UTC (rev 197)
@@ -0,0 +1,61 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0"
+ xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>openutils-testing-testng</artifactId>
+ <name>openutils test utils (testng)</name>
+ <version>1.1-SNAPSHOT</version>
+ <description>openutils test utils</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.13</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-hibernate3</artifactId>
+ <version>2.0.1</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.dbunit</groupId>
+ <artifactId>dbunit</artifactId>
+ <version>2.2</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ <version>5.1</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Property changes on: trunk/openutils-testing-testng/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/xml
Name: svn:eol-style
+ native
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-02-05 15:10:48 UTC (rev 196)
+++ trunk/pom.xml 2007-02-05 17:18:55 UTC (rev 197)
@@ -150,7 +150,8 @@
<module>openutils-spring</module>
<module>openutils-usermanagement-dataobjects</module>
<module>openutils-usermanagement</module>
- <module>openutils-testing</module>
+ <module>openutils-testing-testng</module>
+ <module>openutils-testing-junit</module>
<module>openutils-web</module>
<module>openutils-tags-spring</module>
<module>openutils-dbmigration</module>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2007-02-05 17:20:29
|
Revision: 198
http://svn.sourceforge.net/openutils/?rev=198&view=rev
Author: fgiust
Date: 2007-02-05 09:20:24 -0800 (Mon, 05 Feb 2007)
Log Message:
-----------
move testng implementation
Added Paths:
-----------
trunk/openutils-testing-testng/src/main/java/it/
trunk/openutils-testing-testng/src/main/java/it/openutils/
trunk/openutils-testing-testng/src/main/java/it/openutils/testing/
trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/
Removed Paths:
-------------
trunk/openutils-testing-junit/src/main/java/it/openutils/testing/testng/
Copied: trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng (from rev 197, trunk/openutils-testing-junit/src/main/java/it/openutils/testing/testng)
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2007-02-05 17:23:32
|
Revision: 200
http://svn.sourceforge.net/openutils/?rev=200&view=rev
Author: fgiust
Date: 2007-02-05 09:23:33 -0800 (Mon, 05 Feb 2007)
Log Message:
-----------
rename configuration module to configuration-services
Modified Paths:
--------------
trunk/openutils-configuration-services/pom.xml
trunk/pom.xml
Added Paths:
-----------
trunk/openutils-configuration-services/
Removed Paths:
-------------
trunk/openutils-configuration/
Property Changed:
----------------
trunk/openutils-testing-testng/
Copied: trunk/openutils-configuration-services (from rev 198, trunk/openutils-configuration)
Modified: trunk/openutils-configuration-services/pom.xml
===================================================================
--- trunk/openutils-configuration/pom.xml 2007-02-05 17:20:24 UTC (rev 198)
+++ trunk/openutils-configuration-services/pom.xml 2007-02-05 17:23:33 UTC (rev 200)
@@ -8,11 +8,11 @@
<relativePath>..</relativePath>
</parent>
<groupId>net.sourceforge.openutils</groupId>
- <artifactId>openutils-configuration</artifactId>
+ <artifactId>openutils-configuration-services</artifactId>
<packaging>jar</packaging>
<name>openutils-configuration</name>
<version>1.0-SNAPSHOT</version>
- <description>Configuration classes</description>
+ <description>Configuration services</description>
<dependencies>
<dependency>
<groupId>net.sourceforge.openutils</groupId>
@@ -80,9 +80,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>dbunit</groupId>
+ <groupId>org.dbunit</groupId>
<artifactId>dbunit</artifactId>
- <version>2.1</version>
+ <version>2.2</version>
<scope>test</scope>
</dependency>
<dependency>
Property changes on: trunk/openutils-testing-testng
___________________________________________________________________
Name: svn:ignore
+ .checkstyle
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-02-05 17:22:02 UTC (rev 199)
+++ trunk/pom.xml 2007-02-05 17:23:33 UTC (rev 200)
@@ -157,6 +157,6 @@
<module>openutils-dbmigration</module>
<module>openutils-backup</module>
<module>openutils-configuration-dataobjects</module>
- <module>openutils-configuration</module>
+ <module>openutils-configuration-services</module>
</modules>
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2007-02-05 17:40:46
|
Revision: 201
http://svn.sourceforge.net/openutils/?rev=201&view=rev
Author: fgiust
Date: 2007-02-05 09:40:35 -0800 (Mon, 05 Feb 2007)
Log Message:
-----------
configurable deferred close
Modified Paths:
--------------
trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java
trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java
Property Changed:
----------------
trunk/openutils-testing-testng/
Modified: trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java
===================================================================
--- trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2007-02-05 17:23:33 UTC (rev 200)
+++ trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2007-02-05 17:40:35 UTC (rev 201)
@@ -16,6 +16,7 @@
package it.openutils.testing.junit;
import java.io.InputStream;
+import java.util.Map;
import javax.sql.DataSource;
@@ -53,8 +54,18 @@
protected static IDataSet truncateDataSet;
/**
+ * Should use deferred close emulating the spring OpenSessionInView filter? Default is <code>true</code>
+ * @return <code>true</code> if deferred close should be used
+ */
+ protected boolean mimicSessionFilter()
+ {
+ return true;
+ }
+
+ /**
* {@inheritDoc}
*/
+ @SuppressWarnings("unchecked")
@Override
protected void setUp() throws Exception
{
@@ -139,13 +150,18 @@
}
// mimic the Spring OpenSessionInViewFilter
- this.sessionFactory = (SessionFactory) ctx.getBean("sessionFactory");
+ if (mimicSessionFilter())
+ {
+ Map<String, SessionFactory> sfbeans = ctx.getBeansOfType(SessionFactory.class);
+ if (sfbeans.isEmpty())
+ {
+ fail("No bean of type org.hibernate.SessionFactory found in spring context");
+ }
+ this.sessionFactory = sfbeans.get(sfbeans.keySet().iterator().next());
- // SessionFactoryUtils.getSession(sessionFactory, true).setFlushMode(FlushMode.NEVER);
- SessionFactoryUtils.initDeferredClose(this.sessionFactory);
+ SessionFactoryUtils.initDeferredClose(this.sessionFactory);
+ }
- // @todo find a way to disable cache
- // this.sessionFactory.openSession().setCacheMode(CacheMode.IGNORE);
}
/**
@@ -154,8 +170,11 @@
@Override
protected void tearDown() throws Exception
{
- // close open hibernate sessions, mimic the OpenSessionInViewFilter
- SessionFactoryUtils.processDeferredClose(this.sessionFactory);
+ if (mimicSessionFilter())
+ {
+ // close open hibernate sessions, mimic the OpenSessionInViewFilter
+ SessionFactoryUtils.processDeferredClose(this.sessionFactory);
+ }
// regenerate db initial state
String datesetFileName = "/initial-load.xml";
@@ -197,7 +216,7 @@
* return the current Hibernate SessionFactory
* @return SessionFactory object
*/
- public SessionFactory getSessionFactory()
+ protected SessionFactory getSessionFactory()
{
return sessionFactory;
}
Property changes on: trunk/openutils-testing-testng
___________________________________________________________________
Name: svn:ignore
- .checkstyle
+ .checkstyle
target
Modified: trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java
===================================================================
--- trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java 2007-02-05 17:23:33 UTC (rev 200)
+++ trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java 2007-02-05 17:40:35 UTC (rev 201)
@@ -22,6 +22,7 @@
import java.io.OutputStream;
import java.sql.SQLException;
import java.text.MessageFormat;
+import java.util.Map;
import javax.sql.DataSource;
@@ -41,6 +42,9 @@
import org.dbunit.dataset.filter.SequenceTableFilter;
import org.dbunit.dataset.xml.XmlDataSet;
import org.dbunit.operation.DatabaseOperation;
+import org.hibernate.SessionFactory;
+import org.springframework.orm.hibernate3.SessionFactoryUtils;
+import org.testng.Assert;
import org.testng.annotations.AfterMethod;
import org.testng.annotations.BeforeMethod;
import org.testng.annotations.Test;
@@ -68,6 +72,11 @@
protected static IDataSet truncateDataSet;
/**
+ * Hibernate session factory.
+ */
+ private SessionFactory sessionFactory;
+
+ /**
* Optional schema (needed for ORACLE).
* @return <code>null</code>
*/
@@ -77,12 +86,35 @@
}
/**
+ * Should use deferred close emulating the spring OpenSessionInView filter? Default is <code>true</code>
+ * @return <code>true</code> if deferred close should be used
+ */
+ protected boolean mimicSessionFilter()
+ {
+ return true;
+ }
+
+ /**
* Setup the Database before running the test method.
* @throws Exception Any exception.
*/
+ @SuppressWarnings("unchecked")
@BeforeMethod
protected void setUpDbUnit() throws Exception
{
+ // mimic the Spring OpenSessionInViewFilter
+ if (mimicSessionFilter())
+ {
+ Map<String, SessionFactory> sfbeans = ctx.getBeansOfType(SessionFactory.class);
+ if (sfbeans.isEmpty())
+ {
+ Assert.fail("No bean of type org.hibernate.SessionFactory found in spring context");
+ }
+ this.sessionFactory = sfbeans.get(sfbeans.keySet().iterator().next());
+
+ SessionFactoryUtils.initDeferredClose(this.sessionFactory);
+ }
+
// check for xml
IDataSet dataSet = loadDataSet(getDataFileName("xml"));
@@ -128,6 +160,11 @@
@AfterMethod
protected void tearDownDbUnit() throws Exception
{
+ if (mimicSessionFilter())
+ {
+ // close open hibernate sessions, mimic the OpenSessionInViewFilter
+ SessionFactoryUtils.processDeferredClose(this.sessionFactory);
+ }
// regenerate db initial state
String datesetFileName = "/initial-load.xml";
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2007-02-05 21:42:55
|
Revision: 210
http://svn.sourceforge.net/openutils/?rev=210&view=rev
Author: fgiust
Date: 2007-02-05 13:42:44 -0800 (Mon, 05 Feb 2007)
Log Message:
-----------
cleanup deps
Modified Paths:
--------------
trunk/openutils-bshd5/pom.xml
trunk/openutils-configuration-services/pom.xml
Modified: trunk/openutils-bshd5/pom.xml
===================================================================
--- trunk/openutils-bshd5/pom.xml 2007-02-05 21:38:50 UTC (rev 209)
+++ trunk/openutils-bshd5/pom.xml 2007-02-05 21:42:44 UTC (rev 210)
@@ -17,6 +17,11 @@
<version>2.0.1</version>
</dependency>
<dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>2.0.1</version>
+ </dependency>
+ <dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate</artifactId>
<version>3.2.1.ga</version>
Modified: trunk/openutils-configuration-services/pom.xml
===================================================================
--- trunk/openutils-configuration-services/pom.xml 2007-02-05 21:38:50 UTC (rev 209)
+++ trunk/openutils-configuration-services/pom.xml 2007-02-05 21:42:44 UTC (rev 210)
@@ -28,18 +28,18 @@
<dependency>
<groupId>net.sourceforge.openutils</groupId>
<artifactId>openutils-bshd5</artifactId>
- <version>1.0.2</version>
+ <version>1.0.4</version>
</dependency>
<dependency>
<groupId>net.sourceforge.openutils</groupId>
- <artifactId>openutils-testing</artifactId>
- <version>1.0</version>
+ <artifactId>openutils-testing-testng</artifactId>
+ <version>1.1</version>
<scope>test</scope>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.0.1</version>
+ <version>1.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
@@ -74,6 +74,12 @@
<version>2.2</version>
</dependency>
<dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-aop</artifactId>
+ <version>2.0.1</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
<version>10.1.2.1</version>
@@ -85,12 +91,5 @@
<version>2.2</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <version>5.1</version>
- <classifier>jdk15</classifier>
- <scope>test</scope>
- </dependency>
</dependencies>
</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: <fg...@us...> - 2007-02-21 17:22:21
|
Revision: 279
http://svn.sourceforge.net/openutils/?rev=279&view=rev
Author: fgiust
Date: 2007-02-21 09:22:17 -0800 (Wed, 21 Feb 2007)
Log Message:
-----------
update commons-lang and slf4j
Modified Paths:
--------------
trunk/openutils-backup/pom.xml
trunk/openutils-bshd5/pom.xml
trunk/openutils-configuration-dataobjects/pom.xml
trunk/openutils-configuration-services/pom.xml
trunk/openutils-dbmigration/pom.xml
trunk/openutils-deployment/pom.xml
trunk/openutils-spring/pom.xml
trunk/openutils-tags-spring/pom.xml
trunk/openutils-testing-junit/pom.xml
trunk/openutils-testing-testng/pom.xml
trunk/openutils-usermanagement/pom.xml
trunk/openutils-usermanagement-dataobjects/pom.xml
trunk/openutils-web/pom.xml
Modified: trunk/openutils-backup/pom.xml
===================================================================
--- trunk/openutils-backup/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-backup/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -1,4 +1,5 @@
-<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">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sourceforge.openutils</groupId>
@@ -14,12 +15,12 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.0.1</version>
+ <version>1.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
Modified: trunk/openutils-bshd5/pom.xml
===================================================================
--- trunk/openutils-bshd5/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-bshd5/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -34,12 +34,12 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.0.1</version>
+ <version>1.2</version>
</dependency>
<dependency>
<groupId>junit</groupId>
Modified: trunk/openutils-configuration-dataobjects/pom.xml
===================================================================
--- trunk/openutils-configuration-dataobjects/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-configuration-dataobjects/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -28,7 +28,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
</dependencies>
</project>
\ No newline at end of file
Modified: trunk/openutils-configuration-services/pom.xml
===================================================================
--- trunk/openutils-configuration-services/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-configuration-services/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -71,7 +71,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
@@ -82,7 +82,7 @@
<dependency>
<groupId>org.apache.derby</groupId>
<artifactId>derby</artifactId>
- <version>10.1.2.1</version>
+ <version>10.2.2.0</version>
<scope>test</scope>
</dependency>
<dependency>
Modified: trunk/openutils-dbmigration/pom.xml
===================================================================
--- trunk/openutils-dbmigration/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-dbmigration/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -14,7 +14,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>commons-io</groupId>
Modified: trunk/openutils-deployment/pom.xml
===================================================================
--- trunk/openutils-deployment/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-deployment/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -14,7 +14,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
Modified: trunk/openutils-spring/pom.xml
===================================================================
--- trunk/openutils-spring/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-spring/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -46,7 +46,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
Modified: trunk/openutils-tags-spring/pom.xml
===================================================================
--- trunk/openutils-tags-spring/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-tags-spring/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -31,7 +31,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>commons-beanutils</groupId>
Modified: trunk/openutils-testing-junit/pom.xml
===================================================================
--- trunk/openutils-testing-junit/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-testing-junit/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -14,7 +14,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.0.1</version>
+ <version>1.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
@@ -41,7 +41,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>org.dbunit</groupId>
Modified: trunk/openutils-testing-testng/pom.xml
===================================================================
--- trunk/openutils-testing-testng/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-testing-testng/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -14,7 +14,7 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.0.1</version>
+ <version>1.2</version>
</dependency>
<dependency>
<groupId>log4j</groupId>
@@ -41,7 +41,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>org.dbunit</groupId>
Modified: trunk/openutils-usermanagement/pom.xml
===================================================================
--- trunk/openutils-usermanagement/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-usermanagement/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -39,12 +39,12 @@
<dependency>
<groupId>org.slf4j</groupId>
<artifactId>slf4j-log4j12</artifactId>
- <version>1.0.1</version>
+ <version>1.2</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
<artifactId>hibernate-annotations</artifactId>
- <version>3.2.0.ga</version>
+ <version>3.2.1.ga</version>
</dependency>
<dependency>
<groupId>commons-dbcp</groupId>
@@ -65,7 +65,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>org.acegisecurity</groupId>
Modified: trunk/openutils-usermanagement-dataobjects/pom.xml
===================================================================
--- trunk/openutils-usermanagement-dataobjects/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-usermanagement-dataobjects/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -28,7 +28,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>org.acegisecurity</groupId>
Modified: trunk/openutils-web/pom.xml
===================================================================
--- trunk/openutils-web/pom.xml 2007-02-19 23:28:57 UTC (rev 278)
+++ trunk/openutils-web/pom.xml 2007-02-21 17:22:17 UTC (rev 279)
@@ -14,7 +14,7 @@
<dependency>
<groupId>commons-lang</groupId>
<artifactId>commons-lang</artifactId>
- <version>2.2</version>
+ <version>2.3</version>
</dependency>
<dependency>
<groupId>org.slf4j</groupId>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2007-05-23 17:59:53
|
Revision: 328
http://svn.sourceforge.net/openutils/?rev=328&view=rev
Author: fgiust
Date: 2007-05-23 10:59:52 -0700 (Wed, 23 May 2007)
Log Message:
-----------
make default table filter overridable
Modified Paths:
--------------
trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java
trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java
Modified: trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java
===================================================================
--- trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2007-05-04 16:49:46 UTC (rev 327)
+++ trunk/openutils-testing-junit/src/main/java/it/openutils/testing/junit/DbUnitTestCase.java 2007-05-23 17:59:52 UTC (rev 328)
@@ -21,12 +21,15 @@
import javax.sql.DataSource;
import org.apache.commons.lang.ClassUtils;
+import org.apache.commons.lang.StringUtils;
import org.dbunit.database.DatabaseConnection;
import org.dbunit.database.DatabaseSequenceFilter;
import org.dbunit.database.IDatabaseConnection;
+import org.dbunit.dataset.DataSetException;
import org.dbunit.dataset.FilteredDataSet;
import org.dbunit.dataset.IDataSet;
import org.dbunit.dataset.excel.XlsDataSet;
+import org.dbunit.dataset.filter.AbstractTableFilter;
import org.dbunit.dataset.filter.ITableFilter;
import org.dbunit.dataset.filter.SequenceTableFilter;
import org.dbunit.dataset.xml.XmlDataSet;
@@ -63,6 +66,27 @@
}
/**
+ * Returns the table filter that will be used to exclude certain tables from sort/deletion. This may be overridden
+ * by subclasses, and is needed when tables have circular references (not handled by dbunit DatabaseSequenceFilter)
+ * @return an <code>ITableFilter</code>
+ */
+ protected ITableFilter getTableFilter()
+ {
+ return new AbstractTableFilter()
+ {
+
+ @Override
+ public boolean isValidName(String tableName) throws DataSetException
+ {
+ // default excludes:
+ // $ = oracle recycle bin tables
+ // JBPM = jbpm tables, with circular references
+ return !StringUtils.contains(tableName, "$") && !StringUtils.contains(tableName, "JBPM");
+ }
+ };
+ }
+
+ /**
* {@inheritDoc}
*/
@SuppressWarnings("unchecked")
@@ -118,8 +142,12 @@
{
log.debug("Generating sorted dataset for initial cleanup");
IDataSet unsortedTruncateDataSet = connection.createDataSet();
- ITableFilter filter = new DatabaseSequenceFilter(connection);
+
+ ITableFilter filter = new DatabaseSequenceFilter(connection, new FilteredDataSet(
+ getTableFilter(),
+ unsortedTruncateDataSet).getTableNames());
truncateDataSet = new FilteredDataSet(filter, unsortedTruncateDataSet);
+ truncateDataSet = new FilteredDataSet(getTableFilter(), truncateDataSet);
log.debug("Sorted dataset generated");
}
Modified: trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java
===================================================================
--- trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java 2007-05-04 16:49:46 UTC (rev 327)
+++ trunk/openutils-testing-testng/src/main/java/it/openutils/testing/testng/DbUnitTestCase.java 2007-05-23 17:59:52 UTC (rev 328)
@@ -95,6 +95,27 @@
}
/**
+ * Returns the table filter that will be used to exclude certain tables from sort/deletion. This may be overridden
+ * by subclasses, and is needed when tables have circular references (not handled by dbunit DatabaseSequenceFilter)
+ * @return an <code>ITableFilter</code>
+ */
+ protected ITableFilter getTableFilter()
+ {
+ return new AbstractTableFilter()
+ {
+
+ @Override
+ public boolean isValidName(String tableName) throws DataSetException
+ {
+ // default excludes:
+ // $ = oracle recycle bin tables
+ // JBPM = jbpm tables, with circular references
+ return !StringUtils.contains(tableName, "$") && !StringUtils.contains(tableName, "JBPM");
+ }
+ };
+ }
+
+ /**
* Setup the Database before running the test method.
* @throws Exception Any exception.
*/
@@ -198,19 +219,11 @@
log.debug("Generating sorted dataset for initial cleanup");
IDataSet unsortedTruncateDataSet = connection.createDataSet();
- ITableFilter filter = new DatabaseSequenceFilter(connection);
+ ITableFilter filter = new DatabaseSequenceFilter(connection, new FilteredDataSet(
+ getTableFilter(),
+ unsortedTruncateDataSet).getTableNames());
truncateDataSet = new FilteredDataSet(filter, unsortedTruncateDataSet);
-
- truncateDataSet = new FilteredDataSet(new AbstractTableFilter()
- {
-
- @Override
- public boolean isValidName(String tableName) throws DataSetException
- {
- return !StringUtils.contains(tableName, "$");
- }
- }, truncateDataSet);
-
+ truncateDataSet = new FilteredDataSet(getTableFilter(), truncateDataSet);
log.debug("Sorted dataset generated");
}
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2007-06-30 15:04:54
|
Revision: 341
http://svn.sourceforge.net/openutils/?rev=341&view=rev
Author: fgiust
Date: 2007-06-30 08:04:52 -0700 (Sat, 30 Jun 2007)
Log Message:
-----------
initial import
Added Paths:
-----------
trunk/openutils-magnolia2mvcbridge/
trunk/openutils-magnolia2mvcbridge/pom.xml
trunk/openutils-magnolia2mvcbridge/src/
trunk/openutils-magnolia2mvcbridge/src/main/
trunk/openutils-magnolia2mvcbridge/src/main/java/
trunk/openutils-magnolia2mvcbridge/src/main/java/it/
trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/
trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/
trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/ContentBridgeTag.java
trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/MagnoliaMultipartResolver.java
trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/RewriteVarsThreadLocal.java
trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/UrlFunctions.java
trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/WrappedResponse.java
trunk/openutils-magnolia2mvcbridge/src/main/resources/
trunk/openutils-magnolia2mvcbridge/src/main/resources/META-INF/
trunk/openutils-magnolia2mvcbridge/src/main/resources/META-INF/magnolia-bridge-tags.tld
trunk/openutils-magnolia2mvcbridge/src/test/
trunk/openutils-magnolia2mvcbridge/src/test/java/
trunk/openutils-magnolia2mvcbridge/src/test/java/it/
trunk/openutils-magnolia2mvcbridge/src/test/java/it/openutils/
trunk/openutils-magnolia2mvcbridge/src/test/java/it/openutils/mvcbridge/
trunk/openutils-magnolia2mvcbridge/src/test/java/it/openutils/mvcbridge/ContentBridgeTagTest.java
Property changes on: trunk/openutils-magnolia2mvcbridge
___________________________________________________________________
Name: svn:ignore
+ target
.checkstyle
.classpath
.project
.settings
Added: trunk/openutils-magnolia2mvcbridge/pom.xml
===================================================================
--- trunk/openutils-magnolia2mvcbridge/pom.xml (rev 0)
+++ trunk/openutils-magnolia2mvcbridge/pom.xml 2007-06-30 15:04:52 UTC (rev 341)
@@ -0,0 +1,71 @@
+<?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">
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>jar</packaging>
+ <groupId>it.openmindonline.magnolia</groupId>
+ <artifactId>openutils-magnolia2mvcbridge</artifactId>
+ <name>openutils-magnolia2mvcbridge</name>
+ <version>1.0-SNAPSHOT</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>2.0.6</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>2.0.6</version>
+ </dependency>
+ <dependency>
+ <groupId>info.magnolia</groupId>
+ <artifactId>magnolia-core</artifactId>
+ <version>3.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>info.magnolia</groupId>
+ <artifactId>magnolia-jaas</artifactId>
+ <version>3.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>opensymphony</groupId>
+ <artifactId>sitemesh</artifactId>
+ <version>2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ <version>5.1</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+</project>
Property changes on: trunk/openutils-magnolia2mvcbridge/pom.xml
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/ContentBridgeTag.java
===================================================================
--- trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/ContentBridgeTag.java (rev 0)
+++ trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/ContentBridgeTag.java 2007-06-30 15:04:52 UTC (rev 341)
@@ -0,0 +1,193 @@
+/*
+ * Copyright 2007 Fabrizio Giustina.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package it.openutils.mvcbridge;
+
+import info.magnolia.cms.beans.config.ContentRepository;
+import info.magnolia.cms.security.AccessManager;
+import info.magnolia.cms.security.Authenticator;
+import info.magnolia.cms.security.Permission;
+import info.magnolia.cms.security.SecureURI;
+import info.magnolia.context.MgnlContext;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.jsp.JspException;
+import javax.servlet.jsp.JspWriter;
+import javax.servlet.jsp.tagext.TagSupport;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import com.opensymphony.module.sitemesh.Page;
+import com.opensymphony.module.sitemesh.parser.FastPageParser;
+
+
+/**
+ * @author fgiust
+ * @version $Id$
+ */
+public class ContentBridgeTag extends TagSupport
+{
+
+ /**
+ * Stable serialVersionUID.
+ */
+ private static final long serialVersionUID = 42L;
+
+ /**
+ * Logger.
+ */
+ private Logger log = LoggerFactory.getLogger(ContentBridgeTag.class);
+
+ /**
+ * Url to be included.
+ */
+ private String url;
+
+ /**
+ * Sets the url.
+ * @param url the url to set
+ */
+ public void setUrl(String url)
+ {
+ this.url = url;
+ }
+
+ protected String makeUrl(String contextPath, String requestURI, String actionParam, String baseActionUrl)
+ {
+
+ StringBuffer currentUrl = new StringBuffer();
+ currentUrl.append(requestURI);
+
+ String actionUrl = actionParam;
+
+ if (actionUrl != null && !actionUrl.startsWith("/"))
+ {
+
+ if (!StringUtils.equals(actionUrl, baseActionUrl) && StringUtils.contains(baseActionUrl, "/"))
+ {
+ actionUrl = StringUtils.substringBeforeLast(baseActionUrl, "/") + "/" + actionUrl;
+ }
+
+ if (!actionUrl.startsWith("/"))
+ {
+ actionUrl = "/" + actionUrl;
+ }
+ }
+
+ RewriteVarsThreadLocal.setContextPath(contextPath);
+ RewriteVarsThreadLocal.setCurrentPageUrl(currentUrl.toString());
+
+ return actionUrl;
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public int doStartTag() throws JspException
+ {
+
+ HttpServletRequest request = (HttpServletRequest) pageContext.getRequest();
+ HttpServletResponse response = (HttpServletResponse) pageContext.getResponse();
+
+ String requestURI = (String) request.getAttribute("javax.servlet.forward.request_uri");
+
+ if (requestURI == null)
+ {
+ requestURI = request.getRequestURI();
+ }
+
+ String actionParam = url;
+
+ if (request.getParameter("_action") != null)
+ {
+ actionParam = request.getParameter("_action");
+ }
+
+ if (requestURI.startsWith("//")) // buggy url set in javax.servlet.forward.request_uri?
+ {
+ requestURI = requestURI.substring(1);
+ }
+
+ String actionUrl = makeUrl(request.getContextPath(), requestURI, actionParam, url);
+
+ if (!StringUtils.contains(actionUrl, "?"))
+ {
+ actionUrl = StringUtils.replaceOnce(actionUrl, "&", "?");
+ }
+
+ if (SecureURI.isProtected(actionUrl))
+ {
+ AccessManager am = MgnlContext.getAccessManager(ContentRepository.WEBSITE);
+ if (!Authenticator.isAuthenticated(request) || !am.isGranted(actionUrl, Permission.READ))
+ {
+ log.info("User not allowed to read path {}", actionUrl);
+ return super.doStartTag();
+ }
+ }
+
+ RequestDispatcher rd = pageContext.getServletConfig().getServletContext().getRequestDispatcher(actionUrl);
+
+ WrappedResponse wresponse = new WrappedResponse(response);
+ JspWriter out = pageContext.getOut();
+ try
+ {
+ rd.include(request, wresponse);
+ }
+ catch (ServletException e)
+ {
+ log.error("error including " + actionUrl + ": " + e.getMessage(), e);
+ e.printStackTrace(new PrintWriter(out));
+ }
+ catch (IOException e)
+ {
+ log.error("error including " + actionUrl + ": " + e.getMessage(), e);
+ e.printStackTrace(new PrintWriter(out));
+ }
+ finally
+ {
+ RewriteVarsThreadLocal.setCurrentPageUrl(null);
+ RewriteVarsThreadLocal.setContextPath(null);
+ }
+
+ char[] content = wresponse.getContent();
+
+ if (content != null && content.length > 0)
+ {
+ FastPageParser parser = new FastPageParser();
+ try
+ {
+ Page page = parser.parse(content);
+ page.writeBody(out);
+ }
+ catch (IOException e)
+ {
+ log.error("error parsing " + actionUrl + ": " + e.getMessage(), e);
+ e.printStackTrace(new PrintWriter(out));
+ }
+ }
+
+ return super.doStartTag();
+ }
+}
Property changes on: trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/ContentBridgeTag.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/MagnoliaMultipartResolver.java
===================================================================
--- trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/MagnoliaMultipartResolver.java (rev 0)
+++ trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/MagnoliaMultipartResolver.java 2007-06-30 15:04:52 UTC (rev 341)
@@ -0,0 +1,219 @@
+/*
+ * Copyright 2007 Fabrizio Giustina.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package it.openutils.mvcbridge;
+
+import info.magnolia.cms.beans.runtime.Document;
+import info.magnolia.cms.beans.runtime.MultipartForm;
+
+import java.io.File;
+import java.io.IOException;
+import java.io.InputStream;
+import java.util.HashMap;
+import java.util.Map;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+
+import org.apache.commons.fileupload.FileItemFactory;
+import org.apache.commons.fileupload.FileUpload;
+import org.apache.commons.fileupload.FileUploadBase;
+import org.apache.commons.fileupload.servlet.ServletFileUpload;
+import org.apache.commons.fileupload.servlet.ServletRequestContext;
+import org.apache.commons.io.FileUtils;
+import org.apache.commons.io.IOUtils;
+import org.springframework.web.context.ServletContextAware;
+import org.springframework.web.multipart.MultipartException;
+import org.springframework.web.multipart.MultipartFile;
+import org.springframework.web.multipart.MultipartHttpServletRequest;
+import org.springframework.web.multipart.MultipartResolver;
+import org.springframework.web.multipart.commons.CommonsFileUploadSupport;
+import org.springframework.web.multipart.commons.CommonsMultipartFile;
+import org.springframework.web.multipart.support.DefaultMultipartHttpServletRequest;
+import org.springframework.web.util.WebUtils;
+
+
+/**
+ * Spring MagnoliaMultipartResolver which interacts with magnolia.
+ * @author fgiust
+ * @version $Id: $
+ */
+public class MagnoliaMultipartResolver extends CommonsFileUploadSupport
+ implements
+ MultipartResolver,
+ ServletContextAware
+{
+
+ /**
+ * Constructor for use as bean. Determines the servlet container's temporary directory via the ServletContext passed
+ * in as through the ServletContextAware interface (typically by a WebApplicationContext).
+ * @see #setServletContext
+ * @see org.springframework.web.context.ServletContextAware
+ * @see org.springframework.web.context.WebApplicationContext
+ */
+ public MagnoliaMultipartResolver()
+ {
+ super();
+ }
+
+ /**
+ * Constructor for standalone usage. Determines the servlet container's temporary directory via the given
+ * ServletContext.
+ * @param servletContext the ServletContext to use
+ */
+ public MagnoliaMultipartResolver(ServletContext servletContext)
+ {
+ this();
+ setServletContext(servletContext);
+ }
+
+ /**
+ * Initialize the underlying <code>org.apache.commons.fileupload.servlet.ServletFileUpload</code> instance. Can be
+ * overridden to use a custom subclass, e.g. for testing purposes.
+ * @param fileItemFactory the Commons FileItemFactory to use
+ * @return the new ServletFileUpload instance
+ */
+ @Override
+ protected FileUpload newFileUpload(FileItemFactory fileItemFactory)
+ {
+ return new ServletFileUpload(fileItemFactory);
+ }
+
+ public void setServletContext(ServletContext servletContext)
+ {
+ if (!isUploadTempDirSpecified())
+ {
+ getFileItemFactory().setRepository(WebUtils.getTempDir(servletContext));
+ }
+ }
+
+ public boolean isMultipart(HttpServletRequest request)
+ {
+ return FileUploadBase.isMultipartContent(new ServletRequestContext(request));
+ }
+
+ @SuppressWarnings("unchecked")
+ public MultipartHttpServletRequest resolveMultipart(HttpServletRequest request) throws MultipartException
+ {
+ // already parsed by magnolia
+ MultipartForm form = (MultipartForm) request.getAttribute("multipartform");
+
+ Map<String, Document> documents = form.getDocuments();
+ Map<String, MultipartFile> files = new HashMap<String, MultipartFile>();
+
+ for (String key : documents.keySet())
+ {
+ Document doc = documents.get(key);
+ files.put(key, new DocWrapperMultipartFile(doc));
+ }
+
+ Map<String, String> singleParamters = form.getParameters();
+ Map<String, String[]> multiParamters = new HashMap<String, String[]>();
+
+ for (String key : singleParamters.keySet())
+ {
+ multiParamters.put(key, new String[]{singleParamters.get(key) });
+ }
+
+ return new DefaultMultipartHttpServletRequest(request, files, multiParamters);
+
+ }
+
+ public static class DocWrapperMultipartFile implements MultipartFile
+ {
+
+ Document document;
+
+ public DocWrapperMultipartFile(Document document)
+ {
+ this.document = document;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public byte[] getBytes() throws IOException
+ {
+ return IOUtils.toByteArray(getInputStream());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getContentType()
+ {
+ return document.getType();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public InputStream getInputStream() throws IOException
+ {
+ return document.getStream();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getName()
+ {
+ return document.getFileNameWithExtension();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public String getOriginalFilename()
+ {
+ return document.getFileNameWithExtension();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public long getSize()
+ {
+ return document.getLength();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public boolean isEmpty()
+ {
+ return document.getLength() == 0;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void transferTo(File dest) throws IOException, IllegalStateException
+ {
+ FileUtils.copyFile(document.getFile(), dest);
+ }
+
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ public void cleanupMultipart(MultipartHttpServletRequest request)
+ {
+ // nothing to do
+
+ }
+
+}
Property changes on: trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/MagnoliaMultipartResolver.java
___________________________________________________________________
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/RewriteVarsThreadLocal.java
===================================================================
--- trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/RewriteVarsThreadLocal.java (rev 0)
+++ trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/RewriteVarsThreadLocal.java 2007-06-30 15:04:52 UTC (rev 341)
@@ -0,0 +1,73 @@
+/*
+ * Copyright 2007 Fabrizio Giustina.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package it.openutils.mvcbridge;
+
+/**
+ * @author fgiust
+ * @version $Id$
+ */
+public final class RewriteVarsThreadLocal
+{
+
+ private static ThreadLocal<String> currentPageUrl = new ThreadLocal<String>();
+
+ private static ThreadLocal<String> contextPath = new ThreadLocal<String>();
+
+ /**
+ * Don't instantiate.
+ */
+ private RewriteVarsThreadLocal()
+ {
+ // unused
+ }
+
+ /**
+ * Returns the currentPageUrl.
+ * @return the currentPageUrl
+ */
+ public static String getCurrentPageUrl()
+ {
+ return currentPageUrl.get();
+ }
+
+ /**
+ * Sets the currentPageUrl.
+ * @param url the currentPageUrl to set
+ */
+ public static void setCurrentPageUrl(String url)
+ {
+ currentPageUrl.set(url);
+ }
+
+ /**
+ * Returns the contextPath.
+ * @return the contextPath
+ */
+ public static String getContextPath()
+ {
+ return contextPath.get();
+ }
+
+ /**
+ * Sets the contextPath.
+ * @param context the contextPath to set
+ */
+ public static void setContextPath(String context)
+ {
+ contextPath.set(context);
+ }
+
+}
Property changes on: trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/RewriteVarsThreadLocal.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/UrlFunctions.java
===================================================================
--- trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/UrlFunctions.java (rev 0)
+++ trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/UrlFunctions.java 2007-06-30 15:04:52 UTC (rev 341)
@@ -0,0 +1,105 @@
+/*
+ * Copyright 2007 Fabrizio Giustina.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package it.openutils.mvcbridge;
+
+import info.magnolia.context.MgnlContext;
+
+import org.apache.commons.lang.StringEscapeUtils;
+import org.apache.commons.lang.StringUtils;
+
+
+/**
+ * @author fgiust
+ * @version $Id$
+ */
+public final class UrlFunctions
+{
+
+ /**
+ * Don't instantiate.
+ */
+ private UrlFunctions()
+ {
+ // unused
+ }
+
+ public static String url(String url)
+ {
+ return encodeUrl(RewriteVarsThreadLocal.getCurrentPageUrl(), url);
+ }
+
+ public static String urlWithDestination(String url, String destination)
+ {
+ // check RewriteVarsThreadLocal because if not running under magnolia we should not replace urls
+ if (RewriteVarsThreadLocal.getCurrentPageUrl() == null || destination == null)
+ {
+ return url(url);
+ }
+
+ return encodeUrl(RewriteVarsThreadLocal.getContextPath() + destination, url);
+ }
+
+ /**
+ * @param baseUrl
+ * @param actionUrl
+ * @return
+ */
+ private static String encodeUrl(final String baseUrl, String actionUrl)
+ {
+ String contextPath = MgnlContext.getContextPath();
+ if (StringUtils.isNotEmpty(contextPath) && actionUrl != null && actionUrl.startsWith(contextPath))
+ {
+ actionUrl = StringUtils.substringAfter(actionUrl, contextPath);
+ }
+
+ if (baseUrl == null)
+ {
+ if (actionUrl.startsWith("/"))
+ {
+ return contextPath + actionUrl;
+ }
+
+ return actionUrl;
+ }
+
+ int paramIndex = baseUrl.indexOf('?');
+ String page = baseUrl;
+ String params = null;
+ if (paramIndex != -1)
+ {
+ page = StringUtils.substring(baseUrl, 0, paramIndex + 1);
+ params = StringUtils.substring(baseUrl, paramIndex + 1);
+ }
+
+ StringBuffer outUrl = new StringBuffer();
+ outUrl.append(page);
+ outUrl.append("?");
+
+ if (params != null)
+ {
+ outUrl.append(params);
+ outUrl.append("&");
+ }
+
+ outUrl.append("_action=");
+ outUrl.append(StringUtils.replace(actionUrl, "?", "&"));
+
+ String encodedUrl = StringEscapeUtils.escapeXml(outUrl.toString());
+
+ return encodedUrl;
+ }
+
+}
Property changes on: trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/UrlFunctions.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/WrappedResponse.java
===================================================================
--- trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/WrappedResponse.java (rev 0)
+++ trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/WrappedResponse.java 2007-06-30 15:04:52 UTC (rev 341)
@@ -0,0 +1,130 @@
+/*
+ * Copyright 2007 Fabrizio Giustina.
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+package it.openutils.mvcbridge;
+
+import java.io.ByteArrayOutputStream;
+import java.io.CharArrayWriter;
+import java.io.IOException;
+import java.io.PrintWriter;
+
+import javax.servlet.ServletOutputStream;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
+
+
+/**
+ * @author fgiust
+ * @version $Id$
+ */
+public class WrappedResponse extends HttpServletResponseWrapper
+{
+
+ /**
+ * The buffered response.
+ */
+ private CharArrayWriter outputWriter;
+
+ /**
+ * The outputWriter stream.
+ */
+ private SimpleServletOutputStream servletOutputStream;
+
+ /**
+ * @param httpServletResponse the response to wrap
+ */
+ public WrappedResponse(HttpServletResponse httpServletResponse)
+ {
+ super(httpServletResponse);
+ this.outputWriter = new CharArrayWriter();
+ this.servletOutputStream = new SimpleServletOutputStream();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public PrintWriter getWriter() throws IOException
+ {
+ return new PrintWriter(this.outputWriter);
+ }
+
+ /**
+ * Flush the buffer, not the response.
+ * @throws IOException if encountered when flushing
+ */
+ @Override
+ public void flushBuffer() throws IOException
+ {
+ if (outputWriter != null)
+ {
+ this.outputWriter.flush();
+ this.servletOutputStream.outputStream.reset();
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public ServletOutputStream getOutputStream() throws IOException
+ {
+ return this.servletOutputStream;
+ }
+
+ /**
+ * @return buffered response
+ */
+ public char[] getContent()
+ {
+ return this.outputWriter.toCharArray();
+ }
+
+ class SimpleServletOutputStream extends ServletOutputStream
+ {
+
+ /**
+ * My outputWriter stream, a buffer.
+ */
+ ByteArrayOutputStream outputStream = new ByteArrayOutputStream();
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void write(int b)
+ {
+ this.outputStream.write(b);
+ }
+
+ /**
+ * {@inheritDoc} Get the contents of the outputStream.
+ * @return contents of the outputStream
+ */
+ @Override
+ public String toString()
+ {
+ return this.outputStream.toString();
+ }
+
+ /**
+ * Reset the wrapped ByteArrayOutputStream.
+ */
+ public void reset()
+ {
+ outputStream.reset();
+ }
+ }
+}
\ No newline at end of file
Property changes on: trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/WrappedResponse.java
___________________________________________________________________
Name: svn:executable
+ *
Name: svn:mime-type
+ text/plain
Name: svn:keywords
+ Author Date Id Revision
Name: svn:eol-style
+ native
Added: trunk/openutils-magnolia2mvcbridge/src/main/resources/META-INF/magnolia-bridge-tags.tld
===================================================================
--- trunk/openutils-magnolia2mvcbridge/src/main/resources/META-INF/magnolia-bridge-tags.tld (rev 0)
+++ trunk/openutils-magnolia2mvcbridge/src/main/resources/META-INF/magnolia-bridge-tags.tld 2007-06-30 15:04:52 UTC (rev 341)
@@ -0,0 +1,30 @@
+<taglib xmlns="http://java.sun.com/xml/ns/j2ee" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://java.sun.com/xml/ns/j2ee http://java.sun.com/xml/ns/j2ee/web-jsptaglibrary_2_0.xsd"
+ version="2.0">
+ <description>magnolia-bridge</description>
+ <display-name>magnolia-bridge</display-name>
+ <tlib-version>1.2</tlib-version>
+ <short-name>magnolia-bridge</short-name>
+ <uri>magnolia-bridge</uri>
+ <tag>
+ <description>spring</description>
+ <name>spring</name>
+...
[truncated message content] |
|
From: <fg...@us...> - 2007-06-30 15:23:41
|
Revision: 343
http://svn.sourceforge.net/openutils/?rev=343&view=rev
Author: fgiust
Date: 2007-06-30 08:23:43 -0700 (Sat, 30 Jun 2007)
Log Message:
-----------
moved to mgnlspring
Modified Paths:
--------------
trunk/openutils-mgnlspring/src/main/java/it/openutils/mvcbridge/MagnoliaMultipartResolver.java
Added Paths:
-----------
trunk/openutils-mgnlspring/
trunk/openutils-mgnlspring/pom.xml
trunk/openutils-mgnlspring/src/
Removed Paths:
-------------
trunk/openutils-magnolia2mvcbridge/
trunk/openutils-mgnlspring/pom.xml
trunk/openutils-mgnlspring/src/
Copied: trunk/openutils-mgnlspring (from rev 341, trunk/openutils-magnolia2mvcbridge)
Deleted: trunk/openutils-mgnlspring/pom.xml
===================================================================
--- trunk/openutils-magnolia2mvcbridge/pom.xml 2007-06-30 15:04:52 UTC (rev 341)
+++ trunk/openutils-mgnlspring/pom.xml 2007-06-30 15:23:43 UTC (rev 343)
@@ -1,71 +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">
- <parent>
- <groupId>net.sourceforge.openutils</groupId>
- <artifactId>openutils</artifactId>
- <version>3</version>
- <relativePath>..</relativePath>
- </parent>
- <modelVersion>4.0.0</modelVersion>
- <packaging>jar</packaging>
- <groupId>it.openmindonline.magnolia</groupId>
- <artifactId>openutils-magnolia2mvcbridge</artifactId>
- <name>openutils-magnolia2mvcbridge</name>
- <version>1.0-SNAPSHOT</version>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.3.0</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>2.0.6</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-web</artifactId>
- <version>2.0.6</version>
- </dependency>
- <dependency>
- <groupId>info.magnolia</groupId>
- <artifactId>magnolia-core</artifactId>
- <version>3.0.2</version>
- </dependency>
- <dependency>
- <groupId>info.magnolia</groupId>
- <artifactId>magnolia-jaas</artifactId>
- <version>3.0.2</version>
- </dependency>
- <dependency>
- <groupId>opensymphony</groupId>
- <artifactId>sitemesh</artifactId>
- <version>2.3</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>servlet-api</artifactId>
- <version>2.4</version>
- </dependency>
- <dependency>
- <groupId>javax.servlet</groupId>
- <artifactId>jsp-api</artifactId>
- <version>2.0</version>
- </dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <classifier>jdk15</classifier>
- <version>5.1</version>
- <scope>test</scope>
- <exclusions>
- <exclusion>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- </exclusion>
- </exclusions>
- </dependency>
- </dependencies>
-</project>
Copied: trunk/openutils-mgnlspring/pom.xml (from rev 342, trunk/openutils-magnolia2mvcbridge/pom.xml)
===================================================================
--- trunk/openutils-mgnlspring/pom.xml (rev 0)
+++ trunk/openutils-mgnlspring/pom.xml 2007-06-30 15:23:43 UTC (rev 343)
@@ -0,0 +1,83 @@
+<?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">
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>jar</packaging>
+ <groupId>it.openmindonline.magnolia</groupId>
+ <artifactId>openutils-mgnlspring</artifactId>
+ <name>openutils-mgnlspring</name>
+ <version>1.0-SNAPSHOT</version>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.3.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>2.0.6</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-web</artifactId>
+ <version>2.0.6</version>
+ <exclusions>
+ <exclusion>
+ <groupId>commons-logging</groupId>
+ <artifactId>commons-logging</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>info.magnolia</groupId>
+ <artifactId>magnolia-core</artifactId>
+ <version>3.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>info.magnolia</groupId>
+ <artifactId>magnolia-jaas</artifactId>
+ <version>3.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>opensymphony</groupId>
+ <artifactId>sitemesh</artifactId>
+ <version>2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ <version>5.1</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+</project>
Copied: trunk/openutils-mgnlspring/src (from rev 342, trunk/openutils-magnolia2mvcbridge/src)
Modified: trunk/openutils-mgnlspring/src/main/java/it/openutils/mvcbridge/MagnoliaMultipartResolver.java
===================================================================
--- trunk/openutils-magnolia2mvcbridge/src/main/java/it/openutils/mvcbridge/MagnoliaMultipartResolver.java 2007-06-30 15:21:31 UTC (rev 342)
+++ trunk/openutils-mgnlspring/src/main/java/it/openutils/mvcbridge/MagnoliaMultipartResolver.java 2007-06-30 15:23:43 UTC (rev 343)
@@ -48,7 +48,7 @@
/**
* Spring MagnoliaMultipartResolver which interacts with magnolia.
* @author fgiust
- * @version $Id: $
+ * @version $Id$
*/
public class MagnoliaMultipartResolver extends CommonsFileUploadSupport
implements
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <mol...@us...> - 2007-07-12 16:41:08
|
Revision: 362
http://svn.sourceforge.net/openutils/?rev=362&view=rev
Author: molaschi
Date: 2007-07-12 08:30:05 -0700 (Thu, 12 Jul 2007)
Log Message:
-----------
Openutils, module openutils-testing-junit-dwr for dwr testing support
Modified Paths:
--------------
trunk/pom.xml
Added Paths:
-----------
trunk/openutils-testing-junit-dwr/
trunk/openutils-testing-junit-dwr/pom.xml
trunk/openutils-testing-junit-dwr/src/
trunk/openutils-testing-junit-dwr/src/main/
trunk/openutils-testing-junit-dwr/src/main/java/
trunk/openutils-testing-junit-dwr/src/main/java/it/
trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/
trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/
trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/
trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/
trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/DwrTestCase.java
trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/JsException.java
trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/XMLHttpRequest.java
trunk/openutils-testing-junit-dwr/src/main/resources/
trunk/openutils-testing-junit-dwr/src/main/resources/webEnv.js
Added: trunk/openutils-testing-junit-dwr/pom.xml
===================================================================
--- trunk/openutils-testing-junit-dwr/pom.xml (rev 0)
+++ trunk/openutils-testing-junit-dwr/pom.xml 2007-07-12 15:30:05 UTC (rev 362)
@@ -0,0 +1,107 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>openutils-testing-junit-dwr</artifactId>
+ <name>openutils test utils (junit) for dwr</name>
+ <version>1.0-SNAPSHOT</version>
+ <description>openutils test utils for dwr</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.13</version>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ <dependency>
+ <groupId>httpunit</groupId>
+ <artifactId>httpunit</artifactId>
+ <version>1.6.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xmlParserAPIs</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>nekohtml</groupId>
+ <artifactId>nekohtml</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-compiler-jdt</artifactId>
+ <version>5.5.12</version>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>naming-resources</artifactId>
+ <version>5.5.15</version>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-runtime</artifactId>
+ <version>5.5.12</version>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-compiler</artifactId>
+ <version>5.5.12</version>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>naming-factory</artifactId>
+ <version>5.5.15</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-el</groupId>
+ <artifactId>commons-el</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <version>1.6R6-candidate2</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/DwrTestCase.java
===================================================================
--- trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/DwrTestCase.java (rev 0)
+++ trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/DwrTestCase.java 2007-07-12 15:30:05 UTC (rev 362)
@@ -0,0 +1,293 @@
+package it.openutils.testing.junit.dwr;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import junit.framework.TestCase;
+
+import org.mozilla.javascript.Context;
+import org.mozilla.javascript.Scriptable;
+import org.mozilla.javascript.ScriptableObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.xml.sax.SAXException;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.WebResponse;
+import com.meterware.servletunit.ServletRunner;
+import com.meterware.servletunit.ServletUnitClient;
+
+
+public class DwrTestCase extends TestCase
+{
+
+ private static Logger log = LoggerFactory.getLogger(DwrTestCase.class);
+
+ public static final String SERVLET_UNIT_CLIENT = "SERVLET_UNIT_CLIENT";
+
+ private Context context;
+
+ private Scriptable scope;
+
+ private ServletUnitClient servletUnitClient;
+
+ private ServletRunner servletRunner;
+
+ private String webXmlLocation;
+
+ private String contextPath = "/webapp";
+
+ private List<String> jsLibraries = new ArrayList<String>();
+
+ protected void setAbsoluteWebXmlLocation(String absoluteWebXmlLocation)
+ {
+ this.webXmlLocation = absoluteWebXmlLocation;
+ }
+
+ protected void setContextPath(String contextPath)
+ {
+ this.contextPath = contextPath;
+ if (this.contextPath != null)
+ {
+ this.contextPath = this.contextPath.replace('\\', '/');
+ if (!this.contextPath.startsWith("/"))
+ {
+ this.contextPath = "/" + this.contextPath;
+ }
+ }
+ }
+
+ public void addJsLibrary(String library)
+ {
+ jsLibraries.add(library);
+ }
+
+ @Override
+ protected void setUp() throws Exception
+ {
+ // run httpunit servlet engine
+ servletRunner = new ServletRunner(new File(webXmlLocation), contextPath);
+ servletUnitClient = servletRunner.newClient();
+
+ // init scripting context
+ context = Context.enter();
+ context.setLanguageVersion(Context.VERSION_1_6);
+
+ // store servletUnitClient in context
+ context.putThreadLocal(DwrTestCase.SERVLET_UNIT_CLIENT, servletUnitClient);
+
+ // load js support for window and document
+ String jsWebEnvironment = "";
+ InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("webEnv.js");
+ byte[] buffer = new byte[1024];
+ int read = 0;
+ int length = 1024;
+ while ((read = is.read(buffer, 0, length)) > 0)
+ {
+ jsWebEnvironment += new String(buffer, 0, read);
+ }
+ is.close();
+
+ //
+ scope = context.initStandardObjects();
+ ScriptableObject.defineClass(scope, XMLHttpRequest.class);
+ // ScriptableObject.defineClass(scope, JsJUnitAssert.class);
+ context.evaluateString(scope, jsWebEnvironment, "webEnv.js", -1, null);
+ scope.put("Test", scope, this);
+
+ // add javascript
+ for (String library : jsLibraries)
+ {
+ if (loadLibraryFromLocalServer(library))
+ {
+ log.info("Loaded library from local server: " + library);
+ }
+ else if (loadLibraryFromRemoteServer(library))
+ {
+ log.info("Loaded library from remote server: " + library);
+ }
+ else if (loadLibraryFromClasspath(library))
+ {
+ log.info("Loaded library from classpath: " + library);
+ }
+ else if (loadLibraryFromFileSystem(library))
+ {
+ log.info("Loaded library from filesystem: " + library);
+ }
+ else
+ {
+ log.error("Can't load library " + library);
+ throw new FileNotFoundException(library);
+ }
+ }
+
+ super.setUp();
+ }
+
+ private boolean loadLibraryFromLocalServer(String library) throws MalformedURLException, SAXException, IOException,
+ URISyntaxException
+ {
+ if (!library.startsWith("http://localhost/"))
+ {
+ return false;
+ }
+
+ WebResponse response = servletUnitClient.getResponse(new GetMethodWebRequest(library));
+ if (response == null)
+ {
+ return false;
+ }
+ URI uri = new URI(library);
+ context.evaluateString(scope, response.getText(), uri.getPath(), -1, null);
+
+ return true;
+ }
+
+ private boolean loadLibraryFromRemoteServer(String library) throws MalformedURLException, SAXException,
+ IOException, URISyntaxException
+ {
+ if (!library.startsWith("http://"))
+ {
+ return false;
+ }
+
+ URL url = new URL(library);
+
+ // connect to library
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.setRequestMethod("GET");
+ connection.setDoInput(true);
+ connection.connect();
+
+ // get response
+ InputStream is = connection.getInputStream();
+ StringBuffer sb = new StringBuffer();
+
+ int i;
+ while ((i = is.read()) != -1)
+ {
+ sb.append((char) i);
+ }
+ is.close();
+ connection.disconnect();
+
+ // put response in context
+ context.evaluateString(scope, sb.toString(), url.getPath(), -1, null);
+
+ return true;
+ }
+
+ private boolean loadLibraryFromClasspath(String library) throws IOException
+ {
+ String js = loadFileFromClassPath(library);
+
+ if (js == null)
+ {
+ return false;
+ }
+
+ context.evaluateString(scope, js, library, -1, null);
+
+ return true;
+ }
+
+ private String loadFileFromClassPath(String file) throws IOException
+ {
+ InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
+ if (is == null)
+ {
+ return null;
+ }
+ byte[] buffer = new byte[1024];
+ int read = 0;
+ String js = "";
+ while ((read = is.read(buffer, 0, buffer.length)) > 0)
+ {
+ js += new String(buffer, 0, read);
+ }
+ is.close();
+
+ return js;
+ }
+
+ private boolean loadLibraryFromFileSystem(String library) throws FileNotFoundException, IOException
+ {
+ String js = loadFileFromFileSystem(library);
+
+ if (js == null)
+ {
+ return false;
+ }
+
+ context.evaluateString(scope, js, library, -1, null);
+
+ return true;
+ }
+
+ private String loadFileFromFileSystem(String file) throws FileNotFoundException, IOException
+ {
+ File f = new File(file);
+ if (!f.exists())
+ {
+ return null;
+ }
+
+ InputStream is = new FileInputStream(f);
+ if (is == null)
+ {
+ return null;
+ }
+ byte[] buffer = new byte[1024];
+ int read = 0;
+ String js = "";
+ while ((read = is.read(buffer, 0, buffer.length)) > 0)
+ {
+ js += new String(buffer, 0, read);
+ }
+ is.close();
+
+ return js;
+ }
+
+ @Override
+ protected void tearDown() throws Exception
+ {
+ scope = null;
+ Context.exit();
+
+ servletRunner.shutDown();
+
+ super.tearDown();
+ }
+
+ public void runScript(String script)
+ {
+ context.evaluateString(scope, script, "inline", -1, null);
+ }
+
+ public void runScriptFile(String scriptFile) throws FileNotFoundException, IOException
+ {
+ String js = loadFileFromClassPath(scriptFile);
+ if (js == null)
+ {
+ js = loadFileFromFileSystem(scriptFile);
+ if (js == null)
+ {
+ throw new FileNotFoundException(scriptFile);
+ }
+ }
+
+ context.evaluateString(scope, js, scriptFile, -1, null);
+ }
+
+}
Added: trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/JsException.java
===================================================================
--- trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/JsException.java (rev 0)
+++ trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/JsException.java 2007-07-12 15:30:05 UTC (rev 362)
@@ -0,0 +1,23 @@
+package it.openutils.testing.junit.dwr;
+
+import org.mozilla.javascript.ScriptableObject;
+
+
+/**
+ * @author mmolaschi
+ * @version $Id: $
+ */
+public class JsException extends ScriptableObject
+{
+
+ @Override
+ public String getClassName()
+ {
+ return "Exception";
+ }
+
+ public void js_constructor(String message) throws Exception
+ {
+ throw new Exception(message);
+ }
+}
Added: trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/XMLHttpRequest.java
===================================================================
--- trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/XMLHttpRequest.java (rev 0)
+++ trunk/openutils-testing-junit-dwr/src/main/java/it/openutils/testing/junit/dwr/XMLHttpRequest.java 2007-07-12 15:30:05 UTC (rev 362)
@@ -0,0 +1,479 @@
+//=============================================================================
+//Change History:
+//Date UserId Defect Description
+//----------------------------------------------------------------------------
+//07/02/05 ant ??? Initial version.
+//09/02/05 ant Support both HTTP GET and POST
+//14/02/05 ant Fix call backs in functions
+//20/02/05 ant Support HTTP HEAD
+//28/02/05 ant HTTP basic authentication support
+//
+package it.openutils.testing.junit.dwr;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.io.StringReader;
+import java.net.Authenticator;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.PasswordAuthentication;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.mozilla.javascript.Context;
+import org.mozilla.javascript.NativeFunction;
+import org.mozilla.javascript.Scriptable;
+import org.mozilla.javascript.ScriptableObject;
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.PostMethodWebRequest;
+import com.meterware.httpunit.WebRequest;
+import com.meterware.httpunit.WebResponse;
+import com.meterware.servletunit.ServletUnitClient;
+import com.sun.org.apache.xerces.internal.parsers.DOMParser;
+
+
+/**
+ * XMLHttpRequest simulates the Mozilla XMLHttpRequest. Add this class to the Rhino classpath and then define to Rhino
+ * with <code>defineClass('xmlhttp.XMLHttpRequest');</code>
+ * @author <a href="mailto:ant...@uk...">Ant Elder </a>
+ */
+public class XMLHttpRequest extends ScriptableObject
+{
+
+ private String url;
+
+ private String httpMethod;
+
+ private int httpStatus;
+
+ private String httpStatusText;
+
+ private Map requestHeaders;
+
+ private String userName;
+
+ private String password;
+
+ private String responseText;
+
+ private Document responseXML;
+
+ private int readyState;
+
+ private NativeFunction readyStateChangeFunction;
+
+ private boolean asyncFlag;
+
+ private Thread asyncThread;
+
+ private ServletUnitClient suc;
+
+ private WebRequest request;
+
+ private WebResponse response;
+
+ private boolean localRequest = false;
+
+ private HttpURLConnection connection;
+
+ public XMLHttpRequest()
+ {
+ }
+
+ public void jsConstructor()
+ {
+ suc = (ServletUnitClient) Context.getCurrentContext().getThreadLocal(DwrTestCase.SERVLET_UNIT_CLIENT);
+ }
+
+ @Override
+ public String getClassName()
+ {
+ return "XMLHttpRequest";
+ }
+
+ public void jsFunction_setRequestHeader(String headerName, String value)
+ {
+ if (readyState > 1)
+ {
+ throw new IllegalStateException("request already in progress");
+ }
+
+ if (requestHeaders == null)
+ {
+ requestHeaders = new HashMap();
+ }
+
+ requestHeaders.put(headerName, value);
+ }
+
+ public Map<String, String[]> jsFunction_getAllResponseHeaders()
+ {
+ if (readyState < 3)
+ {
+ throw new IllegalStateException("must call send before getting response headers");
+ }
+ Map<String, String[]> map = new HashMap<String, String[]>();
+ for (String name : response.getHeaderFieldNames())
+ {
+ map.put(name.toLowerCase(), response.getHeaderFields(name));
+ }
+ return map;
+ }
+
+ public String jsFunction_getResponseHeader(String headerName)
+ {
+ String theValue = "";
+ String theValues[] = jsFunction_getAllResponseHeaders().get(headerName.toLowerCase());
+ for (String value : theValues)
+ {
+ theValue = ((theValue.length() > 0) ? " " : "") + value;
+ }
+ return theValue;
+ }
+
+ public void jsFunction_open(String httpMethod, String url, boolean asyncFlag, String userName, String password)
+ {
+
+ if (readyState != 0)
+ {
+ throw new IllegalStateException("already open");
+ }
+
+ this.httpMethod = httpMethod;
+
+ this.url = url;
+
+ if (!this.url.startsWith("http://"))
+ {
+ this.url = "http://localhost" + ((this.url.startsWith("/")) ? "" : "/") + this.url;
+ }
+
+ if (this.url.startsWith("http://localhost/"))
+ {
+ this.localRequest = true;
+ }
+ else
+ {
+ this.localRequest = false;
+ }
+
+ this.asyncFlag = asyncFlag;
+
+ if ("undefined".equals(userName) || "".equals(userName))
+ {
+ this.userName = null;
+ }
+ else
+ {
+ this.userName = userName;
+ }
+ if ("undefined".equals(password) || "".equals(password))
+ {
+ this.password = null;
+ }
+ else
+ {
+ this.password = password;
+ }
+ if (this.userName != null)
+ {
+ setAuthenticator();
+ }
+
+ setReadyState(1);
+ }
+
+ private void setAuthenticator()
+ {
+ Authenticator.setDefault(new Authenticator()
+ {
+
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication()
+ {
+ return new PasswordAuthentication(userName, password.toCharArray());
+ }
+ });
+ }
+
+ public void jsFunction_send(Object o) throws SAXException, MalformedURLException, IOException
+ {
+ final String content = (o == null) ? "" : o.toString();
+ /*
+ * if (asyncFlag) { Runnable r = new Runnable() {
+ *
+ * public void run() { try { doSend(content); } catch (SAXException ex) { throw new
+ * NestableRuntimeException(ex); } } }; this.asyncThread = new Thread(r); asyncThread.start(); } else
+ */
+ {
+ doSend(content);
+ }
+ }
+
+ public void jsFunction_abort()
+ {
+ if (asyncThread != null)
+ {
+ asyncThread.interrupt();
+ }
+ }
+
+ /**
+ * @return Returns the readyState.
+ */
+ public int jsGet_readyState()
+ {
+ return readyState;
+ }
+
+ /**
+ * @return Returns the responseText.
+ */
+ public String jsGet_responseText()
+ {
+ if (readyState < 2)
+ {
+ throw new IllegalStateException("request not yet sent");
+ }
+ return responseText;
+ }
+
+ /**
+ * @return Returns the responseXML as a DOM Document.
+ */
+ public Document jsGet_responseXML()
+ {
+ if (responseXML == null && responseText != null)
+ {
+ convertResponse2DOM();
+ }
+ return responseXML;
+ }
+
+ private void convertResponse2DOM()
+ {
+ try
+ {
+
+ DOMParser parser = new DOMParser();
+ StringReader sr = new StringReader(jsGet_responseText());
+ parser.parse(new InputSource(sr));
+ this.responseXML = parser.getDocument();
+
+ }
+ catch (SAXException e)
+ {
+ throw new RuntimeException("ex: " + e, e);
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("ex: " + e, e);
+ }
+ }
+
+ /**
+ * @return Returns the htto status.
+ */
+ public int jsGet_status()
+ {
+ return httpStatus;
+ }
+
+ /**
+ * @return Returns the http status text.
+ */
+ public String jsGet_statusText()
+ {
+ return httpStatusText;
+ }
+
+ /**
+ * @return Returns the onreadystatechange.
+ */
+ public Object jsGet_onreadystatechange()
+ {
+ return readyStateChangeFunction;
+ }
+
+ /**
+ * @param onreadystatechange The onreadystatechange to set.
+ */
+ public void jsSet_onreadystatechange(NativeFunction function)
+ {
+ readyStateChangeFunction = function;
+ }
+
+ private void doSend(String content) throws SAXException, MalformedURLException, IOException
+ {
+
+ connect(content);
+
+ setRequestHeaders();
+
+ sendRequest(content);
+
+ if ("POST".equals(this.httpMethod) || "GET".equals(this.httpMethod))
+ {
+ readResponse();
+ }
+
+ setReadyState(4);
+
+ }
+
+ private void connect(String content) throws MalformedURLException, IOException
+ {
+ if (httpMethod == "POST")
+ {
+ if (this.localRequest)
+ {
+ ByteArrayInputStream bis = new ByteArrayInputStream(content.getBytes());
+ request = new PostMethodWebRequest(url, bis, null);
+ }
+ else
+ {
+ URL url = new URL(this.url);
+ connection = (HttpURLConnection) url.openConnection();
+ connection.setDoInput(true);
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ }
+ }
+ else
+ {
+ if (this.localRequest)
+ {
+ request = new GetMethodWebRequest("http://localhost/" + url);
+ }
+ else
+ {
+ URL url = new URL(this.url);
+ connection = (HttpURLConnection) url.openConnection();
+ connection.setDoInput(true);
+ connection.setRequestMethod("GET");
+ }
+
+ }
+ }
+
+ private void setRequestHeaders()
+ {
+ if (this.requestHeaders != null)
+ {
+ for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext();)
+ {
+ String header = (String) i.next();
+ String value = (String) requestHeaders.get(header);
+ if (this.localRequest)
+ {
+ request.setHeaderField(header, value);
+ }
+ else
+ {
+ connection.setRequestProperty(header, value);
+ }
+ }
+ }
+ }
+
+ private void sendRequest(String content) throws SAXException
+ {
+ try
+ {
+ if ("POST".equals(this.httpMethod) || content.length() > 0)
+ {
+ if (this.localRequest)
+ {
+ response = suc.getResponse(request);
+ }
+ else
+ {
+ OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream(), "ASCII");
+ out.write(content);
+ out.flush();
+ out.close();
+
+ }
+ }
+
+ if (this.localRequest)
+ {
+ httpStatus = response.getResponseCode();
+ httpStatusText = response.getResponseMessage();
+ }
+ else
+ {
+ httpStatus = connection.getResponseCode();
+ httpStatusText = connection.getResponseMessage();
+ }
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("IOException: " + e, e);
+ }
+
+ setReadyState(2);
+ }
+
+ private void readResponse()
+ {
+ try
+ {
+ if (this.localRequest)
+ {
+ this.responseText = response.getText();
+ }
+ else
+ {
+ InputStream is = connection.getInputStream();
+ StringBuffer sb = new StringBuffer();
+
+ setReadyState(3);
+
+ int i;
+ while ((i = is.read()) != -1)
+ {
+ sb.append((char) i);
+ }
+ is.close();
+
+ this.responseText = sb.toString();
+ }
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("IOException: " + e, e);
+ }
+ }
+
+ private void setReadyState(int state)
+ {
+ this.readyState = state;
+ callOnreadyStateChange();
+ }
+
+ private void callOnreadyStateChange()
+ {
+ if (readyStateChangeFunction != null)
+ {
+ Context cx = Context.enter();
+ try
+ {
+ Scriptable scope = cx.initStandardObjects();
+ readyStateChangeFunction.call(cx, scope, this, new Object[]{});
+ }
+ finally
+ {
+ Context.exit();
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/openutils-testing-junit-dwr/src/main/resources/webEnv.js
===================================================================
--- trunk/openutils-testing-junit-dwr/src/main/resources/webEnv.js (rev 0)
+++ trunk/openutils-testing-junit-dwr/src/main/resources/webEnv.js 2007-07-12 15:30:05 UTC (rev 362)
@@ -0,0 +1,596 @@
+/*
+ * Simulated browser environment for Rhino
+ * By John Resig <http://ejohn.org/>
+ * Copyright 2007 John Resig, under the MIT License
+ */
+
+// The window Object
+var window = this;
+
+(function(){
+
+ // Browser Navigator
+
+ window.navigator = {
+ get userAgent(){
+ return "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3";
+ }
+ };
+
+ var curLocation = (new java.io.File("./")).toURL();
+
+ window.__defineSetter__("location", function(url){
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", url);
+ xhr.onreadystatechange = function(){
+ curLocation = new java.net.URL( curLocation, url );
+ window.document = xhr.responseXML;
+
+ var event = document.createEvent();
+ event.initEvent("load");
+ window.dispatchEvent( event );
+ };
+ xhr.send();
+ });
+
+ window.__defineGetter__("location", function(url){
+ return {
+ get pathname(){
+ if (curLocation.toString().indexOf('?') >= 0)
+ {
+ return curLocation.toString().substring(0, curLocation.toString().indexOf('?'));
+ }
+ return curLocation.toString();
+ },
+ get search(){
+ if (curLocation.toString().indexOf('?') >= 0)
+ {
+ return curLocation.toString().substring(curLocation.toString().indexOf('?') + 1, curLocation.toString().length());
+ }
+ return "";
+ },
+ get protocol(){
+ return curLocation.getProtocol() + ":";
+ },
+ get href(){
+ return curLocation.toString();
+ },
+ toString: function(){
+ return this.href;
+ }
+ };
+ });
+
+ // Timers
+...
[truncated message content] |
|
From: <mol...@us...> - 2007-07-12 17:17:46
|
Revision: 363
http://svn.sourceforge.net/openutils/?rev=363&view=rev
Author: molaschi
Date: 2007-07-12 10:17:48 -0700 (Thu, 12 Jul 2007)
Log Message:
-----------
Openutils, module openutils-testing-testng-dwr for dwr testing support
Modified Paths:
--------------
trunk/pom.xml
Added Paths:
-----------
trunk/openutils-testing-testng-dwr/
trunk/openutils-testing-testng-dwr/pom.xml
trunk/openutils-testing-testng-dwr/src/
trunk/openutils-testing-testng-dwr/src/main/
trunk/openutils-testing-testng-dwr/src/main/java/
trunk/openutils-testing-testng-dwr/src/main/java/it/
trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/
trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/
trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/
trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/
trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/DwrTestCase.java
trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/JsException.java
trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/XMLHttpRequest.java
trunk/openutils-testing-testng-dwr/src/main/resources/
trunk/openutils-testing-testng-dwr/src/main/resources/webEnv.js
Added: trunk/openutils-testing-testng-dwr/pom.xml
===================================================================
--- trunk/openutils-testing-testng-dwr/pom.xml (rev 0)
+++ trunk/openutils-testing-testng-dwr/pom.xml 2007-07-12 17:17:48 UTC (rev 363)
@@ -0,0 +1,108 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>openutils-testing-testng-dwr</artifactId>
+ <name>openutils test utils (testng) for dwr</name>
+ <version>1.0-SNAPSHOT</version>
+ <description>openutils test utils for dwr</description>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.13</version>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ <version>5.1</version>
+ </dependency>
+ <dependency>
+ <groupId>httpunit</groupId>
+ <artifactId>httpunit</artifactId>
+ <version>1.6.1</version>
+ <exclusions>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xmlParserAPIs</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>xerces</groupId>
+ <artifactId>xercesImpl</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>nekohtml</groupId>
+ <artifactId>nekohtml</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-compiler-jdt</artifactId>
+ <version>5.5.12</version>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>naming-resources</artifactId>
+ <version>5.5.15</version>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-runtime</artifactId>
+ <version>5.5.12</version>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>jasper-compiler</artifactId>
+ <version>5.5.12</version>
+ </dependency>
+ <dependency>
+ <groupId>tomcat</groupId>
+ <artifactId>naming-factory</artifactId>
+ <version>5.5.15</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jstl</artifactId>
+ <version>1.1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>commons-el</groupId>
+ <artifactId>commons-el</artifactId>
+ <version>1.0</version>
+ </dependency>
+ <dependency>
+ <groupId>rhino</groupId>
+ <artifactId>js</artifactId>
+ <version>1.6R6-candidate2</version>
+ </dependency>
+ </dependencies>
+</project>
\ No newline at end of file
Added: trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/DwrTestCase.java
===================================================================
--- trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/DwrTestCase.java (rev 0)
+++ trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/DwrTestCase.java 2007-07-12 17:17:48 UTC (rev 363)
@@ -0,0 +1,301 @@
+package it.openutils.testing.testng.dwr;
+
+import java.io.File;
+import java.io.FileInputStream;
+import java.io.FileNotFoundException;
+import java.io.IOException;
+import java.io.InputStream;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.URI;
+import java.net.URISyntaxException;
+import java.net.URL;
+import java.util.ArrayList;
+import java.util.List;
+
+import org.mozilla.javascript.Context;
+import org.mozilla.javascript.Scriptable;
+import org.mozilla.javascript.ScriptableObject;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+import org.testng.annotations.AfterClass;
+import org.testng.annotations.AfterMethod;
+import org.testng.annotations.BeforeClass;
+import org.testng.annotations.BeforeMethod;
+import org.testng.annotations.Test;
+import org.xml.sax.SAXException;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.WebResponse;
+import com.meterware.servletunit.ServletRunner;
+import com.meterware.servletunit.ServletUnitClient;
+
+@Test
+public class DwrTestCase
+{
+
+ private static Logger log = LoggerFactory.getLogger(DwrTestCase.class);
+
+ public static final String SERVLET_UNIT_CLIENT = "SERVLET_UNIT_CLIENT";
+
+ private Context context;
+
+ private Scriptable scope;
+
+ private ServletUnitClient servletUnitClient;
+
+ private ServletRunner servletRunner;
+
+ private String webXmlLocation;
+
+ private String contextPath = "/webapp";
+
+ private List<String> jsLibraries = new ArrayList<String>();
+
+ protected void setAbsoluteWebXmlLocation(String absoluteWebXmlLocation)
+ {
+ this.webXmlLocation = absoluteWebXmlLocation;
+ }
+
+ protected void setContextPath(String contextPath)
+ {
+ this.contextPath = contextPath;
+ if (this.contextPath != null)
+ {
+ this.contextPath = this.contextPath.replace('\\', '/');
+ if (!this.contextPath.startsWith("/"))
+ {
+ this.contextPath = "/" + this.contextPath;
+ }
+ }
+ }
+
+ public void addJsLibrary(String library)
+ {
+ jsLibraries.add(library);
+ }
+
+ @BeforeClass
+ protected void setUpServer() throws Exception
+ {
+ // run httpunit servlet engine
+ servletRunner = new ServletRunner(new File(webXmlLocation), contextPath);
+ }
+
+ @BeforeMethod
+ protected void setUp() throws Exception
+ {
+ servletUnitClient = servletRunner.newClient();
+
+ // init scripting context
+ context = Context.enter();
+ context.setLanguageVersion(Context.VERSION_1_6);
+
+ // store servletUnitClient in context
+ context.putThreadLocal(DwrTestCase.SERVLET_UNIT_CLIENT, servletUnitClient);
+
+ // load js support for window and document
+ String jsWebEnvironment = "";
+ InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream("webEnv.js");
+ byte[] buffer = new byte[1024];
+ int read = 0;
+ int length = 1024;
+ while ((read = is.read(buffer, 0, length)) > 0)
+ {
+ jsWebEnvironment += new String(buffer, 0, read);
+ }
+ is.close();
+
+ //
+ scope = context.initStandardObjects();
+ ScriptableObject.defineClass(scope, XMLHttpRequest.class);
+ // ScriptableObject.defineClass(scope, JsJUnitAssert.class);
+ context.evaluateString(scope, jsWebEnvironment, "webEnv.js", -1, null);
+ scope.put("Test", scope, this);
+
+ // add javascript
+ for (String library : jsLibraries)
+ {
+ if (loadLibraryFromLocalServer(library))
+ {
+ log.info("Loaded library from local server: " + library);
+ }
+ else if (loadLibraryFromRemoteServer(library))
+ {
+ log.info("Loaded library from remote server: " + library);
+ }
+ else if (loadLibraryFromClasspath(library))
+ {
+ log.info("Loaded library from classpath: " + library);
+ }
+ else if (loadLibraryFromFileSystem(library))
+ {
+ log.info("Loaded library from filesystem: " + library);
+ }
+ else
+ {
+ log.error("Can't load library " + library);
+ throw new FileNotFoundException(library);
+ }
+ }
+ }
+
+ private boolean loadLibraryFromLocalServer(String library) throws MalformedURLException, SAXException, IOException,
+ URISyntaxException
+ {
+ if (!library.startsWith("http://localhost/"))
+ {
+ return false;
+ }
+
+ WebResponse response = servletUnitClient.getResponse(new GetMethodWebRequest(library));
+ if (response == null)
+ {
+ return false;
+ }
+ URI uri = new URI(library);
+ context.evaluateString(scope, response.getText(), uri.getPath(), -1, null);
+
+ return true;
+ }
+
+ private boolean loadLibraryFromRemoteServer(String library) throws MalformedURLException, SAXException,
+ IOException, URISyntaxException
+ {
+ if (!library.startsWith("http://"))
+ {
+ return false;
+ }
+
+ URL url = new URL(library);
+
+ // connect to library
+ HttpURLConnection connection = (HttpURLConnection) url.openConnection();
+ connection.setRequestMethod("GET");
+ connection.setDoInput(true);
+ connection.connect();
+
+ // get response
+ InputStream is = connection.getInputStream();
+ StringBuffer sb = new StringBuffer();
+
+ int i;
+ while ((i = is.read()) != -1)
+ {
+ sb.append((char) i);
+ }
+ is.close();
+ connection.disconnect();
+
+ // put response in context
+ context.evaluateString(scope, sb.toString(), url.getPath(), -1, null);
+
+ return true;
+ }
+
+ private boolean loadLibraryFromClasspath(String library) throws IOException
+ {
+ String js = loadFileFromClassPath(library);
+
+ if (js == null)
+ {
+ return false;
+ }
+
+ context.evaluateString(scope, js, library, -1, null);
+
+ return true;
+ }
+
+ private String loadFileFromClassPath(String file) throws IOException
+ {
+ InputStream is = Thread.currentThread().getContextClassLoader().getResourceAsStream(file);
+ if (is == null)
+ {
+ return null;
+ }
+ byte[] buffer = new byte[1024];
+ int read = 0;
+ String js = "";
+ while ((read = is.read(buffer, 0, buffer.length)) > 0)
+ {
+ js += new String(buffer, 0, read);
+ }
+ is.close();
+
+ return js;
+ }
+
+ private boolean loadLibraryFromFileSystem(String library) throws FileNotFoundException, IOException
+ {
+ String js = loadFileFromFileSystem(library);
+
+ if (js == null)
+ {
+ return false;
+ }
+
+ context.evaluateString(scope, js, library, -1, null);
+
+ return true;
+ }
+
+ private String loadFileFromFileSystem(String file) throws FileNotFoundException, IOException
+ {
+ File f = new File(file);
+ if (!f.exists())
+ {
+ return null;
+ }
+
+ InputStream is = new FileInputStream(f);
+ if (is == null)
+ {
+ return null;
+ }
+ byte[] buffer = new byte[1024];
+ int read = 0;
+ String js = "";
+ while ((read = is.read(buffer, 0, buffer.length)) > 0)
+ {
+ js += new String(buffer, 0, read);
+ }
+ is.close();
+
+ return js;
+ }
+
+ @AfterMethod
+ protected void tearDown() throws Exception
+ {
+ scope = null;
+ Context.exit();
+ }
+
+ @AfterClass
+ protected void tearDownServer() throws Exception
+ {
+ servletRunner.shutDown();
+ }
+
+ public void runScript(String script)
+ {
+ context.evaluateString(scope, script, "inline", -1, null);
+ }
+
+ public void runScriptFile(String scriptFile) throws FileNotFoundException, IOException
+ {
+ String js = loadFileFromClassPath(scriptFile);
+ if (js == null)
+ {
+ js = loadFileFromFileSystem(scriptFile);
+ if (js == null)
+ {
+ throw new FileNotFoundException(scriptFile);
+ }
+ }
+
+ context.evaluateString(scope, js, scriptFile, -1, null);
+ }
+
+}
Added: trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/JsException.java
===================================================================
--- trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/JsException.java (rev 0)
+++ trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/JsException.java 2007-07-12 17:17:48 UTC (rev 363)
@@ -0,0 +1,23 @@
+package it.openutils.testing.testng.dwr;
+
+import org.mozilla.javascript.ScriptableObject;
+
+
+/**
+ * @author mmolaschi
+ * @version $Id: $
+ */
+public class JsException extends ScriptableObject
+{
+
+ @Override
+ public String getClassName()
+ {
+ return "Exception";
+ }
+
+ public void js_constructor(String message) throws Exception
+ {
+ throw new Exception(message);
+ }
+}
Added: trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/XMLHttpRequest.java
===================================================================
--- trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/XMLHttpRequest.java (rev 0)
+++ trunk/openutils-testing-testng-dwr/src/main/java/it/openutils/testing/testng/dwr/XMLHttpRequest.java 2007-07-12 17:17:48 UTC (rev 363)
@@ -0,0 +1,479 @@
+//=============================================================================
+//Change History:
+//Date UserId Defect Description
+//----------------------------------------------------------------------------
+//07/02/05 ant ??? Initial version.
+//09/02/05 ant Support both HTTP GET and POST
+//14/02/05 ant Fix call backs in functions
+//20/02/05 ant Support HTTP HEAD
+//28/02/05 ant HTTP basic authentication support
+//
+package it.openutils.testing.testng.dwr;
+
+import java.io.ByteArrayInputStream;
+import java.io.IOException;
+import java.io.InputStream;
+import java.io.OutputStreamWriter;
+import java.io.StringReader;
+import java.net.Authenticator;
+import java.net.HttpURLConnection;
+import java.net.MalformedURLException;
+import java.net.PasswordAuthentication;
+import java.net.URL;
+import java.util.HashMap;
+import java.util.Iterator;
+import java.util.Map;
+
+import org.mozilla.javascript.Context;
+import org.mozilla.javascript.NativeFunction;
+import org.mozilla.javascript.Scriptable;
+import org.mozilla.javascript.ScriptableObject;
+import org.w3c.dom.Document;
+import org.xml.sax.InputSource;
+import org.xml.sax.SAXException;
+
+import com.meterware.httpunit.GetMethodWebRequest;
+import com.meterware.httpunit.PostMethodWebRequest;
+import com.meterware.httpunit.WebRequest;
+import com.meterware.httpunit.WebResponse;
+import com.meterware.servletunit.ServletUnitClient;
+import com.sun.org.apache.xerces.internal.parsers.DOMParser;
+
+
+/**
+ * XMLHttpRequest simulates the Mozilla XMLHttpRequest. Add this class to the Rhino classpath and then define to Rhino
+ * with <code>defineClass('xmlhttp.XMLHttpRequest');</code>
+ * @author <a href="mailto:ant...@uk...">Ant Elder </a>
+ */
+public class XMLHttpRequest extends ScriptableObject
+{
+
+ private String url;
+
+ private String httpMethod;
+
+ private int httpStatus;
+
+ private String httpStatusText;
+
+ private Map requestHeaders;
+
+ private String userName;
+
+ private String password;
+
+ private String responseText;
+
+ private Document responseXML;
+
+ private int readyState;
+
+ private NativeFunction readyStateChangeFunction;
+
+ private boolean asyncFlag;
+
+ private Thread asyncThread;
+
+ private ServletUnitClient suc;
+
+ private WebRequest request;
+
+ private WebResponse response;
+
+ private boolean localRequest = false;
+
+ private HttpURLConnection connection;
+
+ public XMLHttpRequest()
+ {
+ }
+
+ public void jsConstructor()
+ {
+ suc = (ServletUnitClient) Context.getCurrentContext().getThreadLocal(DwrTestCase.SERVLET_UNIT_CLIENT);
+ }
+
+ @Override
+ public String getClassName()
+ {
+ return "XMLHttpRequest";
+ }
+
+ public void jsFunction_setRequestHeader(String headerName, String value)
+ {
+ if (readyState > 1)
+ {
+ throw new IllegalStateException("request already in progress");
+ }
+
+ if (requestHeaders == null)
+ {
+ requestHeaders = new HashMap();
+ }
+
+ requestHeaders.put(headerName, value);
+ }
+
+ public Map<String, String[]> jsFunction_getAllResponseHeaders()
+ {
+ if (readyState < 3)
+ {
+ throw new IllegalStateException("must call send before getting response headers");
+ }
+ Map<String, String[]> map = new HashMap<String, String[]>();
+ for (String name : response.getHeaderFieldNames())
+ {
+ map.put(name.toLowerCase(), response.getHeaderFields(name));
+ }
+ return map;
+ }
+
+ public String jsFunction_getResponseHeader(String headerName)
+ {
+ String theValue = "";
+ String theValues[] = jsFunction_getAllResponseHeaders().get(headerName.toLowerCase());
+ for (String value : theValues)
+ {
+ theValue = ((theValue.length() > 0) ? " " : "") + value;
+ }
+ return theValue;
+ }
+
+ public void jsFunction_open(String httpMethod, String url, boolean asyncFlag, String userName, String password)
+ {
+
+ if (readyState != 0)
+ {
+ throw new IllegalStateException("already open");
+ }
+
+ this.httpMethod = httpMethod;
+
+ this.url = url;
+
+ if (!this.url.startsWith("http://"))
+ {
+ this.url = "http://localhost" + ((this.url.startsWith("/")) ? "" : "/") + this.url;
+ }
+
+ if (this.url.startsWith("http://localhost/"))
+ {
+ this.localRequest = true;
+ }
+ else
+ {
+ this.localRequest = false;
+ }
+
+ this.asyncFlag = asyncFlag;
+
+ if ("undefined".equals(userName) || "".equals(userName))
+ {
+ this.userName = null;
+ }
+ else
+ {
+ this.userName = userName;
+ }
+ if ("undefined".equals(password) || "".equals(password))
+ {
+ this.password = null;
+ }
+ else
+ {
+ this.password = password;
+ }
+ if (this.userName != null)
+ {
+ setAuthenticator();
+ }
+
+ setReadyState(1);
+ }
+
+ private void setAuthenticator()
+ {
+ Authenticator.setDefault(new Authenticator()
+ {
+
+ @Override
+ protected PasswordAuthentication getPasswordAuthentication()
+ {
+ return new PasswordAuthentication(userName, password.toCharArray());
+ }
+ });
+ }
+
+ public void jsFunction_send(Object o) throws SAXException, MalformedURLException, IOException
+ {
+ final String content = (o == null) ? "" : o.toString();
+ /*
+ * if (asyncFlag) { Runnable r = new Runnable() {
+ *
+ * public void run() { try { doSend(content); } catch (SAXException ex) { throw new
+ * NestableRuntimeException(ex); } } }; this.asyncThread = new Thread(r); asyncThread.start(); } else
+ */
+ {
+ doSend(content);
+ }
+ }
+
+ public void jsFunction_abort()
+ {
+ if (asyncThread != null)
+ {
+ asyncThread.interrupt();
+ }
+ }
+
+ /**
+ * @return Returns the readyState.
+ */
+ public int jsGet_readyState()
+ {
+ return readyState;
+ }
+
+ /**
+ * @return Returns the responseText.
+ */
+ public String jsGet_responseText()
+ {
+ if (readyState < 2)
+ {
+ throw new IllegalStateException("request not yet sent");
+ }
+ return responseText;
+ }
+
+ /**
+ * @return Returns the responseXML as a DOM Document.
+ */
+ public Document jsGet_responseXML()
+ {
+ if (responseXML == null && responseText != null)
+ {
+ convertResponse2DOM();
+ }
+ return responseXML;
+ }
+
+ private void convertResponse2DOM()
+ {
+ try
+ {
+
+ DOMParser parser = new DOMParser();
+ StringReader sr = new StringReader(jsGet_responseText());
+ parser.parse(new InputSource(sr));
+ this.responseXML = parser.getDocument();
+
+ }
+ catch (SAXException e)
+ {
+ throw new RuntimeException("ex: " + e, e);
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("ex: " + e, e);
+ }
+ }
+
+ /**
+ * @return Returns the htto status.
+ */
+ public int jsGet_status()
+ {
+ return httpStatus;
+ }
+
+ /**
+ * @return Returns the http status text.
+ */
+ public String jsGet_statusText()
+ {
+ return httpStatusText;
+ }
+
+ /**
+ * @return Returns the onreadystatechange.
+ */
+ public Object jsGet_onreadystatechange()
+ {
+ return readyStateChangeFunction;
+ }
+
+ /**
+ * @param onreadystatechange The onreadystatechange to set.
+ */
+ public void jsSet_onreadystatechange(NativeFunction function)
+ {
+ readyStateChangeFunction = function;
+ }
+
+ private void doSend(String content) throws SAXException, MalformedURLException, IOException
+ {
+
+ connect(content);
+
+ setRequestHeaders();
+
+ sendRequest(content);
+
+ if ("POST".equals(this.httpMethod) || "GET".equals(this.httpMethod))
+ {
+ readResponse();
+ }
+
+ setReadyState(4);
+
+ }
+
+ private void connect(String content) throws MalformedURLException, IOException
+ {
+ if (httpMethod == "POST")
+ {
+ if (this.localRequest)
+ {
+ ByteArrayInputStream bis = new ByteArrayInputStream(content.getBytes());
+ request = new PostMethodWebRequest(url, bis, null);
+ }
+ else
+ {
+ URL url = new URL(this.url);
+ connection = (HttpURLConnection) url.openConnection();
+ connection.setDoInput(true);
+ connection.setDoOutput(true);
+ connection.setRequestMethod("POST");
+ }
+ }
+ else
+ {
+ if (this.localRequest)
+ {
+ request = new GetMethodWebRequest("http://localhost/" + url);
+ }
+ else
+ {
+ URL url = new URL(this.url);
+ connection = (HttpURLConnection) url.openConnection();
+ connection.setDoInput(true);
+ connection.setRequestMethod("GET");
+ }
+
+ }
+ }
+
+ private void setRequestHeaders()
+ {
+ if (this.requestHeaders != null)
+ {
+ for (Iterator i = requestHeaders.keySet().iterator(); i.hasNext();)
+ {
+ String header = (String) i.next();
+ String value = (String) requestHeaders.get(header);
+ if (this.localRequest)
+ {
+ request.setHeaderField(header, value);
+ }
+ else
+ {
+ connection.setRequestProperty(header, value);
+ }
+ }
+ }
+ }
+
+ private void sendRequest(String content) throws SAXException
+ {
+ try
+ {
+ if ("POST".equals(this.httpMethod) || content.length() > 0)
+ {
+ if (this.localRequest)
+ {
+ response = suc.getResponse(request);
+ }
+ else
+ {
+ OutputStreamWriter out = new OutputStreamWriter(connection.getOutputStream(), "ASCII");
+ out.write(content);
+ out.flush();
+ out.close();
+
+ }
+ }
+
+ if (this.localRequest)
+ {
+ httpStatus = response.getResponseCode();
+ httpStatusText = response.getResponseMessage();
+ }
+ else
+ {
+ httpStatus = connection.getResponseCode();
+ httpStatusText = connection.getResponseMessage();
+ }
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("IOException: " + e, e);
+ }
+
+ setReadyState(2);
+ }
+
+ private void readResponse()
+ {
+ try
+ {
+ if (this.localRequest)
+ {
+ this.responseText = response.getText();
+ }
+ else
+ {
+ InputStream is = connection.getInputStream();
+ StringBuffer sb = new StringBuffer();
+
+ setReadyState(3);
+
+ int i;
+ while ((i = is.read()) != -1)
+ {
+ sb.append((char) i);
+ }
+ is.close();
+
+ this.responseText = sb.toString();
+ }
+ }
+ catch (IOException e)
+ {
+ throw new RuntimeException("IOException: " + e, e);
+ }
+ }
+
+ private void setReadyState(int state)
+ {
+ this.readyState = state;
+ callOnreadyStateChange();
+ }
+
+ private void callOnreadyStateChange()
+ {
+ if (readyStateChangeFunction != null)
+ {
+ Context cx = Context.enter();
+ try
+ {
+ Scriptable scope = cx.initStandardObjects();
+ readyStateChangeFunction.call(cx, scope, this, new Object[]{});
+ }
+ finally
+ {
+ Context.exit();
+ }
+ }
+ }
+}
\ No newline at end of file
Added: trunk/openutils-testing-testng-dwr/src/main/resources/webEnv.js
===================================================================
--- trunk/openutils-testing-testng-dwr/src/main/resources/webEnv.js (rev 0)
+++ trunk/openutils-testing-testng-dwr/src/main/resources/webEnv.js 2007-07-12 17:17:48 UTC (rev 363)
@@ -0,0 +1,596 @@
+/*
+ * Simulated browser environment for Rhino
+ * By John Resig <http://ejohn.org/>
+ * Copyright 2007 John Resig, under the MIT License
+ */
+
+// The window Object
+var window = this;
+
+(function(){
+
+ // Browser Navigator
+
+ window.navigator = {
+ get userAgent(){
+ return "Mozilla/5.0 (Macintosh; U; Intel Mac OS X; en-US; rv:1.8.1.3) Gecko/20070309 Firefox/2.0.0.3";
+ }
+ };
+
+ var curLocation = (new java.io.File("./")).toURL();
+
+ window.__defineSetter__("location", function(url){
+ var xhr = new XMLHttpRequest();
+ xhr.open("GET", url);
+ xhr.onreadystatechange = function(){
+ curLocation = new java.net.URL( curLocation, url );
+ window.document = xhr.responseXML;
+
+ var event = document.createEvent();
+ event.initEvent("load");
+ window.dispatchEvent( event );
+ };
+ xhr.send();
+ });
+
+ window.__defineGetter__("location", function(url){
+ return {
+ get pathname(){
+ if (curLocation.toString().indexOf('?') >= 0)
+ {
+ return curLocation.toString().substring(0, curLocation.toString().indexOf('?'));
+ }
+ return curLocation.toString();
+ },
+ get search(){
+ if (curLocation.toString().indexOf('?') >= 0)
+ {
+ return curLocation.toString().substring(curLoc...
[truncated message content] |
|
From: <fg...@us...> - 2007-07-30 10:16:00
|
Revision: 371
http://openutils.svn.sourceforge.net/openutils/?rev=371&view=rev
Author: fgiust
Date: 2007-07-30 03:16:00 -0700 (Mon, 30 Jul 2007)
Log Message:
-----------
new module: magnolia/stripes integration
Modified Paths:
--------------
trunk/pom.xml
Added Paths:
-----------
trunk/openutils-mgnlstripes/
trunk/openutils-mgnlstripes/pom.xml
trunk/openutils-mgnlstripes/src/
trunk/openutils-mgnlstripes/src/main/
trunk/openutils-mgnlstripes/src/main/java/
trunk/openutils-mgnlstripes/src/main/java/it/
trunk/openutils-mgnlstripes/src/main/java/it/openutils/
trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/
trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java
trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java
trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java
trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java
trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphResponseWrapper.java
trunk/openutils-mgnlstripes/src/main/resources/
trunk/openutils-mgnlstripes/src/main/resources/META-INF/
trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/
trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml
trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/
trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/
trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml
trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.server.MIMEMapping.action.xml
Property Changed:
----------------
trunk/openutils-parent/
trunk/openutils-testing-testng-dwr/
Property changes on: trunk/openutils-mgnlstripes
___________________________________________________________________
Name: svn:ignore
+ target
Added: trunk/openutils-mgnlstripes/pom.xml
===================================================================
--- trunk/openutils-mgnlstripes/pom.xml (rev 0)
+++ trunk/openutils-mgnlstripes/pom.xml 2007-07-30 10:16:00 UTC (rev 371)
@@ -0,0 +1,62 @@
+<?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">
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <modelVersion>4.0.0</modelVersion>
+ <packaging>jar</packaging>
+ <artifactId>openutils-mgnlstripes</artifactId>
+ <name>openutils-mgnlstripes</name>
+ <version>0.1-SNAPSHOT</version>
+ <licenses>
+ <license>
+ <name>GPL v3</name>
+ <url>http://www.gnu.org/licenses/gpl-3.0.txt</url>
+ </license>
+ </licenses>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.stripes</groupId>
+ <artifactId>stripes</artifactId>
+ <version>1.4.3</version>
+ </dependency>
+ <dependency>
+ <groupId>info.magnolia</groupId>
+ <artifactId>magnolia-core</artifactId>
+ <version>3.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>info.magnolia</groupId>
+ <artifactId>magnolia-module-admininterface</artifactId>
+ <version>3.1-SNAPSHOT</version>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>servlet-api</artifactId>
+ <version>2.4</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>javax.servlet</groupId>
+ <artifactId>jsp-api</artifactId>
+ <version>2.0</version>
+ <scope>provided</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ <version>5.1</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ </dependencies>
+</project>
Property changes on: trunk/openutils-mgnlstripes/pom.xml
___________________________________________________________________
Name: svn:executable
+ *
Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java
===================================================================
--- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java (rev 0)
+++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/MgnlActionResolver.java 2007-07-30 10:16:00 UTC (rev 371)
@@ -0,0 +1,79 @@
+package it.openutils.magnoliastripes;
+
+import info.magnolia.cms.beans.config.Paragraph;
+import info.magnolia.cms.beans.config.ParagraphManager;
+import net.sourceforge.stripes.action.ActionBean;
+import net.sourceforge.stripes.controller.NameBasedActionResolver;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * ActionResolver that extends <code>NameBasedActionResolver</code>, registering any found Stripe action as a
+ * Magnolia paragraph.
+ * @author fgiust
+ * @version $Id: $
+ */
+public class MgnlActionResolver extends NameBasedActionResolver
+{
+
+ /**
+ * Logger.
+ */
+ private Logger log = LoggerFactory.getLogger(MgnlActionResolver.class);
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void addActionBean(Class< ? extends ActionBean> clazz)
+ {
+ String binding = getUrlBinding(clazz);
+
+ // Only process the class if it's properly annotated
+ if (binding != null)
+ {
+ registerSpringParagraph(binding);
+ super.addActionBean(clazz);
+ }
+ }
+
+ /**
+ * Registers a Magnolia paragraph which will delegate to a Stripe action.
+ * @param binding Stripes action binding
+ */
+ @SuppressWarnings("unchecked")
+ private void registerSpringParagraph(String binding)
+ {
+ Paragraph paragraph = new Paragraph();
+
+ String dialogName = actionNameToParagraphName(binding);
+
+ paragraph.setName(dialogName);
+ paragraph.setTitle("paragraph." + dialogName + ".title");
+ paragraph.setDescription("paragraph." + dialogName + ".description");
+ paragraph.setDialog(dialogName);
+ paragraph.setTemplatePath(binding);
+ paragraph.setType("stripes");
+
+ log.info("Registering stripes paragraph {}", paragraph.getName()); //$NON-NLS-1$
+ ParagraphManager.getInstance().getParagraphs().put(paragraph.getName(), paragraph);
+ }
+
+ /**
+ * Generate a paragraph name from a Stripes binding. This method will take the last token after "/", strip any
+ * extension and convert everything to lowercase.
+ * @param binding Stripe action binding
+ * @return paragraph name
+ */
+ protected String actionNameToParagraphName(String binding)
+ {
+ String dialogName = StringUtils.lowerCase(StringUtils.substringBeforeLast(StringUtils.substringAfterLast(
+ binding,
+ "/"), "."));
+ return dialogName;
+ }
+
+}
Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java
===================================================================
--- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java (rev 0)
+++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesModule.java 2007-07-30 10:16:00 UTC (rev 371)
@@ -0,0 +1,31 @@
+package it.openutils.magnoliastripes;
+
+import info.magnolia.cms.module.RegisterException;
+import info.magnolia.module.admininterface.AbstractAdminModule;
+
+
+/**
+ * Stripes module. Extends AbstractAdminModule which will take care of registering the Stripes paragraph renderer.
+ * @author fgiust
+ * @version $Id: $
+ */
+public class StripesModule extends AbstractAdminModule
+{
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void onInit()
+ {
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void onRegister(int registerState) throws RegisterException
+ {
+ // nothing to do
+ }
+}
\ No newline at end of file
Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java
===================================================================
--- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java (rev 0)
+++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRenderer.java 2007-07-30 10:16:00 UTC (rev 371)
@@ -0,0 +1,333 @@
+package it.openutils.magnoliastripes;
+
+import info.magnolia.cms.beans.config.Paragraph;
+import info.magnolia.cms.beans.runtime.ParagraphRenderer;
+import info.magnolia.cms.core.Content;
+import info.magnolia.cms.core.NodeData;
+import info.magnolia.context.MgnlContext;
+import info.magnolia.context.WebContext;
+
+import java.io.IOException;
+import java.io.Writer;
+import java.lang.reflect.InvocationTargetException;
+import java.util.Collection;
+import java.util.HashMap;
+import java.util.Map;
+import java.util.Stack;
+
+import javax.servlet.ServletContext;
+import javax.servlet.http.HttpServletRequest;
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.jsp.PageContext;
+
+import net.sourceforge.stripes.action.ActionBeanContext;
+import net.sourceforge.stripes.action.Resolution;
+import net.sourceforge.stripes.config.Configuration;
+import net.sourceforge.stripes.controller.DispatcherHelper;
+import net.sourceforge.stripes.controller.DispatcherServlet;
+import net.sourceforge.stripes.controller.ExecutionContext;
+import net.sourceforge.stripes.controller.LifecycleStage;
+import net.sourceforge.stripes.controller.StripesConstants;
+import net.sourceforge.stripes.controller.StripesFilter;
+import net.sourceforge.stripes.exception.StripesServletException;
+import net.sourceforge.stripes.validation.BooleanTypeConverter;
+
+import org.apache.commons.lang.StringUtils;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+
+/**
+ * <p>
+ * A Magnolia paragraph renderer that delegates to Stripes actions. Most of the code is just a cut and paste from
+ * Stripes' {@link DispatcherServlet}, adapted to work withing magnolia by:
+ * </p>
+ * <ul>
+ * <li>wrap the request in order to modify the request path and provide a custom requestDispatcher</li>
+ * <li>wrap the response in order to provide a custom Writer</li>
+ * <li>use a fake servlet instance/context to setup a Stripe context (there is no servlet here)</li>
+ * <li>injiect any paragraph property as a parameter</li>
+ * </ul>
+ * <p>
+ * <strong>Todo:</strong>
+ * </p>
+ * <ul>
+ * <li>Handle multipart forms in request wrapper (should be easy to do)</li>
+ * <li>A better way of handling multivalued properties in paragraph</li>
+ * <li>Handle binary properties in paragraph</li>
+ * </ul>
+ * @author fgiust
+ * @version $Id: $
+ */
+public class StripesParagraphRenderer implements ParagraphRenderer
+{
+
+ private Boolean alwaysInvokeValidate;
+
+ /**
+ * Logger.
+ */
+ private Logger log = LoggerFactory.getLogger(StripesParagraphRenderer.class);
+
+ /**
+ * <p>
+ * Invokes the following instance level methods in order to coordinate the processing of requests:
+ * </p>
+ * <ul>
+ * <li>{@link #resolveActionBean(ExecutionContext)}</li>
+ * <li>{@link #resolveHandler(ExecutionContext)}</li>
+ * <li>{@link #doBindingAndValidation(ExecutionContext)}</li>
+ * <li>{@link #doCustomValidation(ExecutionContext)}</li>
+ * <li>{@link #handleValidationErrors(ExecutionContext)}</li>
+ * <li>{@link #invokeEventHandler(ExecutionContext)}</li>
+ * </ul>
+ * <p>
+ * If any of the above methods return a {@link Resolution} the rest of the request processing is aborted and the
+ * resolution is executed.
+ * </p>
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("unchecked")
+ public void render(Content content, Paragraph paragraph, Writer out) throws IOException
+ {
+ // @fgiust start custom magnolia setup
+
+ WebContext webContext = (WebContext) MgnlContext.getInstance();
+ HttpServletResponse response = new StripesParagraphResponseWrapper(webContext.getResponse(), out);
+
+ final String templatePath = paragraph.getTemplatePath();
+ Map<String, String[]> nodeDataMap = contentToMap(content);
+
+ HttpServletRequest request;
+ try
+ {
+ request = new StripesParagraphRequestWrapper(
+ ((WebContext) MgnlContext.getInstance()).getRequest(),
+ templatePath,
+ nodeDataMap);
+
+ ((StripesParagraphRequestWrapper) request).setLocale(MgnlContext.getLocale());
+ }
+ catch (StripesServletException e)
+ {
+ throw new RuntimeException(e);
+ }
+
+ // @todo fgiust force include instead of forwarding. Not needed anymore since we are wrapping requestDispatcher?
+ request.setAttribute(StripesConstants.REQ_ATTR_INCLUDE_PATH, templatePath);
+
+ PageContext pageContext = webContext.getPageContext();
+ ServletContext servletContext = null;
+
+ if (pageContext != null)
+ {
+ pageContext.getServletContext();
+ }
+ // @fgiust end custom magnolia setup
+
+ // It sucks that we have to do this here (in the request cycle), but there doesn't
+ // seem to be a good way to get at the Configuration from the Filter in init()
+ doOneTimeConfiguration();
+
+ log.debug("Dispatching request to URL: ", request.getRequestURI());
+
+ try
+ {
+ final Configuration config = StripesFilter.getConfiguration();
+
+ // First manufacture an ActionBeanContext
+ final ActionBeanContext context = config
+ .getActionBeanContextFactory()
+ .getContextInstance(request, response);
+ context.setServletContext(servletContext);
+
+ // Then setup the ExecutionContext that we'll use to process this request
+ final ExecutionContext ctx = new ExecutionContext();
+ ctx.setInterceptors(config.getInterceptors(LifecycleStage.ActionBeanResolution));
+ ctx.setLifecycleStage(LifecycleStage.ActionBeanResolution);
+ ctx.setActionBeanContext(context);
+
+ ActionBeanContext abc = ctx.getActionBeanContext();
+ if (pageContext != null)
+ {
+ DispatcherHelper.setPageContext(pageContext);
+ }
+
+ // Resolve the ActionBean, and if an interceptor returns a resolution, bail now
+ saveActionBean(request);
+ Resolution resolution = DispatcherHelper.resolveActionBean(ctx);
+
+ if (resolution == null)
+ {
+ resolution = DispatcherHelper.resolveHandler(ctx);
+
+ if (resolution == null)
+ {
+ // Then run binding and validation
+ resolution = DispatcherHelper.doBindingAndValidation(ctx, true);
+
+ if (resolution == null)
+ {
+ // Then continue on to custom validation
+ resolution = DispatcherHelper.doCustomValidation(ctx, alwaysInvokeValidate);
+
+ if (resolution == null)
+ {
+ // And then validation error handling
+ resolution = DispatcherHelper.handleValidationErrors(ctx);
+
+ if (resolution == null)
+ {
+ // And finally(ish) invoking of the event handler
+ resolution = DispatcherHelper.invokeEventHandler(ctx);
+
+ // If the event produced errors, fill them in
+ DispatcherHelper.fillInValidationErrors(ctx);
+ }
+ }
+ }
+ }
+ }
+
+ // Whatever stage it came from, execute the resolution
+ if (resolution != null)
+ {
+ DispatcherHelper.executeResolution(ctx, resolution);
+ }
+ }
+ catch (RuntimeException re)
+ {
+ throw re;
+ }
+ catch (InvocationTargetException ite)
+ {
+ if (ite.getTargetException() instanceof RuntimeException)
+ {
+ throw (RuntimeException) ite.getTargetException();
+ }
+ else
+ {
+ throw new RuntimeException("ActionBean execution threw an exception.", ite.getTargetException());
+ }
+ }
+ catch (Exception e)
+ {
+ throw new RuntimeException("Exception encountered processing request.", e);
+ }
+ finally
+ {
+
+ if (pageContext != null)
+ {
+ // *Don't* release the page context, if set it will be closed by the main magnolia template
+ // JspFactory.getDefaultFactory().releasePageContext(pageContext);
+ DispatcherHelper.setPageContext(null);
+ }
+ restoreActionBean(request);
+ }
+ }
+
+ /**
+ * @param content paragraph node
+ * @return a map of Strings (converted nodedata)
+ */
+ @SuppressWarnings("unchecked")
+ protected Map<String, String[]> contentToMap(Content content)
+ {
+ Collection<NodeData> paragraphsData = content.getNodeDataCollection();
+ Map<String, String[]> nodeDataMap = new HashMap<String, String[]>();
+ for (NodeData nodeData : paragraphsData)
+ {
+ String name = nodeData.getName();
+ String value = nodeData.getString();
+ if (name.startsWith("multiple"))
+ {
+ nodeDataMap.put(name, StringUtils.split(value, "\n"));
+ }
+ else
+ {
+ nodeDataMap.put(name, new String[]{value });
+ }
+ }
+ return nodeDataMap;
+ }
+
+ /**
+ * Performs a simple piece of one time configuration that requires access to the Configuration object delivered
+ * through the Stripes Filter.
+ */
+ private void doOneTimeConfiguration()
+ {
+ if (alwaysInvokeValidate == null)
+ {
+ // Check to see if, in this application, validate() methods should always be run
+ // even when validation errors already exist
+ String callValidateWhenErrorsExist = StripesFilter
+ .getConfiguration()
+ .getBootstrapPropertyResolver()
+ .getProperty(DispatcherServlet.RUN_CUSTOM_VALIDATION_WHEN_ERRORS);
+
+ if (callValidateWhenErrorsExist != null)
+ {
+ BooleanTypeConverter c = new BooleanTypeConverter();
+ this.alwaysInvokeValidate = c.convert(callValidateWhenErrorsExist, Boolean.class, null);
+ }
+ else
+ {
+ this.alwaysInvokeValidate = false; // Default behaviour
+ }
+ }
+ }
+
+ /**
+ * Fetches, and lazily creates if required, a Stack in the request to store ActionBeans should the current request
+ * involve forwards or includes to other ActionBeans.
+ * @param request the current HttpServletRequest
+ * @param create create a Stack if not already set
+ * @return the Stack if present, or if creation is requested
+ */
+ @SuppressWarnings("unchecked")
+ protected Stack getActionBeanStack(HttpServletRequest request, boolean create)
+ {
+ Stack stack = (Stack) request.getAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN_STACK);
+ if (stack == null && create)
+ {
+ stack = new Stack();
+ request.setAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN_STACK, stack);
+ }
+
+ return stack;
+ }
+
+ /**
+ * Saves the current value of the 'actionBean' attribute in the request so that it can be restored at a later date
+ * by calling {@link #restoreActionBean(HttpServletRequest)}. If no ActionBean is currently stored in the request,
+ * nothing is changed.
+ * @param request the current HttpServletRequest
+ */
+ @SuppressWarnings("unchecked")
+ protected void saveActionBean(HttpServletRequest request)
+ {
+ if (request.getAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN) != null)
+ {
+ Stack stack = getActionBeanStack(request, true);
+ stack.push(request.getAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN));
+ }
+ }
+
+ /**
+ * Restores the previous value of the 'actionBean' attribute in the request. If no ActionBeans have been saved using
+ * {@link #saveActionBean(HttpServletRequest)} then this method has no effect.
+ * @param request the current HttpServletRequest
+ */
+ @SuppressWarnings("unchecked")
+ protected void restoreActionBean(HttpServletRequest request)
+ {
+ Stack stack = getActionBeanStack(request, false);
+ if (stack != null && !stack.empty())
+ {
+ request.setAttribute(StripesConstants.REQ_ATTR_ACTION_BEAN, stack.pop());
+ }
+ }
+
+}
Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java
===================================================================
--- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java (rev 0)
+++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphRequestWrapper.java 2007-07-30 10:16:00 UTC (rev 371)
@@ -0,0 +1,174 @@
+package it.openutils.magnoliastripes;
+
+import info.magnolia.context.MgnlContext;
+import info.magnolia.context.WebContext;
+
+import java.io.IOException;
+import java.util.Enumeration;
+import java.util.Hashtable;
+import java.util.Locale;
+import java.util.Map;
+
+import javax.servlet.RequestDispatcher;
+import javax.servlet.ServletException;
+import javax.servlet.ServletRequest;
+import javax.servlet.ServletResponse;
+import javax.servlet.http.HttpServletRequest;
+
+import net.sourceforge.stripes.controller.StripesRequestWrapper;
+import net.sourceforge.stripes.exception.StripesServletException;
+
+
+/**
+ * Magnolia request wrapper for Stripes actions.
+ * @author fgiust
+ * @version $Id: $
+ */
+class StripesParagraphRequestWrapper extends StripesRequestWrapper
+{
+
+ /**
+ * Hacked servlet path.
+ */
+ private String servletPath;
+
+ /**
+ * Parameter map.
+ */
+ private Map<String, String[]> parameterMap;
+
+ /**
+ * Instantiate a new request wrapper.
+ * @param request original HttpServletRequest
+ * @param servletPath modified servlet path (matches Stripes binding)
+ * @param paragraphsData map containing paragraph attributes
+ * @throws StripesServletException if any other error occurs constructing the wrapper
+ */
+ @SuppressWarnings("unchecked")
+ public StripesParagraphRequestWrapper(
+ HttpServletRequest request,
+ String servletPath,
+ Map<String, String[]> paragraphsData) throws StripesServletException
+ {
+ super(request);
+ this.servletPath = servletPath;
+
+ parameterMap = new Hashtable<String, String[]>();
+ parameterMap.putAll(request.getParameterMap());
+ parameterMap.putAll(paragraphsData);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getServletPath()
+ {
+ return servletPath;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ protected void setLocale(Locale locale)
+ {
+ super.setLocale(locale);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @SuppressWarnings("unchecked")
+ @Override
+ public Enumeration<String> getParameterNames()
+ {
+ return ((Hashtable) parameterMap).keys();
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String[] getParameterValues(String name)
+ {
+ return parameterMap.get(name);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public Map<String, String[]> getParameterMap()
+ {
+
+ return parameterMap;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public String getParameter(String name)
+ {
+ String[] values = getParameterValues(name);
+ if (values != null && values.length > 0)
+ {
+ return values[0];
+ }
+ else
+ {
+ return null;
+ }
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public RequestDispatcher getRequestDispatcher(String path)
+ {
+ return new MagnoliaRequestDispatcher(path);
+ }
+
+ /**
+ * A {@link RequestDispatcher} that uses {@link WebContext} for including a resource.
+ * @author fgiust
+ * @version $Id: $
+ */
+ private static class MagnoliaRequestDispatcher implements RequestDispatcher
+ {
+
+ /**
+ * The url this RequestDispatcher is bound to.
+ */
+ private String url;
+
+ /**
+ * Created a new MagnoliaRequestDispatcher for the given url.
+ * @param url url passed to {@link HttpServletRequest#getRequestDispatcher()}
+ */
+ public MagnoliaRequestDispatcher(String url)
+ {
+ this.url = url;
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void forward(ServletRequest request, ServletResponse response) throws ServletException, IOException
+ {
+ ((WebContext) MgnlContext.getInstance()).include(url, response.getWriter());
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public void include(ServletRequest request, ServletResponse response) throws ServletException, IOException
+ {
+ ((WebContext) MgnlContext.getInstance()).include(url, response.getWriter());
+ }
+ }
+}
\ No newline at end of file
Added: trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphResponseWrapper.java
===================================================================
--- trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphResponseWrapper.java (rev 0)
+++ trunk/openutils-mgnlstripes/src/main/java/it/openutils/magnoliastripes/StripesParagraphResponseWrapper.java 2007-07-30 10:16:00 UTC (rev 371)
@@ -0,0 +1,43 @@
+package it.openutils.magnoliastripes;
+
+import java.io.IOException;
+import java.io.PrintWriter;
+import java.io.Writer;
+
+import javax.servlet.http.HttpServletResponse;
+import javax.servlet.http.HttpServletResponseWrapper;
+
+
+/**
+ * A response wrapper for the Stripes paragraph (replace the standard writer with the Magnolia one).
+ * @author fgiust
+ * @version $Id: $
+ */
+class StripesParagraphResponseWrapper extends HttpServletResponseWrapper
+{
+
+ /**
+ * Writer that should be used for output.
+ */
+ private PrintWriter out;
+
+ /**
+ * @param response HttpServletResponse
+ * @param out writer guven by Magnolia.
+ */
+ public StripesParagraphResponseWrapper(HttpServletResponse response, Writer out)
+ {
+ super(response);
+ this.out = new PrintWriter(out);
+ }
+
+ /**
+ * {@inheritDoc}
+ */
+ @Override
+ public PrintWriter getWriter() throws IOException
+ {
+ return out;
+ }
+
+}
\ No newline at end of file
Added: trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml
===================================================================
--- trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml (rev 0)
+++ trunk/openutils-mgnlstripes/src/main/resources/META-INF/magnolia/stripes.xml 2007-07-30 10:16:00 UTC (rev 371)
@@ -0,0 +1,9 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!DOCTYPE module SYSTEM "module.dtd">
+<module>
+ <name>stripes</name>
+ <displayName>stripes</displayName>
+ <description>Stripes integration module</description>
+ <class>it.openutils.magnoliastripes.StripesModule</class>
+ <version>0.1</version>
+</module>
Added: trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml
===================================================================
--- trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml (rev 0)
+++ trunk/openutils-mgnlstripes/src/main/resources/mgnl-bootstrap/stripes/config.modules.stripes.paragraph-renderers.stripes.xml 2007-07-30 10:16:00 UTC (rev 371)
@@ -0,0 +1,47 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<sv:node sv:name="stripes" xmlns:jcr="http://www.jcp.org/jcr/1.0" xmlns:mgnl="http://www.magnolia.info/jcr/mgnl"
+ xmlns:rep="internal" xmlns:mix="http://www.jcp.org/jcr/mix/1.0" xmlns:nt="http://www.jcp.org/jcr/nt/1.0"
+ xmlns:fn="http://www.w3.org/2005/xpath-functions" xmlns:xs="http://www.w3.org/2001/XMLSchema"
+ xmlns:fn_old="http://www.w3.org/2004/10/xpath-functions" xmlns:sv="http://www.jcp.org/jcr/sv/1.0" xmlns:jcrfn="http://www.jcp.org/jcr/xpath-functions/1.0">
+ <sv:property sv:name="jcr:primaryType" sv:type="Name">
+ <sv:value>mgnl:contentNode</sv:value>
+ </sv:property>
+ <sv:property sv:name="jcr:mixinTypes" sv:type="Name">
+ <sv:value>m...
[truncated message content] |
|
From: <fc...@us...> - 2007-08-03 13:55:24
|
Revision: 376
http://openutils.svn.sourceforge.net/openutils/?rev=376&view=rev
Author: fcarone
Date: 2007-08-03 06:55:17 -0700 (Fri, 03 Aug 2007)
Log Message:
-----------
Initial project layout
Added Paths:
-----------
trunk/openutils-hibernate-security/
trunk/openutils-hibernate-security/pom.xml
trunk/openutils-hibernate-security/src/
trunk/openutils-hibernate-security/src/main/
trunk/openutils-hibernate-security/src/main/java/
trunk/openutils-hibernate-security/src/main/resources/
trunk/openutils-hibernate-security/src/test/
trunk/openutils-hibernate-security/src/test/java/
trunk/openutils-hibernate-security/src/test/resources/
Property changes on: trunk/openutils-hibernate-security
___________________________________________________________________
Name: svn:ignore
+ target
.settings
.checkstyle
.classpath
.project
Added: trunk/openutils-hibernate-security/pom.xml
===================================================================
--- trunk/openutils-hibernate-security/pom.xml (rev 0)
+++ trunk/openutils-hibernate-security/pom.xml 2007-08-03 13:55:17 UTC (rev 376)
@@ -0,0 +1,115 @@
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-hibernate-security</artifactId>
+ <packaging>jar</packaging>
+ <name>openutils-hibernate-security</name>
+ <version>0.0.1-SNAPSHOT</version>
+ <description>Hibernate Security classes</description>
+ <dependencies>
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-usermanagement</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-usermanagement-dataobjects</artifactId>
+ <version>1.1.1</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-bshd5</artifactId>
+ <version>1.0.2</version>
+ </dependency>
+ <dependency>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils-testing</artifactId>
+ <version>1.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>org.hibernate</groupId>
+ <artifactId>hibernate-annotations</artifactId>
+ <version>3.2.1.ga</version>
+ </dependency>
+ <dependency>
+ <groupId>commons-dbcp</groupId>
+ <artifactId>commons-dbcp</artifactId>
+ <version>1.2.1</version>
+ <scope>test</scope>
+ <exclusions>
+ <exclusion>
+ <artifactId>xerces</artifactId>
+ <groupId>xerces</groupId>
+ </exclusion>
+ <exclusion>
+ <artifactId>xml-apis</artifactId>
+ <groupId>xml-apis</groupId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.acegisecurity</groupId>
+ <artifactId>acegi-security</artifactId>
+ <version>1.0.3</version>
+ <exclusions>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-remoting</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-jdbc</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-support</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>logkit</groupId>
+ <artifactId>logkit</artifactId>
+ </exclusion>
+ <exclusion>
+ <groupId>avalon-framework</groupId>
+ <artifactId>avalon-framework</artifactId>
+ </exclusion>
+ </exclusions>
+ </dependency>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.2.2.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>4.0</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>dbunit</groupId>
+ <artifactId>dbunit</artifactId>
+ <version>2.1</version>
+ <scope>test</scope>
+ </dependency>
+ </dependencies>
+</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: <fc...@us...> - 2007-08-03 14:36:16
|
Revision: 379
http://openutils.svn.sourceforge.net/openutils/?rev=379&view=rev
Author: fcarone
Date: 2007-08-03 07:36:17 -0700 (Fri, 03 Aug 2007)
Log Message:
-----------
some pom refactoring and intermodule version updates
Modified Paths:
--------------
trunk/openutils-bshd5/pom.xml
trunk/openutils-configuration-services/pom.xml
trunk/openutils-dbmigration/pom.xml
trunk/openutils-deployment/pom.xml
trunk/openutils-spring/pom.xml
trunk/openutils-tags-spring/pom.xml
trunk/openutils-testing-junit/pom.xml
trunk/openutils-testing-testng/pom.xml
trunk/openutils-usermanagement/pom.xml
trunk/pom.xml
Modified: trunk/openutils-bshd5/pom.xml
===================================================================
--- trunk/openutils-bshd5/pom.xml 2007-08-03 14:02:40 UTC (rev 378)
+++ trunk/openutils-bshd5/pom.xml 2007-08-03 14:36:17 UTC (rev 379)
@@ -1,4 +1,5 @@
-<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">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sourceforge.openutils</groupId>
@@ -10,16 +11,19 @@
<name>openutils base Spring-Hibernate DAO for java 5.0</name>
<version>1.0.6-SNAPSHOT</version>
<description>openutils base Spring-Hibernate DAO for java 5.0</description>
+ <properties>
+ <spring.version>2.0.6</spring.version>
+ </properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-hibernate3</artifactId>
- <version>2.0.1</version>
+ <version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
- <version>2.0.1</version>
+ <version>${spring.version}</version>
</dependency>
<dependency>
<groupId>org.hibernate</groupId>
Modified: trunk/openutils-configuration-services/pom.xml
===================================================================
--- trunk/openutils-configuration-services/pom.xml 2007-08-03 14:02:40 UTC (rev 378)
+++ trunk/openutils-configuration-services/pom.xml 2007-08-03 14:36:17 UTC (rev 379)
@@ -75,7 +75,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-aop</artifactId>
- <version>2.0.1</version>
+ <version>2.0.6</version>
<scope>test</scope>
</dependency>
<dependency>
Modified: trunk/openutils-dbmigration/pom.xml
===================================================================
--- trunk/openutils-dbmigration/pom.xml 2007-08-03 14:02:40 UTC (rev 378)
+++ trunk/openutils-dbmigration/pom.xml 2007-08-03 14:36:17 UTC (rev 379)
@@ -10,6 +10,9 @@
<name>openutils db migration framework</name>
<version>0.7.2-SNAPSHOT</version>
<description />
+ <properties>
+ <spring.version>2.0.6</spring.version>
+ </properties>
<dependencies>
<dependency>
<groupId>commons-lang</groupId>
@@ -24,7 +27,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
- <version>2.0.1</version>
+ <version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>avalon-framework</groupId>
@@ -39,7 +42,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-beans</artifactId>
- <version>2.0.1</version>
+ <version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>avalon-framework</groupId>
@@ -54,7 +57,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-core</artifactId>
- <version>2.0.1</version>
+ <version>${spring.version}</version>
<exclusions>
<exclusion>
<groupId>avalon-framework</groupId>
Modified: trunk/openutils-deployment/pom.xml
===================================================================
--- trunk/openutils-deployment/pom.xml 2007-08-03 14:02:40 UTC (rev 378)
+++ trunk/openutils-deployment/pom.xml 2007-08-03 14:36:17 UTC (rev 379)
@@ -1,4 +1,5 @@
-<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">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sourceforge.openutils</groupId>
@@ -10,6 +11,9 @@
<name>openutils deployment tools</name>
<version>1.0.9-SNAPSHOT</version>
<description />
+ <properties>
+ <spring.version>2.0.6</spring.version>
+ </properties>
<dependencies>
<dependency>
<groupId>commons-lang</groupId>
@@ -19,7 +23,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
- <version>2.0.1</version>
+ <version>${spring.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
@@ -35,7 +39,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-jdbc</artifactId>
- <version>2.0.1</version>
+ <version>${spring.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
Modified: trunk/openutils-spring/pom.xml
===================================================================
--- trunk/openutils-spring/pom.xml 2007-08-03 14:02:40 UTC (rev 378)
+++ trunk/openutils-spring/pom.xml 2007-08-03 14:36:17 UTC (rev 379)
@@ -11,11 +11,14 @@
<name>openutils spring tools</name>
<version>1.0.3-SNAPSHOT</version>
<description />
+ <properties>
+ <spring.version>2.0.6</spring.version>
+ </properties>
<dependencies>
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-webmvc</artifactId>
- <version>2.0.1</version>
+ <version>${spring.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
@@ -47,7 +50,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-remoting</artifactId>
- <version>2.0.1</version>
+ <version>${spring.version}</version>
</dependency>
<dependency>
<groupId>net.sf.json-lib</groupId>
Modified: trunk/openutils-tags-spring/pom.xml
===================================================================
--- trunk/openutils-tags-spring/pom.xml 2007-08-03 14:02:40 UTC (rev 378)
+++ trunk/openutils-tags-spring/pom.xml 2007-08-03 14:36:17 UTC (rev 379)
@@ -1,4 +1,5 @@
-<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">
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
<modelVersion>4.0.0</modelVersion>
<parent>
<groupId>net.sourceforge.openutils</groupId>
@@ -10,6 +11,9 @@
<name>openutils tags for spring MVC</name>
<version>0.5-SNAPSHOT</version>
<description />
+ <properties>
+ <spring.version>2.0.6</spring.version>
+ </properties>
<dependencies>
<dependency>
<groupId>javax.servlet</groupId>
@@ -46,7 +50,7 @@
<dependency>
<groupId>org.springframework</groupId>
<artifactId>spring-web</artifactId>
- <version>2.0.1</version>
+ <version>${spring.version}</version>
<optional>true</optional>
<exclusions>
<exclusion>
Modified: trunk/openutils-testing-junit/pom.xml
===================================================================
--- trunk/openutils-testing-junit/pom.xml 2007-08-03 14:02:40 UTC (rev 378)
+++ trunk/openutils-testing-junit/pom.xml 2007-08-03 14:36:17 UTC (rev 379)
@@ -1,58 +1,62 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>net.sourceforge.openutils</groupId>
- <artifactId>openutils</artifactId>
- <version>3</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>openutils-testing-junit</artifactId>
- <name>openutils test utils (junit)</name>
- <version>1.1.2-SNAPSHOT</version>
- <description>openutils test utils</description>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.2</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.13</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>2.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>2.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-hibernate3</artifactId>
- <version>2.0.1</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.3</version>
- </dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
- <version>2.2</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>junit</groupId>
- <artifactId>junit</artifactId>
- <version>3.8.1</version>
- </dependency>
- </dependencies>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>openutils-testing-junit</artifactId>
+ <name>openutils test utils (junit)</name>
+ <version>1.1.2-SNAPSHOT</version>
+ <description>openutils test utils</description>
+ <properties>
+ <spring.version>2.0.6</spring.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.13</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-hibernate3</artifactId>
+ <version>${spring.version}</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.dbunit</groupId>
+ <artifactId>dbunit</artifactId>
+ <version>2.2</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>junit</groupId>
+ <artifactId>junit</artifactId>
+ <version>3.8.1</version>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Modified: trunk/openutils-testing-testng/pom.xml
===================================================================
--- trunk/openutils-testing-testng/pom.xml 2007-08-03 14:02:40 UTC (rev 378)
+++ trunk/openutils-testing-testng/pom.xml 2007-08-03 14:36:17 UTC (rev 379)
@@ -1,59 +1,63 @@
-<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
- <modelVersion>4.0.0</modelVersion>
- <parent>
- <groupId>net.sourceforge.openutils</groupId>
- <artifactId>openutils</artifactId>
- <version>3</version>
- <relativePath>..</relativePath>
- </parent>
- <artifactId>openutils-testing-testng</artifactId>
- <name>openutils test utils (testng)</name>
- <version>1.1.3-SNAPSHOT</version>
- <description>openutils test utils</description>
- <dependencies>
- <dependency>
- <groupId>org.slf4j</groupId>
- <artifactId>slf4j-log4j12</artifactId>
- <version>1.2</version>
- </dependency>
- <dependency>
- <groupId>log4j</groupId>
- <artifactId>log4j</artifactId>
- <version>1.2.13</version>
- <scope>test</scope>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-core</artifactId>
- <version>2.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-context</artifactId>
- <version>2.0.1</version>
- </dependency>
- <dependency>
- <groupId>org.springframework</groupId>
- <artifactId>spring-hibernate3</artifactId>
- <version>2.0.1</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>commons-lang</groupId>
- <artifactId>commons-lang</artifactId>
- <version>2.3</version>
- </dependency>
- <dependency>
- <groupId>org.dbunit</groupId>
- <artifactId>dbunit</artifactId>
- <version>2.2</version>
- <optional>true</optional>
- </dependency>
- <dependency>
- <groupId>org.testng</groupId>
- <artifactId>testng</artifactId>
- <classifier>jdk15</classifier>
- <version>5.1</version>
- </dependency>
- </dependencies>
+<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
+ xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
+ <modelVersion>4.0.0</modelVersion>
+ <parent>
+ <groupId>net.sourceforge.openutils</groupId>
+ <artifactId>openutils</artifactId>
+ <version>3</version>
+ <relativePath>..</relativePath>
+ </parent>
+ <artifactId>openutils-testing-testng</artifactId>
+ <name>openutils test utils (testng)</name>
+ <version>1.1.3-SNAPSHOT</version>
+ <description>openutils test utils</description>
+ <properties>
+ <spring.version>2.0.6</spring.version>
+ </properties>
+ <dependencies>
+ <dependency>
+ <groupId>org.slf4j</groupId>
+ <artifactId>slf4j-log4j12</artifactId>
+ <version>1.2</version>
+ </dependency>
+ <dependency>
+ <groupId>log4j</groupId>
+ <artifactId>log4j</artifactId>
+ <version>1.2.13</version>
+ <scope>test</scope>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-core</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-context</artifactId>
+ <version>${spring.version}</version>
+ </dependency>
+ <dependency>
+ <groupId>org.springframework</groupId>
+ <artifactId>spring-hibernate3</artifactId>
+ <version>${spring.version}</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>commons-lang</groupId>
+ <artifactId>commons-lang</artifactId>
+ <version>2.3</version>
+ </dependency>
+ <dependency>
+ <groupId>org.dbunit</groupId>
+ <artifactId>dbunit</artifactId>
+ <version>2.2</version>
+ <optional>true</optional>
+ </dependency>
+ <dependency>
+ <groupId>org.testng</groupId>
+ <artifactId>testng</artifactId>
+ <classifier>jdk15</classifier>
+ <version>5.1</version>
+ </dependency>
+ </dependencies>
</project>
\ No newline at end of file
Modified: trunk/openutils-usermanagement/pom.xml
===================================================================
--- trunk/openutils-usermanagement/pom.xml 2007-08-03 14:02:40 UTC (rev 378)
+++ trunk/openutils-usermanagement/pom.xml 2007-08-03 14:36:17 UTC (rev 379)
@@ -32,8 +32,8 @@
</dependency>
<dependency>
<groupId>net.sourceforge.openutils</groupId>
- <artifactId>openutils-testing</artifactId>
- <version>1.0</version>
+ <artifactId>openutils-testing-junit</artifactId>
+ <version>1.1.1</version>
<scope>test</scope>
</dependency>
<dependency>
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-08-03 14:02:40 UTC (rev 378)
+++ trunk/pom.xml 2007-08-03 14:36:17 UTC (rev 379)
@@ -60,6 +60,16 @@
<timezone>+1</timezone>
</developer>
<developer>
+ <id>fcarone</id>
+ <name>Filippo Carone</name>
+ <email>fil...@op...</email>
+ <organization>openmind</organization>
+ <roles>
+ <role>developer</role>
+ </roles>
+ <timezone>+1</timezone>
+ </developer>
+ <developer>
<id>fberar</id>
<name>Fabrizio Berardi</name>
<email>fab...@op...</email>
@@ -170,7 +180,10 @@
<module>openutils-backup</module>
<module>openutils-configuration-dataobjects</module>
<module>openutils-configuration-services</module>
- <module>openutils-mgnlspring</module>
+ <module>openutils-hibernate-security</module>
+ <!--
+ <module>openutils-mgnlspring</module>
<module>openutils-mgnlstripes</module>
+ -->
</modules>
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|
|
From: <fg...@us...> - 2007-08-13 10:25:20
|
Revision: 398
http://openutils.svn.sourceforge.net/openutils/?rev=398&view=rev
Author: fgiust
Date: 2007-08-13 03:25:18 -0700 (Mon, 13 Aug 2007)
Log Message:
-----------
fix website (still pretty ugly, but updated)
Modified Paths:
--------------
trunk/openutils-log4j/src/site/site.xml
trunk/openutils-mgnlstripes/src/site/apt/index.apt
trunk/pom.xml
trunk/src/site/apt/index.apt
trunk/src/site/site.xml
Property Changed:
----------------
trunk/openutils-hibernate-security/
Property changes on: trunk/openutils-hibernate-security
___________________________________________________________________
Name: svn:ignore
- target
.settings
.checkstyle
.classpath
.project
+ target
.settings
.checkstyle
.classpath
.project
derby.log
Modified: trunk/openutils-log4j/src/site/site.xml
===================================================================
--- trunk/openutils-log4j/src/site/site.xml 2007-08-13 10:04:10 UTC (rev 397)
+++ trunk/openutils-log4j/src/site/site.xml 2007-08-13 10:25:18 UTC (rev 398)
@@ -15,6 +15,9 @@
<item name="filtered layout" href="filteredlayout.html" />
<item name="configuration servlet" href="servlet.html" />
</menu>
- ${reports}
+ <menu ref="reports" inherit="bottom" />
+ <head>
+ <style type="text/css" media="all">@import url(../css/site.css);</style>
+ </head>
</body>
</project>
Modified: trunk/openutils-mgnlstripes/src/site/apt/index.apt
===================================================================
--- trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-13 10:04:10 UTC (rev 397)
+++ trunk/openutils-mgnlstripes/src/site/apt/index.apt 2007-08-13 10:25:18 UTC (rev 398)
@@ -4,7 +4,7 @@
Fabrizio Giustina
--------------------------
-About
+About openutils-mgnlstripes
openutils-mgnlstripes is a custom {{{http://www.magnolia.info}magnolia}} module which integrates the
{{{http://mc4j.org/confluence/display/stripes/Home}Stripes}} MVC framework.
Modified: trunk/pom.xml
===================================================================
--- trunk/pom.xml 2007-08-13 10:04:10 UTC (rev 397)
+++ trunk/pom.xml 2007-08-13 10:25:18 UTC (rev 398)
@@ -126,6 +126,27 @@
</additionalConfig>
</configuration>
</plugin>
+ <plugin>
+ <artifactId>maven-antrun-plugin</artifactId>
+ <executions>
+ <execution>
+ <id>site-build</id>
+ <phase>site</phase>
+ <goals>
+ <goal>run</goal>
+ </goals>
+ <configuration>
+ <tasks>
+ <copy overwrite="false" todir="src/site" flatten="true">
+ <fileset dir="..">
+ <include name="src/site/site.xml"></include>
+ </fileset>
+ </copy>
+ </tasks>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
</plugins>
</build>
<reporting>
Modified: trunk/src/site/apt/index.apt
===================================================================
--- trunk/src/site/apt/index.apt 2007-08-13 10:04:10 UTC (rev 397)
+++ trunk/src/site/apt/index.apt 2007-08-13 10:25:18 UTC (rev 398)
@@ -1,22 +1,19 @@
- --------------------------
- O p e n u t i l s
- --------------------------
- Fabrizio Giustina
- --------------------------
+ --------------------------
+ O p e n u t i l s
+ --------------------------
+ Fabrizio Giustina
+ --------------------------
Openutils
- Openutils is a collection of small java libraries, utilities and extensions for common frameworks and tools used in
- j2ee projects.
+ Openutils is a collection of small java libraries, utilities and extensions for common frameworks and tools used in
+ j2ee projects.
- Most of the code comes from projects developed at
+ Most of the code comes from projects developed at
-[images/openmind-logo.png] openmind
+ [images/openmind-logo.png] openmind
- {{{http://www.openmindonline.it}http://www.openmindonline.it}}
+ {{{http://www.openmindonline.it}http://www.openmindonline.it}}
-* News
-
- * <November 14, 2005> {{{openutils-log4j/index.html}openutils-log4j}} 1.0 released!
\ No newline at end of file
Modified: trunk/src/site/site.xml
===================================================================
--- trunk/src/site/site.xml 2007-08-13 10:04:10 UTC (rev 397)
+++ trunk/src/site/site.xml 2007-08-13 10:25:18 UTC (rev 398)
@@ -7,17 +7,13 @@
<bannerLeft>
<name>Sourceforge</name>
<src>http://sourceforge.net/sflogo.php?group_id=150467&amp;type=2</src>
- <href>http://www.sourceforge.net/projects/openutils</href>
+ <href>http://openutils.sourceforge.net</href>
</bannerLeft>
<body>
- <menu name="Projects">
- <item name="openutils-log4j" href="openutils-log4j" />
- </menu>
- <menu name="Sandbox">
- <item name="openutils-deployment" href="openutils-deployment" />
- <item name="openutils-bshd5" href="openutils-bshd5" />
- <item name="openutils-spring" href="openutils-spring" />
- </menu>
- ${reports}
+ <menu ref="modules" inherit="bottom" />
+ <menu ref="reports" inherit="bottom" />
+ <head>
+ <style type="text/css" media="all">@import url(../css/site.css);</style>
+ </head>
</body>
</project>
This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.
|