You are viewing a plain text version of this content. The canonical link for it is here.
Posted to torque-dev@db.apache.org by tf...@apache.org on 2005/09/05 22:19:19 UTC

svn commit: r278825 - in /db/torque/test: ./ trunk/ trunk/maven-test-plugin/ trunk/maven-test-plugin/src/ trunk/maven-test-plugin/src/plugin-resources/ trunk/maven-test-plugin/src/plugin-resources/java/ trunk/maven-test-plugin/src/plugin-resources/java...

Author: tfischer
Date: Mon Sep  5 13:19:05 2005
New Revision: 278825

URL: http://svn.apache.org/viewcvs?rev=278825&view=rev
Log:
created structure for refactoring the runtimetest into an extra test
module

Added:
    db/torque/test/
    db/torque/test/trunk/
    db/torque/test/trunk/maven-test-plugin/   (with props)
    db/torque/test/trunk/maven-test-plugin/plugin.jelly
    db/torque/test/trunk/maven-test-plugin/plugin.properties
    db/torque/test/trunk/maven-test-plugin/project.xml
    db/torque/test/trunk/maven-test-plugin/src/
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/java/
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/java/org/
      - copied from r278819, db/torque/runtime/trunk/src/rttest/org/
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/logging/
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/logging/log4j.properties
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/runtime/
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/runtime/Torque.properties
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/schema/
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/schema/bookstore-schema.xml
      - copied unchanged from r278819, db/torque/runtime/trunk/src/rttest/bookstore-schema.xml
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/schema/ext-schema.xml
      - copied unchanged from r278819, db/torque/runtime/trunk/src/rttest/ext-schema.xml
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/schema/extext-schema.xml
      - copied unchanged from r278819, db/torque/runtime/trunk/src/rttest/extext-schema.xml
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/schema/id-table-schema.xml
      - copied unchanged from r278819, db/torque/runtime/trunk/src/rttest/id-table-schema.xml
    db/torque/test/trunk/maven-test-plugin/src/plugin-resources/schema/test-schema.xml
      - copied unchanged from r278819, db/torque/runtime/trunk/src/rttest/test-schema.xml
    db/torque/test/trunk/profile/
    db/torque/test/trunk/profile/base/
    db/torque/test/trunk/profile/base/maven.xml
    db/torque/test/trunk/profile/base/project.xml
    db/torque/test/trunk/profile/mysql/   (with props)
    db/torque/test/trunk/profile/mysql/project.properties
    db/torque/test/trunk/profile/mysql/project.xml

Propchange: db/torque/test/trunk/maven-test-plugin/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Sep  5 13:19:05 2005
@@ -0,0 +1,3 @@
+build.properties
+jcoverage.ser
+target

