Author: tfischer
Date: Tue Sep 21 20:37:21 2010
New Revision: 999615
URL: http://svn.apache.org/viewvc?rev=999615&view=rev
Log:
Add license files and make tests work again afterwards
Modified:
db/torque/torque4/trunk/torque-templates/pom.xml
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/options.properties
db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java
db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml
db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql
Modified: db/torque/torque4/trunk/torque-templates/pom.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/pom.xml?rev=999615&r1=999614&r2=999615&view=diff
==============================================================================
--- db/torque/torque4/trunk/torque-templates/pom.xml (original)
+++ db/torque/torque4/trunk/torque-templates/pom.xml Tue Sep 21 20:37:21 2010
@@ -59,9 +59,9 @@
<scope>test</scope>
</dependency>
<dependency>
- <groupId>junit-addons</groupId>
- <artifactId>junit-addons</artifactId>
- <version>1.4</version>
+ <groupId>xmlunit</groupId>
+ <artifactId>xmlunit</artifactId>
+ <version>1.3</version>
<scope>test</scope>
</dependency>
<dependency>
@@ -70,12 +70,6 @@
<version>10.5.3.0_1</version>
<scope>test</scope>
</dependency>
- <dependency>
- <groupId>org.apache.derby</groupId>
- <artifactId>derbyclient</artifactId>
- <version>10.5.3.0_1</version>
- <scope>test</scope>
- </dependency>
</dependencies>
<build>
Modified:
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/options.properties
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/options.properties?rev=999615&r1=999614&r2=999615&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/options.properties
(original)
+++
db/torque/torque4/trunk/torque-templates/src/main/resources/org/apache/torque/templates/jdbc2schema/conf/options.properties
Tue Sep 21 20:37:21 2010
@@ -1 +1,18 @@
+# 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.
+
torque.jdbc2schema.filename = schema.xml
\ No newline at end of file
Modified:
db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java?rev=999615&r1=999614&r2=999615&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java
(original)
+++
db/torque/torque4/trunk/torque-templates/src/test/java/org/apache/torque/templates/jdbc2schema/Jdbc2SchemaTest.java
Tue Sep 21 20:37:21 2010
@@ -19,6 +19,7 @@ package org.apache.torque.templates.jdbc
* under the License.
*/
+import static org.junit.Assert.assertEquals;
import static org.junit.Assert.assertTrue;
import java.io.BufferedReader;
@@ -35,9 +36,8 @@ import java.util.List;
import java.util.Map;
import java.util.StringTokenizer;
-import junitx.framework.FileAssert;
-
import org.apache.commons.io.FileUtils;
+import org.apache.commons.lang.StringUtils;
import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
import org.apache.log4j.BasicConfigurator;
@@ -47,6 +47,7 @@ import org.apache.torque.generator.confi
import
org.apache.torque.generator.configuration.paths.DefaultTorqueGeneratorPaths;
import
org.apache.torque.generator.configuration.paths.Maven2DirectoryProjectPaths;
import org.apache.torque.generator.control.Controller;
+import org.custommonkey.xmlunit.XMLAssert;
import org.junit.Before;
import org.junit.BeforeClass;
import org.junit.Test;
@@ -62,7 +63,7 @@ public class Jdbc2SchemaTest
private static String URL = "jdbc:derby:memory:myDb;create=true";
- private static String DRIVER = "org.apache.derby.jdbc.ClientDriver";
+ private static String DRIVER = "org.apache.derby.jdbc.EmbeddedDriver";
@BeforeClass
public static void beforeClass() throws Exception
@@ -142,8 +143,10 @@ public class Jdbc2SchemaTest
File generatedFile = new File("target/generated-schema/schema.xml");
assertTrue(generatedFile.exists());
+ String result = FileUtils.readFileToString(generatedFile);
File referenceFile = new File(
"src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml");
- FileAssert.assertEquals(referenceFile, generatedFile);
+ String reference = FileUtils.readFileToString(referenceFile);
+ XMLAssert.assertXMLEqual(reference, result);
}
}
Modified:
db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml?rev=999615&r1=999614&r2=999615&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml
(original)
+++
db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/expected-schema.xml
Tue Sep 21 20:37:21 2010
@@ -1,3 +1,18 @@
+<!--
+ Copyright 2001-2006 The Apache Software Foundation.
+
+ 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.
+-->
<database>
<table name="AUTHOR">
<column default="GENERATED_BY_DEFAULT" primaryKey="true" name="AUTHOR_ID"
type="INTEGER"/>
Modified:
db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql
URL:
http://svn.apache.org/viewvc/db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql?rev=999615&r1=999614&r2=999615&view=diff
==============================================================================
---
db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql
(original)
+++
db/torque/torque4/trunk/torque-templates/src/test/resources/org/apache/torque/templates/jdbc2schema/jdbc2schemaTest.sql
Tue Sep 21 20:37:21 2010
@@ -1,3 +1,20 @@
+-- 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.
+
-- -----------------------------------------------------------------------
-- derby SQL script for schema bookstore
-- -----------------------------------------------------------------------
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]