You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@tuscany.apache.org by js...@apache.org on 2008/05/03 23:36:58 UTC
svn commit: r653145 - in /incubator/tuscany/java/sca/tutorial:
assets/services/db/ShoppingCartTableImpl.java store-supplier/pom.xml
store-test/pom.xml store-test/test/StoreSupplierTestCase.java
store-test/test/StoreSupplierTestCaseFIXME.java
Author: jsdelfino
Date: Sat May 3 14:36:57 2008
New Revision: 653145
URL: http://svn.apache.org/viewvc?rev=653145&view=rev
Log:
Integrating tutorial test module. Renamed test case to activate it. Check for a basedir system property pointing to the module's basedir when running in Maven, the same code now works in the IDE, command line and in Maven surefire.
Added:
incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCase.java (contents, props changed)
- copied, changed from r653108, incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java
Removed:
incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java
Modified:
incubator/tuscany/java/sca/tutorial/assets/services/db/ShoppingCartTableImpl.java
incubator/tuscany/java/sca/tutorial/store-supplier/pom.xml
incubator/tuscany/java/sca/tutorial/store-test/pom.xml
Modified: incubator/tuscany/java/sca/tutorial/assets/services/db/ShoppingCartTableImpl.java
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/assets/services/db/ShoppingCartTableImpl.java?rev=653145&r1=653144&r2=653145&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/assets/services/db/ShoppingCartTableImpl.java (original)
+++ incubator/tuscany/java/sca/tutorial/assets/services/db/ShoppingCartTableImpl.java Sat May 3 14:36:57 2008
@@ -47,9 +47,9 @@
@Init
public void init() throws Exception {
- Class.forName("org.apache.derby.jdbc.EmbeddedDriver", true, getClass().getClassLoader());
+ Class.forName("org.apache.derby.jdbc.EmbeddedDriver", true, Thread.currentThread().getContextClassLoader());
String baseDir = System.getProperty("basedir");
- String url = "jdbc:derby:" + (baseDir != null? baseDir + "/" + database : database);
+ String url = "jdbc:derby:directory:" + (baseDir != null? baseDir + "/" + database : database);
System.out.println("Connecting to database: " + url);
connection = DriverManager.getConnection(url, "", "");
}
Modified: incubator/tuscany/java/sca/tutorial/store-supplier/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-supplier/pom.xml?rev=653145&r1=653144&r2=653145&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-supplier/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/store-supplier/pom.xml Sat May 3 14:36:57 2008
@@ -57,6 +57,10 @@
<exclude>target/**</exclude>
</excludes>
</resource>
+ <resource>
+ <directory>${basedir}/target/new-db</directory>
+ <targetPath>../cart-db</targetPath>
+ </resource>
</resources>
<plugins>
<plugin>
@@ -94,7 +98,7 @@
</goals>
<configuration>
<driver>org.apache.derby.jdbc.EmbeddedDriver</driver>
- <url>jdbc:derby:${basedir}/target/cart-db;create=true</url>
+ <url>jdbc:derby:${basedir}/target/new-db;create=true</url>
<autocommit>true</autocommit>
<onError>continue</onError>
<delimiter>;</delimiter>
Modified: incubator/tuscany/java/sca/tutorial/store-test/pom.xml
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-test/pom.xml?rev=653145&r1=653144&r2=653145&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-test/pom.xml (original)
+++ incubator/tuscany/java/sca/tutorial/store-test/pom.xml Sat May 3 14:36:57 2008
@@ -158,6 +158,13 @@
<scope>test</scope>
</dependency>
+ <dependency>
+ <groupId>org.apache.tuscany.sca</groupId>
+ <artifactId>tutorial-store-supplier</artifactId>
+ <version>2.0-incubating-SNAPSHOT</version>
+ <scope>runtime</scope>
+ </dependency>
+
</dependencies>
<build>
@@ -188,40 +195,6 @@
</execution>
</executions>
</plugin>
-
- <plugin>
- <groupId>org.codehaus.mojo</groupId>
- <artifactId>sql-maven-plugin</artifactId>
- <version>1.0</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:${basedir}/../store-supplier/target/cart-db;create=true</url>
- <autocommit>true</autocommit>
- <onError>continue</onError>
- <delimiter>;</delimiter>
- <srcFiles>
- <srcFile>${basedir}/../assets/services/db/cart.sql</srcFile>
- </srcFiles>
- </configuration>
- </execution>
- </executions>
- </plugin>
</plugins>
</build>
Copied: incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCase.java (from r653108, incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java)
URL: http://svn.apache.org/viewvc/incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCase.java?p2=incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCase.java&p1=incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java&r1=653108&r2=653145&rev=653145&view=diff
==============================================================================
--- incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCaseFIXME.java (original)
+++ incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCase.java Sat May 3 14:36:57 2008
@@ -37,7 +37,7 @@
*
* @version $Rev$ $Date$
*/
-public class StoreSupplierTestCaseFIXME {
+public class StoreSupplierTestCase {
private SCANode2 domainManager;
private SCANode2 storeSupplierNode;
@@ -46,9 +46,11 @@
@Before
public void setup() throws Exception {
+ String baseDir = System.getProperty("basedir");
+ String domainDir = baseDir != null? baseDir + "/" + "../domain" : "../domain";
DomainManagerLauncher managerLauncher = DomainManagerLauncher.newInstance();
- domainManager = managerLauncher.createDomainManager("../domain");
+ domainManager = managerLauncher.createDomainManager(domainDir);
domainManager.start();
NodeLauncher nodeLauncher = NodeLauncher.newInstance();
Propchange: incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCase.java
------------------------------------------------------------------------------
svn:eol-style = native
Propchange: incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCase.java
------------------------------------------------------------------------------
svn:keywords = Rev Date
Propchange: incubator/tuscany/java/sca/tutorial/store-test/test/StoreSupplierTestCase.java
------------------------------------------------------------------------------
svn:mime-type = text/plain