Added: db/torque/test/trunk/maven-test-plugin/plugin.jelly
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/maven-test-plugin/plugin.jelly?rev=278825&view=auto
==============================================================================
--- db/torque/test/trunk/maven-test-plugin/plugin.jelly (added)
+++ db/torque/test/trunk/maven-test-plugin/plugin.jelly Mon Sep  5 13:19:05 2005
@@ -0,0 +1,136 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+
+<!-- ======================================================================== -->
+<!--                                                                          -->
+<!--  maven Buildfile                                                         -->
+<!--                                                                          -->
+<!-- $Id: maven.xml 239655 2005-08-24 13:13:22Z henning $ -->
+<!--                                                                          -->
+<!-- ======================================================================== -->
+
+<project
+  xmlns:j="jelly:core"
+  default="base:test">
+
+  <goal name="torque:run-test">
+    <attainGoal name="torque:test:test"/>
+    <attainGoal name="torque:test:post-test"/>
+  </goal>
+
+  <goal name="torque:test:prepare">
+  
+    <copy todir="${torque.home}/src">
+      <fileset dir="${plugin.resources}">
+        <include name="schema/*" />
+      </fileset>
+      <filterset>
+        <filter token="DATABASE_DEFAULT" value="${torque.project}"/>
+        <filter token="DATABASE_ID_METHOD" value="${torque.test.base.idMethod}"/> 
+      </filterset>
+    </copy>
+  </goal>
+  
+  <goal name="torque:test:pre-test"
+      prereqs="torque:test:prepare">
+    <attainGoal name="torque:doc"/>
+    <attainGoal name="torque:create-db"/>
+    <attainGoal name="torque:sql"/>
+    <attainGoal name="torque:id-table-init-sql"/>
+    <attainGoal name="torque:insert-sql"/>
+    <attainGoal name="torque:om"/>
+    
+    <copy todir="${torque.home}/src/java">
+      <fileset dir="${plugin.resources}/java" />
+    </copy>
+    
+    <mkdir dir="${torque.compile.build.dir}" />
+    <javac
+      debug="${torque.compile.debug}"
+      deprecation="${torque.compile.deprecation}"
+      destdir="${torque.compile.build.dir}"
+      optimize="${torque.compile.optimize}"
+      srcdir="${torque.java.dir}">
+      <classpath refid="maven.dependency.classpath"/>
+    </javac>
+  </goal>
+  
+  <goal name="torque:test:test"
+     prereqs="torque:test:pre-test">
+    
+    <copy 
+      todir="${torque.home}" 
+      file="${plugin.resources}/runtime/Torque.properties">
+      <filterset>
+        <filter token="DATABASE" value="${torque.database}"/>
+        <filter token="DATABASE_DEFAULT" value="${torque.project}"/>
+        <filter token="DATABASE_URL" value="${torque.database.url}"/>
+        <filter token="DATABASE_USER" value="${torque.database.user}"/>
+        <filter token="DATABASE_DRIVER" value="${torque.database.driver}"/>
+        <filter token="DATABASE_PASSWORD" value="${torque.database.password}"/>
+      </filterset>
+    </copy>
+     
+    <copy 
+      todir="${torque.home}" 
+      file="${plugin.resources}/logging/log4j.properties" />
+     
+    <taskdef
+      name="junit"
+      classname="org.apache.tools.ant.taskdefs.optional.junit.JUnitTask" />      
+    
+    <mkdir dir="${torque.log.dir}" />
+    <mkdir dir="${torque.junit.report.dir}" />
+    <junit printsummary="no" haltonfailure="yes" fork="true">
+      <classpath>
+        <pathelement location="${torque.compile.build.dir}"/>
+        <path refid="maven.dependency.classpath"/>
+      </classpath>
+
+      <formatter type="xml"/>
+      <formatter type="plain" usefile="false"/>
+
+      <batchtest todir="${torque.junit.report.dir}">
+        <fileset dir="${torque.compile.build.dir}">
+          <include name="**/*Test.class"/>
+          <exclude name="**/test/**/*.class"/>
+          <exclude name="**/LargeSelectTest.class"/>
+        </fileset>
+      </batchtest>
+    </junit>
+    <echo>junit completed</echo>
+  </goal>
+  
+  
+  <goal name="torque:test:post-test">
+
+    <attainGoal name="torque:datadtd"/>
+    <attainGoal name="torque:datadump"/>
+    
+    <!-- copy files generated by torque:datadump and torque:datadtd
+         to directory where it can be read by torque:datasql -->
+    <copy file="${torque.output.dir}/bookstore-bookstore-all-data.xml"
+      toFile="${torque.schema.dir}/bookstore-data.xml" />
+    <copy file="${torque.output.dir}/bookstore-data.dtd"
+      toDir="${torque.schema.dir}" />
+      
+    <attainGoal name="torque:datasql"/>
+    <attainGoal name="torque:jdbc"/>
+  </goal>  
+</project>
\ No newline at end of file

Added: db/torque/test/trunk/maven-test-plugin/plugin.properties
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/maven-test-plugin/plugin.properties?rev=278825&view=auto
==============================================================================
--- db/torque/test/trunk/maven-test-plugin/plugin.properties (added)
+++ db/torque/test/trunk/maven-test-plugin/plugin.properties Mon Sep  5 13:19:05 2005
@@ -0,0 +1,17 @@
+# we copy the complete source for the project to
+# ${basedir}/target/tests/base in order to be able
+# to do the filtering. This must be made known
+# to the maven-plugin
+torque.home=${basedir}/target/tests/base
+torque.output.dir=${torque.home}/target
+torque.schema.dir=${torque.home}/src/schema
+torque.java.dir = ${torque.home}/src/java
+torque.ojb.dir = ${torque.home}/src/ojb
+
+#settings for the generator
+torque.project = bookstore
+torque.targetPackage = org.apache.torque.test
+
+torque.compile.build.dir=${torque.home}/target/classes
+torque.log.dir=${torque.home}/target/logs
+torque.junit.report.dir=${torque.home}/target/reports

