You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@maven.apache.org by Pete <pe...@gmail.com> on 2007/05/04 13:10:38 UTC

DBUnit and table list

Hi there,

1) Firstly I've noticed there appears to be two DBUnit plugins, not
sure which is best :

http://mojo.codehaus.org/dbunit-maven-plugin

http://maven-plugins.sourceforge.net

2) I'm trying to use the codehaus DBUnit plugin to export some data,
but one table is giving me an error so I thought I'd provide a list of
tables to export to the plugin configuration but not sure how to  :-

The docs says there is a configurable  :-
tables  Table[]   List of DbUnit's Table. See DbUnit's JavaDoc for details

I have tried :-

   <tables>
        	<table>table1</table>
         	<table>table2</table>
   </tables>

 and <tables>table1,table2<tables>

all inside the plugin's <configuration>.

The plugin requires org.dbunit.ant.Table but looks like the Strings
don't get converted to this.
Cannot assign configuration entry 'table' to 'class
org.dbunit.ant.Table' from 'acl_object_identity', which is of type
class java.lang.String

Help ?

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: DBUnit and table list

Posted by Wayne Fay <wa...@gmail.com>.
I've never used the DBUnit plugin myself, but as Greg mentioned, the
Codehaus plugin is for M2 while the other one is for M1.

If you don't get the answers you seek here, send your email to the
Mojo-User list at Codehaus.

Wayne

On 5/4/07, Gregory Kick <gk...@gmail.com> wrote:
> On 5/4/07, Pete <pe...@gmail.com> wrote:
> > Hi there,
> >
> > 1) Firstly I've noticed there appears to be two DBUnit plugins, not
> > sure which is best :
> >
> > http://mojo.codehaus.org/dbunit-maven-plugin
> maven 2.x
> >
> > http://maven-plugins.sourceforge.net
> maven 1.x
> >
> > 2) I'm trying to use the codehaus DBUnit plugin to export some data,
> > but one table is giving me an error so I thought I'd provide a list of
> > tables to export to the plugin configuration but not sure how to  :-
> >
> > The docs says there is a configurable  :-
> > tables  Table[]   List of DbUnit's Table. See DbUnit's JavaDoc for details
> >
> > I have tried :-
> >
> >    <tables>
> >                 <table>table1</table>
> >                 <table>table2</table>
> >    </tables>
> >
> >  and <tables>table1,table2<tables>
> >
> > all inside the plugin's <configuration>.
> >
> > The plugin requires org.dbunit.ant.Table but looks like the Strings
> > don't get converted to this.
> > Cannot assign configuration entry 'table' to 'class
> > org.dbunit.ant.Table' from 'acl_object_identity', which is of type
> > class java.lang.String
> >
> > Help ?
> >
> > ---------------------------------------------------------------------
> > To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> > For additional commands, e-mail: users-help@maven.apache.org
> >
> >
>
>
> --
> Gregory Kick
> http://kickstyle.net/
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: DBUnit and table list

Posted by Gregory Kick <gk...@gmail.com>.
On 5/4/07, Pete <pe...@gmail.com> wrote:
> Hi there,
>
> 1) Firstly I've noticed there appears to be two DBUnit plugins, not
> sure which is best :
>
> http://mojo.codehaus.org/dbunit-maven-plugin
maven 2.x
>
> http://maven-plugins.sourceforge.net
maven 1.x
>
> 2) I'm trying to use the codehaus DBUnit plugin to export some data,
> but one table is giving me an error so I thought I'd provide a list of
> tables to export to the plugin configuration but not sure how to  :-
>
> The docs says there is a configurable  :-
> tables  Table[]   List of DbUnit's Table. See DbUnit's JavaDoc for details
>
> I have tried :-
>
>    <tables>
>                 <table>table1</table>
>                 <table>table2</table>
>    </tables>
>
>  and <tables>table1,table2<tables>
>
> all inside the plugin's <configuration>.
>
> The plugin requires org.dbunit.ant.Table but looks like the Strings
> don't get converted to this.
> Cannot assign configuration entry 'table' to 'class
> org.dbunit.ant.Table' from 'acl_object_identity', which is of type
> class java.lang.String
>
> Help ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>


