[wsas-java-dev] svn commit r4562 - in trunk/wsas/java/modules:
admin core core/conf/hibernate core/test-resources integration
svn at wso2.org
svn at wso2.org
Sun Jul 1 03:43:02 PDT 2007
Author: saminda
Date: Sun Jul 1 03:42:26 2007
New Revision: 4562
Added:
trunk/wsas/java/modules/core/test-resources/wso2wsas.hibernate.cfg.xml
Removed:
trunk/wsas/java/modules/core/conf/hibernate/test-hibernate.cfg.xml
Modified:
trunk/wsas/java/modules/admin/pom.xml
trunk/wsas/java/modules/core/pom.xml
trunk/wsas/java/modules/integration/pom.xml
Log:
Fixing test cases
Modified: trunk/wsas/java/modules/admin/pom.xml
==============================================================================
--- trunk/wsas/java/modules/admin/pom.xml (original)
+++ trunk/wsas/java/modules/admin/pom.xml Sun Jul 1 03:42:26 2007
@@ -52,6 +52,27 @@
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
+ <testResources>
+ <testResource>
+ <directory>../core/test-resources</directory>
+ <includes>
+ <include>**/*.cfg.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>../core/conf/hibernate</directory>
+ <includes>
+ <include>**/*.hbm.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>../core/conf</directory>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -170,11 +191,6 @@
<fileset file="target/wso2wsas-admin-${wso2wsas.version}.mar"/>
</copy>
- <copy file="../core/conf/hibernate/test-hibernate.cfg.xml"
- tofile="target/test-classes/wso2wsas.hibernate.cfg.xml"/>
- <copy file="../core/conf/log4j.properties"
- tofile="target/test-classes/log4j.properties"/>
-
<!-- Copying throttle related resources -->
<copy todir="target/tomcat_test/repository/services">
<fileset dir="test-resources/repository/services"/>
Modified: trunk/wsas/java/modules/core/pom.xml
==============================================================================
--- trunk/wsas/java/modules/core/pom.xml (original)
+++ trunk/wsas/java/modules/core/pom.xml Sun Jul 1 03:42:26 2007
@@ -28,6 +28,27 @@
</resource>
</resources>
+ <testResources>
+ <testResource>
+ <directory>test-resources</directory>
+ <includes>
+ <include>**/*.cfg.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>conf/hibernate</directory>
+ <includes>
+ <include>**/*.hbm.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>conf</directory>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -168,29 +189,8 @@
<phase>process-test-resources</phase>
<configuration>
<tasks>
- <!-- 1. Processing Hibernate config and hbm xmls to test cases. Should find a
- better way to do this.
- -->
- <mkdir dir="target/test-classes"/>
- <copy todir="target/test-classes">
- <fileset dir="conf/hibernate"/>
- </copy>
- <delete file="target/test-classes/wso2wsas.hibernate.cfg.xml"/>
- <copy file="conf/hibernate/test-hibernate.cfg.xml"
- tofile="target/test-classes/wso2wsas.hibernate.cfg.xml"/>
- <copy file="conf/log4j.properties"
- tofile="target/test-classes/log4j.properties"/>
-
- <!-- 1. Processing Hibernate config and hbm xmls to test cases. Should find a
- better way to do this.
- -->
- <mkdir dir="target/test-classes"/>
- <copy file="conf/wso2wsas.properties"
- tofile="target/test-classes/wso2wsas.properties"/>
- <copy file="conf/log4j.properties"
- tofile="target/test-classes/log4j.properties"/>
- <!--2. Building the lightweight Tomcat environment -->
+ <!-- 1. Building the lightweight Tomcat environment -->
<!--
target
-+ tomcat_test
@@ -240,7 +240,7 @@
<copy file="test-resources/axis2.xml"
tofile="${tomcat_test_conf}/axis2.xml"/>
- <!-- 3. jks and repository-->
+ <!-- 2. jks and repository-->
<genkey alias="wso2wsas" storepass="wso2wsas" keyalg="RSA"
keystore="${tomcat_test_conf}/wso2wsas.jks"
@@ -253,7 +253,7 @@
</dname>
</genkey>
- <!-- 2. Copying the repo -->
+ <!-- 3. Copying the repo -->
<copy todir="${tomcat_repository}">
<fileset dir="target/repository">
<include name="**/*.mar"/>
Added: trunk/wsas/java/modules/core/test-resources/wso2wsas.hibernate.cfg.xml
==============================================================================
--- (empty file)
+++ trunk/wsas/java/modules/core/test-resources/wso2wsas.hibernate.cfg.xml Sun Jul 1 03:42:26 2007
@@ -0,0 +1,30 @@
+<?xml version='1.0' encoding='utf-8'?>
+<!DOCTYPE hibernate-configuration PUBLIC
+ "-//Hibernate/Hibernate Configuration DTD 3.0//EN"
+ "http://hibernate.sourceforge.net/hibernate-configuration-3.0.dtd">
+
+<hibernate-configuration>
+ <session-factory>
+
+ <!-- Database connection settings -->
+ <property name="connection.driver_class">org.apache.derby.jdbc.EmbeddedDriver</property>
+ <property name="connection.url">jdbc:derby:target/database/WSO2WSAS_DB;create=true
+ </property>
+ <property name="connection.username">wso2wsas</property>
+ <property name="connection.password">wso2wsas</property>
+
+ <!-- JDBC connection pool (use the built-in) -->
+ <property name="connection.pool_size">1</property>
+
+ <!-- SQL dialect -->
+ <property name="dialect">org.hibernate.dialect.DerbyDialect</property>
+
+ <!-- Echo all executed SQL to stdout -->
+ <property name="show_sql">false</property>
+
+ <!-- Posible values for hbm2ddl.auto (update | create | create-drop)-->
+ <property name="hbm2ddl.auto">create</property>
+
+ <mapping resource="wso2wsas.hbm.xml"/>
+ </session-factory>
+</hibernate-configuration>
\ No newline at end of file
Modified: trunk/wsas/java/modules/integration/pom.xml
==============================================================================
--- trunk/wsas/java/modules/integration/pom.xml (original)
+++ trunk/wsas/java/modules/integration/pom.xml Sun Jul 1 03:42:26 2007
@@ -90,6 +90,27 @@
<sourceDirectory>src</sourceDirectory>
<testSourceDirectory>test</testSourceDirectory>
+ <testResources>
+ <testResource>
+ <directory>../core/test-resources</directory>
+ <includes>
+ <include>**/*.cfg.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>../core/conf/hibernate</directory>
+ <includes>
+ <include>**/*.hbm.xml</include>
+ </includes>
+ </testResource>
+ <testResource>
+ <directory>../core/conf</directory>
+ <includes>
+ <include>**/*.properties</include>
+ </includes>
+ </testResource>
+ </testResources>
+
<plugins>
<plugin>
<groupId>org.apache.maven.plugins</groupId>
@@ -140,13 +161,6 @@
<delete dir="target/tmp"/>
- <copy file="../core/conf/hibernate/test-hibernate.cfg.xml"
- tofile="target/test-classes/wso2wsas.hibernate.cfg.xml"/>
- <copy file="../core/conf/wso2wsas.properties"
- tofile="target/test-classes/wso2wsas.properties"/>
- <copy file="../core/conf/log4j.properties"
- tofile="target/test-classes/log4j.properties"/>
-
<copy todir="target/tomcat_test">
<fileset dir="../core/target/tomcat_test"/>
</copy>
More information about the Wsas-java-dev
mailing list