Added: db/torque/test/trunk/maven-test-plugin/project.xml
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/maven-test-plugin/project.xml?rev=278825&view=auto
==============================================================================
--- db/torque/test/trunk/maven-test-plugin/project.xml (added)
+++ db/torque/test/trunk/maven-test-plugin/project.xml Mon Sep  5 13:19:05 2005
@@ -0,0 +1,57 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+  <pomVersion>3</pomVersion> 
+  <artifactId>maven-torque-test-plugin</artifactId> 
+  <groupId>torque</groupId> 
+  <name>Maven-torque-test-plugin</name>
+  <currentVersion>3.2-rc2-dev</currentVersion>
+  <dependencies>
+
+    <dependency>
+      <artifactId>torque</artifactId>
+      <groupId>torque</groupId>
+      <version>${pom.currentVersion}</version>
+    </dependency>
+
+    <dependency>
+      <artifactId>torque-gen</artifactId>
+      <groupId>torque</groupId>
+      <version>${pom.currentVersion}</version>
+    </dependency>
+
+    <dependency>
+      <groupId>junit</groupId>
+      <artifactId>junit</artifactId>
+      <version>3.8.1</version>
+      <properties>
+        <classloader>root</classloader>
+      </properties>
+    </dependency>
+
+    <dependency>
+      <artifactId>log4j</artifactId>
+      <groupId>log4j</groupId>
+      <version>1.2.8</version>
+    </dependency>
+
+  </dependencies>
+  
+  <build>
+    <resources> 
+      <resource> 
+        <directory>${basedir}/src/plugin-resources</directory> 
+        <targetPath>plugin-resources</targetPath> 
+      </resource> 
+      <resource> 
+        <directory>${basedir}</directory> 
+        <includes> 
+          <include>plugin.jelly</include> 
+          <include>plugin.properties</include> 
+          <include>project.properties</include> 
+          <include>project.xml</include> 
+        </includes> 
+      </resource> 
+    </resources> 
+  </build>
+</project>
+

Added: db/torque/test/trunk/maven-test-plugin/src/plugin-resources/logging/log4j.properties
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/maven-test-plugin/src/plugin-resources/logging/log4j.properties?rev=278825&view=auto
==============================================================================
--- db/torque/test/trunk/maven-test-plugin/src/plugin-resources/logging/log4j.properties (added)
+++ db/torque/test/trunk/maven-test-plugin/src/plugin-resources/logging/log4j.properties Mon Sep  5 13:19:05 2005
@@ -0,0 +1,29 @@
+# Copyright 2001-2005 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.
+
+# ------------------------------------------------------------------------
+#
+# Logging Configuration
+#
+# $Id: log4j.properties 239624 2005-08-24 12:18:03Z henning $
+#
+# ------------------------------------------------------------------------
+
+log4j.rootLogger = DEBUG, torque
+
+log4j.appender.torque = org.apache.log4j.FileAppender
+log4j.appender.torque.file = target/tests/base/target/logs/base-test.log
+log4j.appender.torque.append = false
+log4j.appender.torque.layout = org.apache.log4j.PatternLayout
+log4j.appender.torque.layout.conversionPattern = %d [%t] %-5p %c - %m%n
\ No newline at end of file

Added: db/torque/test/trunk/maven-test-plugin/src/plugin-resources/runtime/Torque.properties
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/maven-test-plugin/src/plugin-resources/runtime/Torque.properties?rev=278825&view=auto
==============================================================================
--- db/torque/test/trunk/maven-test-plugin/src/plugin-resources/runtime/Torque.properties (added)
+++ db/torque/test/trunk/maven-test-plugin/src/plugin-resources/runtime/Torque.properties Mon Sep  5 13:19:05 2005
@@ -0,0 +1,9 @@
+torque.database.default = @DATABASE_DEFAULT@
+torque.database.bookstore.adapter = @DATABASE@
+
+#Using commons-dbcp
+torque.dsfactory.bookstore.factory = org.apache.torque.dsfactory.SharedPoolDataSourceFactory
+torque.dsfactory.bookstore.connection.driver = @DATABASE_DRIVER@
+torque.dsfactory.bookstore.connection.url = @DATABASE_URL@
+torque.dsfactory.bookstore.connection.user = @DATABASE_USER@
+torque.dsfactory.bookstore.connection.password = @DATABASE_PASSWORD@