-- 
Gregory Kick
http://kickstyle.net/

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org


Re: DBUnit and table list

Posted by Dan Tran <da...@gmail.com>.
Could you checkout the src/example in the source tree at mojo?

http://svn.codehaus.org/mojo/trunk/mojo/dbunit-maven-plugin/src/example/

-D


On 5/4/07, Pete <pe...@gmail.com> wrote:
>
> Hi there,
>
> 1) Firstly I've noticed there appears to be two DBUnit plugins, not
> sure which is best :
>
> http://mojo.codehaus.org/dbunit-maven-plugin
>
> http://maven-plugins.sourceforge.net
>
> 2) I'm trying to use the codehaus DBUnit plugin to export some data,
> but one table is giving me an error so I thought I'd provide a list of
> tables to export to the plugin configuration but not sure how to  :-
>
> The docs says there is a configurable  :-
> tables  Table[]   List of DbUnit's Table. See DbUnit's JavaDoc for details
>
> I have tried :-
>
>   <tables>
>                <table>table1</table>
>                <table>table2</table>
>   </tables>
>
> and <tables>table1,table2<tables>
>
> all inside the plugin's <configuration>.
>
> The plugin requires org.dbunit.ant.Table but looks like the Strings
> don't get converted to this.
> Cannot assign configuration entry 'table' to 'class
> org.dbunit.ant.Table' from 'acl_object_identity', which is of type
> class java.lang.String
>
> Help ?
>
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
> For additional commands, e-mail: users-help@maven.apache.org
>
>

Re: DBUnit and table list

Posted by Pete <pe...@gmail.com>.
Just to answer my own question - the solution to configure the DBUnit
plugin to only export certain tables was :

	     <configuration>
			          <driver>${jdbc.driverClassName}</driver>
			          <url>${jdbc.url}</url>
			          <username>${jdbc.username}</username>
			          <password>${jdbc.password}</password>
			          <dataTypeFactoryName>${dbunit.dataTypeFactoryName}</dataTypeFactoryName>
			          <schema>${web.project.name}</schema>
			          <format>flat</format>
			          <tables>
				           <list>
					           	<name>acl_permission</name>
				           </list>
				           <list>
					           	<name>acl_object_identity</name>
				           </list>
							<list>
					           	<name>role</name>
				           </list>				
			          </tables>
			        </configuration>


On 13/05/07, Dan Tran <da...@gmail.com> wrote:
> I thought, I gave you a suggest using the example, please answer to the list
> and what is the exact error?
>
>
>
> On 5/12/07, Pete <pe...@gmail.com> wrote:
> > Just wondered if you guys could help with a query I sent to the Maven
> > mailing list recently ?
> >
> > thanks
> > Pete
> >
> > ---------- Forwarded message ----------
> > From: Pete <pe...@gmail.com>
> > Date: 04-May-2007 12:10
> > Subject: DBUnit and table list
> > To: Maven Users List < users@maven.apache.org>
> >
> >
> > Hi there,
> >
> > 1) Firstly I've noticed there appears to be two DBUnit plugins, not
> > sure which is best :
> >
> > http://mojo.codehaus.org/dbunit-maven-plugin
> >
> > http://maven-plugins.sourceforge.net
> >
> > 2) I'm trying to use the codehaus DBUnit plugin to export some data,
> > but one table is giving me an error so I thought I'd provide a list of
> > tables to export to the plugin configuration but not sure how to  :-
> >
> > The docs says there is a configurable  :-
> > tables  Table[]   List of DbUnit's Table. See DbUnit's JavaDoc for details
> >
> > I have tried :-
> >
> > <tables>
> >               <table>table1</table>
> >               <table>table2</table>
> > </tables>
> >
> > and <tables>table1,table2<tables>
> >
> > all inside the plugin's <configuration>.
> >
> > The plugin requires org.dbunit.ant.Table but looks like the Strings
> > don't get converted to this.
> > Cannot assign configuration entry 'table' to 'class
> > org.dbunit.ant.Table' from 'acl_object_identity', which is of type
> > class java.lang.String
> >
> > Help ?
> >
>
>

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscribe@maven.apache.org
For additional commands, e-mail: users-help@maven.apache.org