Author: lresende
Date: Thu Dec 13 13:59:15 2007
New Revision: 604046
URL: http://svn.apache.org/viewvc?rev=604046&view=rev
Log:
Removing canned derby db and creating it on the fly
Added:
incubator/tuscany/java/sca/modules/implementation-data-xml/company.sql
Removed:
incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/resources/dastest/
Modified:
incubator/tuscany/java/sca/modules/implementation-data-xml/pom.xml
incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/resources/data-feed.composite
incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/resources/data.composite
Added: incubator/tuscany/java/sca/modules/implementation-data-xml/company.sql
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-data-xml/company.sql?rev=604046&view=auto
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-data-xml/company.sql
(added)
+++ incubator/tuscany/java/sca/modules/implementation-data-xml/company.sql Thu
Dec 13 13:59:15 2007
@@ -0,0 +1,28 @@
+--
+-- Licensed to the Apache Software Foundation (ASF) under one
+-- or more contributor license agreements. See the NOTICE file
+-- distributed with this work for additional information
+-- regarding copyright ownership. The ASF licenses this file
+-- to you under the Apache License, Version 2.0 (the
+-- "License"); you may not use this file except in compliance
+-- with the License. You may obtain a copy of the License at
+--
+-- http://www.apache.org/licenses/LICENSE-2.0
+--
+-- Unless required by applicable law or agreed to in writing,
+-- software distributed under the License is distributed on an
+-- "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+-- KIND, either express or implied. See the License for the
+-- specific language governing permissions and limitations
+-- under the License.
+--
+
+DROP TABLE COMPANY;
+
+CREATE TABLE COMPANY (
+ ID INT PRIMARY KEY NOT NULL GENERATED ALWAYS AS IDENTITY,
+ NAME VARCHAR(30));
+
+INSERT INTO COMPANY (NAME) VALUES('ACME Publishing');
+INSERT INTO COMPANY (NAME) VALUES('Do-rite plumbing');
+INSERT INTO COMPANY (NAME) VALUES('MegaCorp');
\ No newline at end of file
Modified: incubator/tuscany/java/sca/modules/implementation-data-xml/pom.xml
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-data-xml/pom.xml?rev=604046&r1=604045&r2=604046&view=diff
==============================================================================
--- incubator/tuscany/java/sca/modules/implementation-data-xml/pom.xml
(original)
+++ incubator/tuscany/java/sca/modules/implementation-data-xml/pom.xml Thu Dec
13 13:59:15 2007
@@ -133,6 +133,58 @@
<build>
<finalName>${artifactId}</finalName>
+
+ <plugins>
+ <plugin>
+ <groupId>org.codehaus.mojo</groupId>
+ <artifactId>sql-maven-plugin</artifactId>
+ <!-- 1.1 due to MOJO-619 -->
+ <version>1.1-SNAPSHOT</version>
+
+ <dependencies>
+ <dependency>
+ <groupId>org.apache.derby</groupId>
+ <artifactId>derby</artifactId>
+ <version>10.1.2.1</version>
+ </dependency>
+ </dependencies>
+
+ <executions>
+ <execution>
+ <id>create-db</id>
+ <phase>generate-resources</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+
<driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
+
<url>jdbc:derby:${pom.basedir}/target/test-classes/company;create=true</url>
+ <autocommit>true</autocommit>
+ <onError>continue</onError>
+ <onConnectionError>skip</onConnectionError>
+ <delimiter>;</delimiter>
+ <srcFiles>
+ <srcFile>${pom.basedir}/company.sql</srcFile>
+ </srcFiles>
+ </configuration>
+ </execution>
+
+ <!-- Shutdown DB in order to be able to run unit tests -->
+ <execution>
+ <id>shutdown-database-sothat-test-can-run</id>
+ <phase>process-test-resources</phase>
+ <goals>
+ <goal>execute</goal>
+ </goals>
+ <configuration>
+
<driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
+
<url>jdbc:derby:${pom.basedir}/target/test-classes/company;shutdown=true</url>
+
<skipOnConnectionError>true</skipOnConnectionError>
+ </configuration>
+ </execution>
+ </executions>
+ </plugin>
+ </plugins>
</build>
</project>
Modified:
incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/resources/data-feed.composite
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/resources/data-feed.composite?rev=604046&r1=604045&r2=604046&view=diff
==============================================================================
---
incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/resources/data-feed.composite
(original)
+++
incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/resources/data-feed.composite
Thu Dec 13 13:59:15 2007
@@ -41,7 +41,7 @@
<tuscany:connectionInfo>
<tuscany:connectionProperties
driverClass="org.apache.derby.jdbc.EmbeddedDriver"
- databaseURL="jdbc:derby:target/test-classes/dastest;
create = true"
+ databaseURL="jdbc:derby:target/test-classes/company;
create = true"
loginTimeout="600000"/>
</tuscany:connectionInfo>
</tuscany:implementation.data.xml>
Modified:
incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/resources/data.composite
URL:
http://svn.apache.org/viewvc/incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/resources/data.composite?rev=604046&r1=604045&r2=604046&view=diff
==============================================================================
---
incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/resources/data.composite
(original)
+++
incubator/tuscany/java/sca/modules/implementation-data-xml/src/test/resources/data.composite
Thu Dec 13 13:59:15 2007
@@ -27,7 +27,7 @@
<tuscany:connectionInfo>
<tuscany:connectionProperties
driverClass="org.apache.derby.jdbc.EmbeddedDriver"
- databaseURL="jdbc:derby:target/test-classes/dastest;
create = true"
+ databaseURL="jdbc:derby:target/test-classes/company;
create = true"
loginTimeout="600000"/>
</tuscany:connectionInfo>
</tuscany:implementation.data.xml>
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]