Added: db/torque/test/trunk/profile/base/maven.xml
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/profile/base/maven.xml?rev=278825&view=auto
==============================================================================
--- db/torque/test/trunk/profile/base/maven.xml (added)
+++ db/torque/test/trunk/profile/base/maven.xml Mon Sep  5 13:19:05 2005
@@ -0,0 +1,59 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<!-- 
+/*
+ * Copyright 2001-2004 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.
+ */
+ -->
+
+<!-- ======================================================================== -->
+<!--                                                                          -->
+<!--  maven Buildfile                                                         -->
+<!--                                                                          -->
+<!-- $Id: maven.xml 239655 2005-08-24 13:13:22Z henning $ -->
+<!--                                                                          -->
+<!-- ======================================================================== -->
+
+<project
+  xmlns:maven="jelly:maven"
+  default="build">
+
+  <goal 
+    name="torque:build-run-test" 
+    description="Build Torque and run the test">
+    <maven:reactor
+      basedir="../../../.."
+      includes="templates/project.xml,generator/project.xml,runtime/project.xml"
+      excludes=""
+      goals="jar:install"
+      ignoreFailures="false"
+    />  
+    
+    <attainGoal name="torque:run-test" />
+  </goal>
+
+  <goal 
+    name="torque:clean-test" 
+    description="Build Torque and run the test">
+    <maven:reactor
+      basedir="../../../.."
+      includes="templates/project.xml,generator/project.xml,runtime/project.xml"
+      excludes=""
+      goals="clean"
+      ignoreFailures="false"
+    />  
+    <attainGoal name="clean" />
+  </goal>
+
+</project>

Added: db/torque/test/trunk/profile/base/project.xml
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/profile/base/project.xml?rev=278825&view=auto
==============================================================================
--- db/torque/test/trunk/profile/base/project.xml (added)
+++ db/torque/test/trunk/profile/base/project.xml Mon Sep  5 13:19:05 2005
@@ -0,0 +1,23 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+  <extend>../../../../runtime/project.xml</extend>
+  
+  <dependencies>
+    <dependency>
+      <artifactId>torque</artifactId>
+      <groupId>torque</groupId>
+      <version>${pom.currentVersion}</version>
+    </dependency>
+    <dependency>
+      <artifactId>torque-gen</artifactId>
+      <groupId>torque</groupId>
+      <version>${pom.currentVersion}</version>
+    </dependency>
+    <dependency>
+      <artifactId>log4j</artifactId>
+      <groupId>log4j</groupId>
+      <version>1.2.8</version>
+    </dependency>
+  </dependencies>
+</project>
+

Propchange: db/torque/test/trunk/profile/mysql/
------------------------------------------------------------------------------
--- svn:ignore (added)
+++ svn:ignore Mon Sep  5 13:19:05 2005
@@ -0,0 +1,2 @@
+build.properties
+target

Added: db/torque/test/trunk/profile/mysql/project.properties
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/profile/mysql/project.properties?rev=278825&view=auto
==============================================================================
--- db/torque/test/trunk/profile/mysql/project.properties (added)
+++ db/torque/test/trunk/profile/mysql/project.properties Mon Sep  5 13:19:05 2005
@@ -0,0 +1,17 @@
+#settings for the schema file
+torque.test.base.idMethod = idbroker
+
+#settings that will go straight through to the generator
+torque.database.createUrl = jdbc:mysql://localhost:3306/mysql
+torque.database.buildUrl = jdbc:mysql://localhost:3306/bookstore
+torque.generateBeans = true
+
+#settings for both generator and runtime
+torque.database = mysql
+torque.database.driver = org.gjt.mm.mysql.Driver
+torque.database.user = root
+torque.database.password =
+
+#settings for runtime
+torque.database.url = jdbc:mysql://localhost:3306/bookstore
+torque.database.validationQuery = SELECT 1

Added: db/torque/test/trunk/profile/mysql/project.xml
URL: http://svn.apache.org/viewcvs/db/torque/test/trunk/profile/mysql/project.xml?rev=278825&view=auto
==============================================================================
--- db/torque/test/trunk/profile/mysql/project.xml (added)
+++ db/torque/test/trunk/profile/mysql/project.xml Mon Sep  5 13:19:05 2005
@@ -0,0 +1,14 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<project>
+  <extend>../base/project.xml</extend>
+  <artifactId>torque-mysql-test</artifactId> 
+  <name>Torque-mysql-test</name>
+  <dependencies>
+    <dependency>
+      <artifactId>mysql-connector-java</artifactId>
+      <groupId>mysql</groupId>
+      <version>3.1.6-bin</version>
+    </dependency> 
+  </dependencies>
+</project>
+



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: svn commit: r278825 - in /db/torque/test: ./ trunk/ trunk/maven-test-plugin/

Posted by Thomas Fischer <fi...@seitenbau.net>.




"Henning P. Schmiedehausen" <hp...@intermeta.de> schrieb am 06.09.2005
10:59:52:

>
> It's ok. If you see real benefits and it does not put a burden on a
> maven installation, go ahead. As I said, I'm not really a fan of the
> solution (-0) but I don't object it.
>
> Getting some docs on how to use this would be good, though.
>

As I said, I was not finished with it. Today evening, a miracle will occur
and documenation will appear in svn. I was too tired for miracles yesterday
evening :-).

   Thomas


---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: svn commit: r278825 - in /db/torque/test: ./ trunk/ trunk/maven-test-plugin/

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
Thomas Fischer <fi...@seitenbau.net> writes:

>I tried several things and this was the best I could come up with till now.
>The problem with the old runtimetest were the following:
>- one had to build the generator and the templates separately if one
>changed something there. Really annoying if you run the test 10 times.
>- it was testing the ant version of the generator and not the maven-plugin.
>- it had problems with the junit task definition.
>- it was not a runtimetest, but instead it was testing the whole of torque,
>and therefore should not be in the runtime part of the project.

>The new test has none of these problems, and the new problem with the
>installed plugin can be solved. So in my own personal private opinion, it
>is much better than the old test. Full stop.

>However, it is also not the ideal solution from my point of view. What I
>would have liked best would be a test project which could be run like any
>other torque project. The problems were the following:
>- The main problem is that I did not find a possibility to read a profile
>file during (not before!!!) maven execution and passing the parameters to
>the torque maven plugin. Maybe I did not look hard enough, will look again
>this evening if one can do tricks with maven:set.
>- in the runtimetest, one can switch the idmethod from the profile. This
>was done using ant filters while copying the file. To retain this feature,
>one has to copy the schema files. If one does not want to retain this
>feature, one could use some tables with the idbroker and some normal ones.
>Then one could leave out the copying stuff and the project would look more
>like a normal Torque project. A strong point for retaining the idmethod
>switching feature is that some database adapters (firebird, at least) do
>not support the idmethod="native", so the part of the test using idmethod
>native would not run at all. Maybe one wants to have two runs in every
>test, one with idmethod=native and one with idmethod=idbroker, but no idea
>how to do this in an elegant way.

It's ok. If you see real benefits and it does not put a burden on a
maven installation, go ahead. As I said, I'm not really a fan of the
solution (-0) but I don't object it.

Getting some docs on how to use this would be good, though.

	Regards
		Henning


-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

		      4 - 8 - 15 - 16 - 23 - 42

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: svn commit: r278825 - in /db/torque/test: ./ trunk/ trunk/maven-test-plugin/

Posted by Thomas Fischer <fi...@seitenbau.net>.




"Henning P. Schmiedehausen" <hp...@intermeta.de> schrieb am 06.09.2005
09:45:50:

> tfischer@apache.org writes:
>
> >    db/torque/test/trunk/maven-test-plugin/   (with props)


I Will call it torque-test-maven-plugin, i

>
> -1 on "maven-test-plugin". We are not testing maven. We are testing
Torque.
>
> >+  <goal name="torque:run-test">

ok, namespace will be torque-test

>
> -1 on the name space overlap between your plugin and the
> torque-plugin. This will not only create confusion, knowing a bit
> about the mes^Wstate of maven, I'm pretty sure that sooner or later a
> name space separation will be enforced and then either one or the
> other plugin breaks.
>
> >+    <attainGoal name="torque:test:test"/>

Using the new namespace, this will also be avoided.

>
> -1 on xxx:yyy:zzz. Same as above. Sooner or later, maven will enforce
> the plugin:goal rule and then double ':' will probably break.
>
> >+</project>
> >\ No newline at end of file
>
> Bad.

Will look for those, and the licences also. I did not finish yesterday.

>
> Personally, I'm -0 on the whole plugin idea. For just running the
> runtime test, I will afterwards have to drag around a plugin not used
> for anything else in my maven installation. Not really ideal.

If this is the only thing which bothers you, I will do a
plugin:uninstall-now
at the end of torque-test:build-run. So the plugin will be installed and
deinstalled during the test, no garbage remains.

I tried several things and this was the best I could come up with till now.
The problem with the old runtimetest were the following:
- one had to build the generator and the templates separately if one
changed something there. Really annoying if you run the test 10 times.
- it was testing the ant version of the generator and not the maven-plugin.
- it had problems with the junit task definition.
- it was not a runtimetest, but instead it was testing the whole of torque,
and therefore should not be in the runtime part of the project.

The new test has none of these problems, and the new problem with the
installed plugin can be solved. So in my own personal private opinion, it
is much better than the old test. Full stop.

However, it is also not the ideal solution from my point of view. What I
would have liked best would be a test project which could be run like any
other torque project. The problems were the following:
- The main problem is that I did not find a possibility to read a profile
file during (not before!!!) maven execution and passing the parameters to
the torque maven plugin. Maybe I did not look hard enough, will look again
this evening if one can do tricks with maven:set.
- in the runtimetest, one can switch the idmethod from the profile. This
was done using ant filters while copying the file. To retain this feature,
one has to copy the schema files. If one does not want to retain this
feature, one could use some tables with the idbroker and some normal ones.
Then one could leave out the copying stuff and the project would look more
like a normal Torque project. A strong point for retaining the idmethod
switching feature is that some database adapters (firebird, at least) do
not support the idmethod="native", so the part of the test using idmethod
native would not run at all. Maybe one wants to have two runs in every
test, one with idmethod=native and one with idmethod=idbroker, but no idea
how to do this in an elegant way.

        Thomas



---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org


Re: svn commit: r278825 - in /db/torque/test: ./ trunk/ trunk/maven-test-plugin/

Posted by "Henning P. Schmiedehausen" <hp...@intermeta.de>.
tfischer@apache.org writes:

>    db/torque/test/trunk/maven-test-plugin/   (with props)

-1 on "maven-test-plugin". We are not testing maven. We are testing Torque.

>+  <goal name="torque:run-test">

-1 on the name space overlap between your plugin and the
torque-plugin. This will not only create confusion, knowing a bit
about the mes^Wstate of maven, I'm pretty sure that sooner or later a
name space separation will be enforced and then either one or the
other plugin breaks.

>+    <attainGoal name="torque:test:test"/>

-1 on xxx:yyy:zzz. Same as above. Sooner or later, maven will enforce
the plugin:goal rule and then double ':' will probably break.

>+</project>
>\ No newline at end of file

Bad.

Personally, I'm -0 on the whole plugin idea. For just running the
runtime test, I will afterwards have to drag around a plugin not used
for anything else in my maven installation. Not really ideal.

	Regards
		Henning

-- 
Dipl.-Inf. (Univ.) Henning P. Schmiedehausen          INTERMETA GmbH
hps@intermeta.de        +49 9131 50 654 0   http://www.intermeta.de/

RedHat Certified Engineer -- Jakarta Turbine Development  -- hero for hire
   Linux, Java, perl, Solaris -- Consulting, Training, Development

		      4 - 8 - 15 - 16 - 23 - 42

---------------------------------------------------------------------
To unsubscribe, e-mail: torque-dev-unsubscribe@db.apache.org
For additional commands, e-mail: torque-dev-help@db.apache.org