You can subscribe to this list here.
2002 |
Jan
|
Feb
|
Mar
|
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
(37) |
Oct
(12) |
Nov
|
Dec
(47) |
---|---|---|---|---|---|---|---|---|---|---|---|---|
2003 |
Jan
(9) |
Feb
(6) |
Mar
(1) |
Apr
(85) |
May
(9) |
Jun
|
Jul
(6) |
Aug
(85) |
Sep
(42) |
Oct
(27) |
Nov
(15) |
Dec
(27) |
2004 |
Jan
(39) |
Feb
(52) |
Mar
(43) |
Apr
(32) |
May
(18) |
Jun
(5) |
Jul
(63) |
Aug
(69) |
Sep
(12) |
Oct
(80) |
Nov
(55) |
Dec
(30) |
2005 |
Jan
(27) |
Feb
(6) |
Mar
(43) |
Apr
(5) |
May
(48) |
Jun
(48) |
Jul
(100) |
Aug
(16) |
Sep
(43) |
Oct
(25) |
Nov
(249) |
Dec
(2) |
2006 |
Jan
(9) |
Feb
(2) |
Mar
|
Apr
(26) |
May
(21) |
Jun
(8) |
Jul
(14) |
Aug
(104) |
Sep
|
Oct
|
Nov
|
Dec
|
2007 |
Jan
(32) |
Feb
|
Mar
(2) |
Apr
|
May
(38) |
Jun
(2) |
Jul
(9) |
Aug
(1) |
Sep
|
Oct
|
Nov
(1) |
Dec
|
2008 |
Jan
|
Feb
(3) |
Mar
(2) |
Apr
|
May
|
Jun
|
Jul
|
Aug
|
Sep
|
Oct
|
Nov
|
Dec
|
From: dion g. <dio...@us...> - 2004-08-05 00:48:53
|
diongillard 04/08/04 17:48:44 Modified: dbunit/src/main/net/sourceforge/mavenplugins/dbunit DTDGenerator.java DbUnitTool.java DataSetConverter.java DataSetTool.java Log: Code cleanup Revision Changes Path 1.2 +3 -2 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DTDGenerator.java Index: DTDGenerator.java =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DTDGenerator.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DTDGenerator.java 1 Aug 2004 11:14:35 -0000 1.1 +++ DTDGenerator.java 5 Aug 2004 00:48:44 -0000 1.2 @@ -56,10 +56,11 @@ * ==================================================================== */ -import java.io.FileOutputStream; -import org.dbunit.database.IDatabaseConnection; +import org.dbunit.database.IDatabaseConnection; import org.dbunit.dataset.xml.FlatDtdDataSet; +import java.io.FileOutputStream; + public class DTDGenerator extends DbUnitTool { 1.3 +6 -6 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DbUnitTool.java Index: DbUnitTool.java =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DbUnitTool.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- DbUnitTool.java 1 Aug 2004 13:17:22 -0000 1.2 +++ DbUnitTool.java 5 Aug 2004 00:48:44 -0000 1.3 @@ -55,7 +55,13 @@ * * ==================================================================== */ +import org.dbunit.database.DatabaseConnection; import org.dbunit.database.IDatabaseConnection; +import org.dbunit.dataset.DataSetException; +import org.dbunit.dataset.IDataSet; +import org.dbunit.dataset.excel.XlsDataSet; +import org.dbunit.dataset.xml.FlatXmlDataSet; +import org.dbunit.dataset.xml.XmlDataSet; import java.io.File; import java.io.FileNotFoundException; @@ -65,12 +71,6 @@ import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; -import org.dbunit.database.DatabaseConnection; -import org.dbunit.dataset.DataSetException; -import org.dbunit.dataset.IDataSet; -import org.dbunit.dataset.excel.XlsDataSet; -import org.dbunit.dataset.xml.FlatXmlDataSet; -import org.dbunit.dataset.xml.XmlDataSet; /** * Base class for working with DbUnit 1.2 +0 -2 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DataSetConverter.java Index: DataSetConverter.java =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DataSetConverter.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DataSetConverter.java 1 Aug 2004 13:17:22 -0000 1.1 +++ DataSetConverter.java 5 Aug 2004 00:48:44 -0000 1.2 @@ -1,11 +1,9 @@ package net.sourceforge.mavenplugins.dbunit; -import org.dbunit.DatabaseUnitException; import org.dbunit.dataset.DataSetException; import java.io.FileNotFoundException; import java.io.IOException; -import java.sql.SQLException; /* ==================================================================== * The Apache Software License, Version 1.1 1.4 +0 -3 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DataSetTool.java Index: DataSetTool.java =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DataSetTool.java,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- DataSetTool.java 1 Aug 2004 13:17:22 -0000 1.3 +++ DataSetTool.java 5 Aug 2004 00:48:44 -0000 1.4 @@ -61,11 +61,8 @@ import org.dbunit.database.IDatabaseConnection; import org.dbunit.dataset.DataSetException; import org.dbunit.dataset.IDataSet; -import org.dbunit.dataset.excel.XlsDataSet; import org.dbunit.operation.DatabaseOperation; -import java.io.File; -import java.io.FileOutputStream; import java.io.IOException; import java.sql.SQLException; |
From: dion g. <dio...@us...> - 2004-08-04 07:39:54
|
diongillard 04/08/04 00:39:48 Modified: was5/xdocs changes.xml Log: Doc changes Revision Changes Path 1.8 +1 -0 maven-plugins/was5/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/was5/xdocs/changes.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- changes.xml 4 Aug 2004 07:16:28 -0000 1.7 +++ changes.xml 4 Aug 2004 07:39:48 -0000 1.8 @@ -8,6 +8,7 @@ <body> <release version="1.2" date="in CVS"> <action dev="diongillard" type="fix">Fix typo for ${maven.was5.ejbDeploy}. The code was checking ${maven.was5.ejbdeploy}</action> + <action dev="diongillard" type="fix">Check the ear exists before trying to install it.</action> </release> <release version="1.1" date="2004-08-02"> <action dev="diongillard" type="add">Add was5:run-script goal</action> |
From: dion g. <dio...@us...> - 2004-08-04 07:16:34
|
diongillard 04/08/04 00:16:28 Modified: was5/xdocs changes.xml Log: Doc change Revision Changes Path 1.7 +3 -0 maven-plugins/was5/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/was5/xdocs/changes.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- changes.xml 1 Aug 2004 23:27:45 -0000 1.6 +++ changes.xml 4 Aug 2004 07:16:28 -0000 1.7 @@ -6,6 +6,9 @@ <author email="dio...@us...">dIon Gillard</author> </properties> <body> + <release version="1.2" date="in CVS"> + <action dev="diongillard" type="fix">Fix typo for ${maven.was5.ejbDeploy}. The code was checking ${maven.was5.ejbdeploy}</action> + </release> <release version="1.1" date="2004-08-02"> <action dev="diongillard" type="add">Add was5:run-script goal</action> <action dev="diongillard" type="fix">Check ${maven.was5.home} is specified before using</action> |
From: dion g. <dio...@us...> - 2004-08-04 07:15:24
|
diongillard 04/08/04 00:15:17 Modified: was5 plugin.jelly Log: Fix typo for maven.was5.ejbDeploy Revision Changes Path 1.8 +2 -1 maven-plugins/was5/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/was5/plugin.jelly,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- plugin.jelly 4 Aug 2004 06:30:38 -0000 1.7 +++ plugin.jelly 4 Aug 2004 07:15:16 -0000 1.8 @@ -40,7 +40,7 @@ <!-- "auto-deploy" the ejb jar after the ejb has been created --> <postGoal name="ejb:ejb"> - <j:set var="generate" value="${maven.was5.ejbdeploy}"/> + <j:set var="generate" value="${maven.was5.ejbDeploy}"/> <j:if test="${!empty(generate)}"> <attainGoal name="was5:ejbDeploy"/> <!-- copy jar with deployed code over original --> @@ -135,6 +135,7 @@ <goal name="was5:installApp" description="Install an application on a WebSphere Appserver"> <ant:fail unless="maven.was5.installApp.ear">maven.was5.installApp.ear must be specified</ant:fail> + <assert:assertFileExists file="${maven.was5.installApp.ear}" msg=" ERROR: maven.was5.installApp.ear (${maven.was5.installApp.ear}) doesn't exist."/> <maven:paramCheck fail="yes" value="${maven.was5.home}" message="ERROR: maven.was5.home is not set"/> <assert:assertFileExists file="${maven.was5.home}" msg=" ERROR: maven.was5.home is not a valid directory"/> |
From: dion g. <dio...@us...> - 2004-08-04 06:30:47
|
diongillard 04/08/03 23:30:39 Modified: was5/xdocs goals.xml was5 plugin.jelly project.xml Log: Make reinstall not start and stop the server Revision Changes Path 1.6 +1 -2 maven-plugins/was5/xdocs/goals.xml Index: goals.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/was5/xdocs/goals.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- goals.xml 30 Jul 2004 06:47:48 -0000 1.5 +++ goals.xml 4 Aug 2004 06:30:38 -0000 1.6 @@ -21,8 +21,7 @@ <goal> <name>was5:reinstallApp</name> <description> - Stop an app, Stop the server, uninstall the app, install the app, start - the server and then start the app + Stop an app, uninstall the app, install the app, start the app </description> </goal> <goal> 1.7 +0 -3 maven-plugins/was5/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/was5/plugin.jelly,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- plugin.jelly 30 Jul 2004 06:03:21 -0000 1.6 +++ plugin.jelly 4 Aug 2004 06:30:38 -0000 1.7 @@ -215,12 +215,9 @@ <goal name="was5:reinstallApp" description="Reinstall an application on a WebSphere Appserver"> <attainGoal name="was5:stopApp"/> <sleep seconds="${maven.was5.sleep.stop}"/> - <attainGoal name="was5:stopServer"/> - <sleep seconds="${maven.was5.sleep.stop}"/> <attainGoal name="was5:uninstallApp"/> <sleep seconds="${maven.was5.sleep.stop}"/> <attainGoal name="was5:installApp"/> - <attainGoal name="was5:startServer"/> <sleep seconds="${maven.was5.sleep.start}"/> <attainGoal name="was5:startApp"/> <sleep seconds="${maven.was5.sleep.start}"/> 1.9 +1 -1 maven-plugins/was5/project.xml Index: project.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/was5/project.xml,v retrieving revision 1.8 retrieving revision 1.9 diff -u -r1.8 -r1.9 --- project.xml 1 Aug 2004 23:27:45 -0000 1.8 +++ project.xml 4 Aug 2004 06:30:39 -0000 1.9 @@ -8,7 +8,7 @@ <name>WebSphere 5 (5.0/5.1) Plugin</name> <!-- groupId is in parent --> - <currentVersion>1.1</currentVersion> + <currentVersion>1.2-SNAPSHOT</currentVersion> <!-- organization is in parent --> <inceptionYear>2004</inceptionYear> |
From: dion g. <dio...@us...> - 2004-08-02 00:49:12
|
diongillard 04/08/01 17:49:05 Modified: dbunit/xdocs changes.xml Log: Doc new goals Revision Changes Path 1.15 +1 -0 maven-plugins/dbunit/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/xdocs/changes.xml,v retrieving revision 1.14 retrieving revision 1.15 diff -u -r1.14 -r1.15 --- changes.xml 1 Aug 2004 13:22:11 -0000 1.14 +++ changes.xml 2 Aug 2004 00:49:05 -0000 1.15 @@ -8,6 +8,7 @@ <body> <release version="1.5" date="in CVS"> <action dev="diongillard" type="add">Add xml2xls dataset conversion goal</action> + <action dev="diongillard" type="add">Add xls2xml, flat2xml and xml2flat dataset conversion goals</action> </release> <release version="1.4" date="2004-08-01"> <action dev="diongillard" type="update">Rename packages from org.apache.maven to net.sourceforge.mavenplugins</action> |
From: dion g. <dio...@us...> - 2004-08-02 00:48:09
|
diongillard 04/08/01 17:48:01 Modified: dbunit plugin.jelly dbunit/xdocs goals.xml Log: Add xls2xml, flat2xml and xml2flat goals Revision Changes Path 1.14 +30 -0 maven-plugins/dbunit/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/plugin.jelly,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- plugin.jelly 1 Aug 2004 13:17:22 -0000 1.13 +++ plugin.jelly 2 Aug 2004 00:48:01 -0000 1.14 @@ -128,4 +128,34 @@ ${tool.process()} <ant:echo>Spreadsheet '${output}' created from '${input}'</ant:echo> </goal> + + <goal name="dbunit:xls2xml"> + <j:useBean var="tool" class="net.sourceforge.mavenplugins.dbunit.DataSetConverter" + input="${input}" + inputFormat="excel" + output="${output}" + outputFormat="xml" /> + ${tool.process()} + <ant:echo>XML '${output}' created from '${input}'</ant:echo> + </goal> + + <goal name="dbunit:flat2xml"> + <j:useBean var="tool" class="net.sourceforge.mavenplugins.dbunit.DataSetConverter" + input="${input}" + inputFormat="flat" + output="${output}" + outputFormat="xml" /> + ${tool.process()} + <ant:echo>XML '${output}' created from '${input}'</ant:echo> + </goal> + + <goal name="dbunit:xml2flat"> + <j:useBean var="tool" class="net.sourceforge.mavenplugins.dbunit.DataSetConverter" + input="${input}" + inputFormat="xml" + output="${output}" + outputFormat="flat" /> + ${tool.process()} + <ant:echo>Flat XML '${output}' created from '${input}'</ant:echo> + </goal> </project> 1.8 +24 -0 maven-plugins/dbunit/xdocs/goals.xml Index: goals.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/xdocs/goals.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- goals.xml 1 Aug 2004 13:24:08 -0000 1.7 +++ goals.xml 2 Aug 2004 00:48:01 -0000 1.8 @@ -24,6 +24,14 @@ </description> </goal> <goal> + <name>dbunit:flat2xml</name> + <description> + Convert a flat XML file, specified by the variable <code>input</code> + into an XML file specified by the variable <code>output</code>. + Both input and output variables are file names. + </description> + </goal> + <goal> <name>dbunit:generate-dataset</name> <description>Generate a dbunit dataset for a connection</description> </goal> @@ -43,6 +51,22 @@ </description> </goal> <goal> + <name>dbunit:xls2xml</name> + <description> + Convert an Excel spreadsheet, specified by the variable <code>input</code> + into an XML file specified by the variable <code>output</code>. + Both input and output variables are file names. + </description> + </goal> + <goal> + <name>dbunit:xml2flat</name> + <description> + Convert an XML file, specified by the variable <code>input</code> + into a flat XML file specified by the variable <code>output</code>. + Both input and output variables are file names. + </description> + </goal> + <goal> <name>dbunit:xml2xls</name> <description> Convert an XML formatted dataset, specified by the variable <code>input</code> |
From: dion g. <dio...@us...> - 2004-08-01 23:27:51
|
diongillard 04/08/01 16:27:45 Modified: was5 project.xml was5/xdocs changes.xml Log: [maven-scm-plugin] prepare release 1.1 Revision Changes Path 1.8 +14 -5 maven-plugins/was5/project.xml Index: project.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/was5/project.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- project.xml 29 Jul 2004 05:11:04 -0000 1.7 +++ project.xml 1 Aug 2004 23:27:45 -0000 1.8 @@ -1,36 +1,45 @@ -<?xml version="1.0" ?> +<?xml version="1.0" encoding="UTF-8"?> + <project> <extend>${basedir}/../plugin-project.xml</extend> <!--pomVersion is in parent --> + <id>maven-was5-plugin</id> <name>WebSphere 5 (5.0/5.1) Plugin</name> <!-- groupId is in parent --> - <currentVersion>1.1-SNAPSHOT</currentVersion> + + <currentVersion>1.1</currentVersion> <!-- organization is in parent --> + <inceptionYear>2004</inceptionYear> <!-- package, logo are in parent. no gumpRepositoryId --> + <description>A plugin to manage a WebSphere AppServer 5/5.1 artifacts and installation</description> <shortDescription>Manage WAS 5/5.1</shortDescription> <!-- issue tracking url, siteAddress are in parent --> + <url>http://maven-plugins.sourceforge.net/maven-was5-plugin/</url> <siteDirectory>/home/groups/m/ma/maven-plugins/htdocs/maven-was5-plugin/</siteDirectory> <distributionDirectory>/home/groups/m/ma/maven-plugins/htdocs/maven-was5-plugin/distributions/</distributionDirectory> - <repository> <connection>scm:cvs:pserver:ano...@cv...:/cvsroot/maven-plugins:maven-plugins/was5</connection> <developerConnection>scm:cvs:ext:${maven.username}@cvs.sourceforge.net:/cvsroot/maven-plugins:maven-plugins/was5</developerConnection> <url>http://cvs.sourceforge.net/cgi-bin/viewcvs.cgi/maven-plugins/maven-plugins/was5/</url> </repository> - <versions> <version> <id>1.0</id> <name>1.0</name> <tag>MAVEN_PLUGINS_WAS5_1_0</tag> </version> + <version> + <id>1.1</id> + <name>1.1</name> + <tag>MAVEN_PLUGINS_WAS5_1_1</tag> + </version> </versions> + <!-- mailingLists are in parent --> - <!-- mailingLists are in parent --> <developers> <developer> <id>rlewisshell</id> 1.6 +1 -2 maven-plugins/was5/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/was5/xdocs/changes.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- changes.xml 30 Jul 2004 06:11:14 -0000 1.5 +++ changes.xml 1 Aug 2004 23:27:45 -0000 1.6 @@ -6,7 +6,7 @@ <author email="dio...@us...">dIon Gillard</author> </properties> <body> - <release version="1.1-SNAPSHOT" date="in CVS"> + <release version="1.1" date="2004-08-02"> <action dev="diongillard" type="add">Add was5:run-script goal</action> <action dev="diongillard" type="fix">Check ${maven.was5.home} is specified before using</action> <action dev="diongillard" type="fix">Check ${maven.was5.home} exists before using</action> @@ -17,4 +17,3 @@ </release> </body> </document> - |
From: dion g. <dio...@us...> - 2004-08-01 13:24:13
|
diongillard 04/08/01 06:24:08 Modified: dbunit/xdocs goals.xml Log: Doc new goal Revision Changes Path 1.7 +10 -2 maven-plugins/dbunit/xdocs/goals.xml Index: goals.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/xdocs/goals.xml,v retrieving revision 1.6 retrieving revision 1.7 diff -u -r1.6 -r1.7 --- goals.xml 1 Aug 2004 11:57:27 -0000 1.6 +++ goals.xml 1 Aug 2004 13:24:08 -0000 1.7 @@ -12,6 +12,10 @@ <description>generate dataset and dtd for connection</description> </goal> <goal> + <name>dbunit:delete-dataset</name> + <description>Import a dbunit dataset</description> + </goal> + <goal> <name>dbunit:export-xls</name> <description> Create a spreadsheet in target/dbunit/export.xls from a set of tables. @@ -39,8 +43,12 @@ </description> </goal> <goal> - <name>dbunit:delete-dataset</name> - <description>Import a dbunit dataset</description> + <name>dbunit:xml2xls</name> + <description> + Convert an XML formatted dataset, specified by the variable <code>input</code> + into a spreadsheet (xls file) specified by the variable <code>output</code>. + Both input and output variables are file names. + </description> </goal> </goals> </body> |
From: dion g. <dio...@us...> - 2004-08-01 13:22:19
|
diongillard 04/08/01 06:22:11 Modified: dbunit/xdocs changes.xml Log: Add docs Revision Changes Path 1.14 +4 -1 maven-plugins/dbunit/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/xdocs/changes.xml,v retrieving revision 1.13 retrieving revision 1.14 diff -u -r1.13 -r1.14 --- changes.xml 1 Aug 2004 12:11:04 -0000 1.13 +++ changes.xml 1 Aug 2004 13:22:11 -0000 1.14 @@ -6,9 +6,12 @@ <author email="dio...@so...">dIon Gillard</author> </properties> <body> + <release version="1.5" date="in CVS"> + <action dev="diongillard" type="add">Add xml2xls dataset conversion goal</action> + </release> <release version="1.4" date="2004-08-01"> <action dev="diongillard" type="update">Rename packages from org.apache.maven to net.sourceforge.mavenplugins</action> - <action dev="diongillard" type="add">Add new import-xls goal</action> + <action dev="diongillard" type="add">Add import-xls goal</action> </release> <release version="1.3" date="2004-07-29"> <action dev="diongillard" type="update">Use dbunit v2.1</action> |
From: dion g. <dio...@us...> - 2004-08-01 13:17:32
|
diongillard 04/08/01 06:17:23 Modified: dbunit/src/main/net/sourceforge/mavenplugins/dbunit DbUnitTool.java DataSetTool.java dbunit plugin.jelly Added: dbunit/src/main/net/sourceforge/mavenplugins/dbunit DataSetConverter.java Log: Add support for converting datasets Revision Changes Path 1.2 +80 -10 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DbUnitTool.java Index: DbUnitTool.java =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DbUnitTool.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DbUnitTool.java 1 Aug 2004 11:14:35 -0000 1.1 +++ DbUnitTool.java 1 Aug 2004 13:17:22 -0000 1.2 @@ -55,17 +55,28 @@ * * ==================================================================== */ -import org.dbunit.database.IDatabaseConnection; +import org.dbunit.database.IDatabaseConnection; + +import java.io.File; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; -import org.dbunit.database.DatabaseConnection; - +import org.dbunit.database.DatabaseConnection; +import org.dbunit.dataset.DataSetException; +import org.dbunit.dataset.IDataSet; +import org.dbunit.dataset.excel.XlsDataSet; +import org.dbunit.dataset.xml.FlatXmlDataSet; +import org.dbunit.dataset.xml.XmlDataSet; + /** * Base class for working with DbUnit * * @author Dion Gillard - */ + */ public class DbUnitTool { private String driverClassName; @@ -78,12 +89,12 @@ public String getDriverClassName() { return driverClassName; - } + } public void setDriverClassName(String name) { driverClassName = name; } - + public String getUrl() { return url; @@ -92,7 +103,7 @@ { url = newURL; } - + public String getUser() { return user; @@ -101,16 +112,16 @@ { user = newUser; } - + public String getPassword() - { + { return password; } public void setPassword(String newPassword) { password = newPassword; } - + public String getFileName() { return fileName; @@ -129,6 +140,11 @@ this.schema = schema; } + /** + * @return a database connection from the url, user and password + * @throws SQLException if some other jdbc error happens + * @throws ClassNotFoundException if the jdbc driver can't be found + */ protected IDatabaseConnection getConnection() throws SQLException, ClassNotFoundException { Class driverClass = Class.forName(getDriverClassName()); @@ -145,4 +161,58 @@ } return connection; } + + /** + * @return a dataset from the file of the given format + * @param fileName the name of the file + * @param format the dbunit format, e.g. excel, xml, flat etc + */ + protected IDataSet getDataSetFromFile(String fileName, String format) throws DataSetException, IOException + { + IDataSet dataset = null; + if ("EXCEL".equalsIgnoreCase(format)) + { + dataset = new XlsDataSet(new File(fileName)); + } + else if ("XML".equalsIgnoreCase(format)) + { + dataset = new XmlDataSet(new FileReader(fileName)); + } + else if ("FLAT".equalsIgnoreCase(format)) + { + dataset = new FlatXmlDataSet(new File(fileName)); + } + else + { + throw new IllegalArgumentException("dataset of format '" + format + "' is not supported."); + } + return dataset; + } + + /** + * Write the dataset to the file in that format. + * @param fileName the name of the file + * @param format the dbunit format, e.g. excel, xml, flat etc + * @param the data set to write + * @throws DataSetException + * @throws FileNotFoundException + * @throws IOException + */ + protected void writeDataSetToFile(String fileName, String format, IDataSet dataset) throws DataSetException, FileNotFoundException, IOException + { + FileOutputStream stream = new FileOutputStream(fileName); + if ("EXCEL".equalsIgnoreCase(format)) + { + XlsDataSet.write(dataset, stream); + } + else if ("XML".equalsIgnoreCase(format)) + { + XmlDataSet.write(dataset, stream); + } + else if ("FLAT".equalsIgnoreCase(format)) + { + FlatXmlDataSet.write(dataset, stream); + } + stream.close(); + } } \ No newline at end of file 1.3 +2 -17 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DataSetTool.java Index: DataSetTool.java =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DataSetTool.java,v retrieving revision 1.2 retrieving revision 1.3 diff -u -r1.2 -r1.3 --- DataSetTool.java 1 Aug 2004 11:43:10 -0000 1.2 +++ DataSetTool.java 1 Aug 2004 13:17:22 -0000 1.3 @@ -161,27 +161,12 @@ // database connection - close? IDatabaseConnection connection = getConnection(); // write file - if (getDataSetFormat().equalsIgnoreCase("EXCEL")) - { - XlsDataSet.write(getDataSet(connection), new FileOutputStream(getFileName())); - } - else - { - throw new IllegalArgumentException("operation of '" + getOperation() + "' is not supported."); - } + writeDataSetToFile(getFileName(), getDataSetFormat(), getDataSet(connection)); } else if (dbOperation != null) { // TODO create a dataset of the right type - IDataSet dataset = null; - if ("EXCEL".equalsIgnoreCase(getDataSetFormat())) - { - dataset = new XlsDataSet(new File(getFileName())); - } - else - { - throw new IllegalArgumentException("dataSetFormat of '" + getDataSetFormat() + "' is not supported."); - } + IDataSet dataset = getDataSetFromFile(getFileName(), getDataSetFormat()); dbOperation.execute(getConnection(), dataset); } } 1.1 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DataSetConverter.java Index: DataSetConverter.java =================================================================== package net.sourceforge.mavenplugins.dbunit; import org.dbunit.DatabaseUnitException; import org.dbunit.dataset.DataSetException; import java.io.FileNotFoundException; import java.io.IOException; import java.sql.SQLException; /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" and * "Apache Maven" must not be used to endorse or promote products * derived from this software without prior written permission. For * written permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * "Apache Maven", nor may "Apache" appear in their name, without * prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * ==================================================================== */ /** * @author Dion Gillard */ public class DataSetConverter extends DbUnitTool { /** format of the input dataset */ private String inputFormat; /** format of the output dataset */ private String outputFormat; /** file name for input */ private String input; /** file name for output */ private String output; /** * Convert the input dataset to the output dataset * @throws IOException * @throws FileNotFoundException * @throws DataSetException */ public void process() throws DataSetException, FileNotFoundException, IOException { writeDataSetToFile(getOutput(), getOutputFormat(), getDataSetFromFile(getInput(), getInputFormat())); } /** * @return Returns the input. */ public String getInput() { return input; } /** * @param input The input to set. */ public void setInput(String input) { this.input = input; } /** * @return Returns the inputFormat. */ public String getInputFormat() { return inputFormat; } /** * @param inputFormat The inputFormat to set. */ public void setInputFormat(String inputFormat) { this.inputFormat = inputFormat; } /** * @return Returns the output. */ public String getOutput() { return output; } /** * @param output The output to set. */ public void setOutput(String output) { this.output = output; } /** * @return Returns the outputFormat. */ public String getOutputFormat() { return outputFormat; } /** * @param outputFormat The outputFormat to set. */ public void setOutputFormat(String outputFormat) { this.outputFormat = outputFormat; } } 1.13 +9 -0 maven-plugins/dbunit/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/plugin.jelly,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- plugin.jelly 1 Aug 2004 11:43:10 -0000 1.12 +++ plugin.jelly 1 Aug 2004 13:17:22 -0000 1.13 @@ -119,4 +119,13 @@ <ant:echo>Spreadsheet imported from ${file}</ant:echo> </goal> + <goal name="dbunit:xml2xls"> + <j:useBean var="tool" class="net.sourceforge.mavenplugins.dbunit.DataSetConverter" + input="${input}" + inputFormat="xml" + output="${output}" + outputFormat="excel" /> + ${tool.process()} + <ant:echo>Spreadsheet '${output}' created from '${input}'</ant:echo> + </goal> </project> |
From: dion g. <dio...@us...> - 2004-08-01 13:16:30
|
diongillard 04/08/01 06:16:17 Modified: dbunit project.xml Log: Prep for new release Revision Changes Path 1.29 +6 -1 maven-plugins/dbunit/project.xml Index: project.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/project.xml,v retrieving revision 1.28 retrieving revision 1.29 diff -u -r1.28 -r1.29 --- project.xml 1 Aug 2004 12:01:40 -0000 1.28 +++ project.xml 1 Aug 2004 13:16:16 -0000 1.29 @@ -8,7 +8,7 @@ <name>Dbunit Plug-in</name> <!-- groupId is in parent --> - <currentVersion>1.4</currentVersion> + <currentVersion>1.5-SNAPSHOT</currentVersion> <!-- organization is in parent --> <inceptionYear>2003</inceptionYear> @@ -85,6 +85,11 @@ <artifactId>commons-lang</artifactId> <version>2.0</version> </dependency> + <dependency> + <groupId>xml-apis</groupId> + <artifactId>xml-apis</artifactId> + <version>1.0.b2</version> + </dependency> </dependencies> <!-- build is in the parent --> <!-- reports is in the parent --> |
From: dion g. <dio...@us...> - 2004-08-01 12:22:26
|
diongillard 04/08/01 05:22:20 Modified: . maven.xml Log: Add magic to copy parent files so that scm:perform-release works Revision Changes Path 1.21 +13 -0 maven-plugins/maven.xml Index: maven.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/maven.xml,v retrieving revision 1.20 retrieving revision 1.21 diff -u -r1.20 -r1.21 --- maven.xml 25 Jun 2004 10:15:49 -0000 1.20 +++ maven.xml 1 Aug 2004 12:22:19 -0000 1.21 @@ -74,4 +74,17 @@ </goal> + + <!-- XXX: must be a nicer way - maybe SCM can read the POM and recursively checkout parent directories + project.xml, maven.xml, project.properties, but tag will not be set --> + <!-- perhaps copy extended project.xml into current directory, merge higher extends, commit & tag, replace extends + in main POM? --> + <postGoal name="scm:cvs-checkout-project"> + <maven:pluginVar plugin="maven-scm-plugin" property="maven.scm.checkout.dir" var="dir" /> + <ant:mkdir dir="${dir}/maven-plugins" /> + <ant:copy todir="${dir}/maven-plugins" file="${pom.parent.file}" /> + <ant:copy todir="${dir}/maven-plugins" file="${pom.parent.file.parent}/project.properties" /> + <ant:copy todir="${dir}/maven-plugins" file="${pom.parent.file.parent}/announcement.jsl" /> + <ant:copy todir="${dir}/maven-plugins" file="${pom.parent.file.parent}/LICENSE.txt" /> + </postGoal> </project> |
From: dion g. <dio...@us...> - 2004-08-01 12:11:10
|
diongillard 04/08/01 05:11:04 Modified: dbunit/xdocs changes.xml Log: add docs Revision Changes Path 1.13 +1 -0 maven-plugins/dbunit/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/xdocs/changes.xml,v retrieving revision 1.12 retrieving revision 1.13 diff -u -r1.12 -r1.13 --- changes.xml 1 Aug 2004 12:01:40 -0000 1.12 +++ changes.xml 1 Aug 2004 12:11:04 -0000 1.13 @@ -8,6 +8,7 @@ <body> <release version="1.4" date="2004-08-01"> <action dev="diongillard" type="update">Rename packages from org.apache.maven to net.sourceforge.mavenplugins</action> + <action dev="diongillard" type="add">Add new import-xls goal</action> </release> <release version="1.3" date="2004-07-29"> <action dev="diongillard" type="update">Use dbunit v2.1</action> |
From: dion g. <dio...@us...> - 2004-08-01 12:01:46
|
diongillard 04/08/01 05:01:41 Modified: dbunit project.xml dbunit/xdocs changes.xml Log: [maven-scm-plugin] prepare release 1.4 Revision Changes Path 1.28 +6 -2 maven-plugins/dbunit/project.xml Index: project.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/project.xml,v retrieving revision 1.27 retrieving revision 1.28 diff -u -r1.27 -r1.28 --- project.xml 1 Aug 2004 11:15:02 -0000 1.27 +++ project.xml 1 Aug 2004 12:01:40 -0000 1.28 @@ -8,12 +8,11 @@ <name>Dbunit Plug-in</name> <!-- groupId is in parent --> - <currentVersion>1.4-SNAPSHOT</currentVersion> + <currentVersion>1.4</currentVersion> <!-- organization is in parent --> <inceptionYear>2003</inceptionYear> <package>net.sourceforge.mavenplugins</package> - <!-- logo is in parent. no gumpRepositoryId --> <description>A plugin to automate Dbunit tasks</description> @@ -43,6 +42,11 @@ <name>1.3</name> <tag>MAVEN_PLUGINS_DBUNIT_1_3</tag> </version> + <version> + <id>1.4</id> + <name>1.4</name> + <tag>MAVEN_PLUGINS_DBUNIT_1_4</tag> + </version> </versions> <!-- mailingLists is in parent --> 1.12 +1 -1 maven-plugins/dbunit/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/xdocs/changes.xml,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- changes.xml 1 Aug 2004 11:15:02 -0000 1.11 +++ changes.xml 1 Aug 2004 12:01:40 -0000 1.12 @@ -6,7 +6,7 @@ <author email="dio...@so...">dIon Gillard</author> </properties> <body> - <release version="1.4-SNAPSHOT" date="in CVS"> + <release version="1.4" date="2004-08-01"> <action dev="diongillard" type="update">Rename packages from org.apache.maven to net.sourceforge.mavenplugins</action> </release> <release version="1.3" date="2004-07-29"> |
From: dion g. <dio...@us...> - 2004-08-01 11:57:39
|
diongillard 04/08/01 04:57:27 Modified: dbunit/xdocs goals.xml Log: Add new goal Revision Changes Path 1.6 +7 -0 maven-plugins/dbunit/xdocs/goals.xml Index: goals.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/xdocs/goals.xml,v retrieving revision 1.5 retrieving revision 1.6 diff -u -r1.5 -r1.6 --- goals.xml 28 Jul 2004 07:16:49 -0000 1.5 +++ goals.xml 1 Aug 2004 11:57:27 -0000 1.6 @@ -32,6 +32,13 @@ <description>Import a dbunit dataset</description> </goal> <goal> + <name>dbunit:import-xls</name> + <description> + Import a spreadsheet specified by the <code>file</code> variable into a set of tables. + You can also specify the type of import via the <code>maven.dbunit.importType</code> variable. + </description> + </goal> + <goal> <name>dbunit:delete-dataset</name> <description>Import a dbunit dataset</description> </goal> |
From: dion g. <dio...@us...> - 2004-08-01 11:54:17
|
diongillard 04/08/01 04:54:08 Modified: dbunit/xdocs properties.xml Log: Revamp props docs Revision Changes Path 1.8 +12 -14 maven-plugins/dbunit/xdocs/properties.xml Index: properties.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/xdocs/properties.xml,v retrieving revision 1.7 retrieving revision 1.8 diff -u -r1.7 -r1.8 --- properties.xml 25 Apr 2004 16:15:18 -0000 1.7 +++ properties.xml 1 Aug 2004 11:54:08 -0000 1.8 @@ -26,9 +26,7 @@ <td>maven.dbunit.driverClassName</td> <td>Yes</td> <td> - <p>Default value is - <code> - </code>.</p> + <p>The class name of the JDBC driver to be used. Default value is empty.</p> </td> </tr> <tr> @@ -37,7 +35,7 @@ <td> <p> Format for the import/delete functionality. Default is <code>xml</code>. Alternatively you - could specify <code>flat</code>. + could specify <code>flat or csv</code>. </p> </td> </tr> @@ -46,7 +44,12 @@ <td>Yes</td> <td> <p> - DbUnit operation type for import. Default is <code>INSERT</code> + DbUnit operation type for import. Default is <code>INSERT</code>. Other valid + values are: + <code> + UPDATE, INSERT, DELETE, DELETE_ALL, REFRESH, CLEAN_INSERT, + MSSQL_INSERT, MSSQL_REFRESH, MSSQL_CLEAN_INSERT + </code> </p> </td> </tr> @@ -54,9 +57,7 @@ <td>maven.dbunit.password</td> <td>Yes</td> <td> - <p>Default value is - <code> - </code>.</p> + <p>The password of the user connecting to the database. Default value is empty.</p> </td> </tr> <tr> @@ -71,18 +72,15 @@ <td>maven.dbunit.url</td> <td>Yes</td> <td> - <p>Default value is - <code> - </code>.</p> + <p>The JDBC URL for the database to access, e.g. <code>jdbc:db2:SAMPLE</code>. + Default value is empty.</p> </td> </tr> <tr> <td>maven.dbunit.user</td> <td>Yes</td> <td> - <p>Default value is - <code> - </code>.</p> + <p>The user name used to connect to the database. The default value is empty.</p> </td> </tr> </table> |
From: dion g. <dio...@us...> - 2004-08-01 11:44:52
|
diongillard 04/08/01 04:44:45 Modified: was5/xdocs index.xml Log: A little more doco Revision Changes Path 1.2 +9 -0 maven-plugins/was5/xdocs/index.xml Index: index.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/was5/xdocs/index.xml,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- index.xml 9 Mar 2004 11:36:25 -0000 1.1 +++ index.xml 1 Aug 2004 11:44:45 -0000 1.2 @@ -10,6 +10,15 @@ <p> This plugin provides functionality for managing WebSphere 5.0/5.1 </p> + <p> + For more information on the functionality provided by this plugin, + please see the <a href="goals.html">Goals</a> document. + </p> + <p> + For more information on how to customise the functionality provided + by this plugin, please see the <a href="properties.html">properties</a> + document. + </p> </section> </body> </document> |
From: dion g. <dio...@us...> - 2004-08-01 11:44:06
|
diongillard 04/08/01 04:44:00 Modified: dbunit/xdocs index.xml Log: A little more doco Revision Changes Path 1.4 +9 -0 maven-plugins/dbunit/xdocs/index.xml Index: index.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/xdocs/index.xml,v retrieving revision 1.3 retrieving revision 1.4 diff -u -r1.3 -r1.4 --- index.xml 16 Feb 2004 15:41:18 -0000 1.3 +++ index.xml 1 Aug 2004 11:43:59 -0000 1.4 @@ -11,6 +11,15 @@ <p> This plug-in provides functionality for accessing dbunit </p> + <p> + For more information on the functionality provided by this plugin, + please see the <a href="goals.html">Goals</a> document. + </p> + <p> + For more information on how to customise the functionality provided + by this plugin, please see the <a href="properties.html">properties</a> + document. + </p> </section> </body> </document> |
From: dion g. <dio...@us...> - 2004-08-01 11:43:17
|
diongillard 04/08/01 04:43:10 Modified: dbunit plugin.jelly dbunit/src/main/net/sourceforge/mavenplugins/dbunit DataSetTool.java Log: Basic xls importing Revision Changes Path 1.12 +14 -0 maven-plugins/dbunit/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/plugin.jelly,v retrieving revision 1.11 retrieving revision 1.12 diff -u -r1.11 -r1.12 --- plugin.jelly 1 Aug 2004 11:15:02 -0000 1.11 +++ plugin.jelly 1 Aug 2004 11:43:10 -0000 1.12 @@ -105,4 +105,18 @@ <ant:echo>Spreadsheet generated to ${maven.build.dir}/dbunit/export.xls</ant:echo> </goal> + <goal name="dbunit:import-xls"> + <j:useBean var="tool" class="net.sourceforge.mavenplugins.dbunit.DataSetTool" + driverClassName="${maven.dbunit.driverClassName}" + url="${maven.dbunit.url}" + user="${maven.dbunit.user}" + password="${maven.dbunit.password}" + schema="${maven.dbunit.schema}" + fileName="${file}" + dataSetFormat="excel" + operation="${maven.dbunit.importType}" /> + ${tool.process()} + <ant:echo>Spreadsheet imported from ${file}</ant:echo> + </goal> + </project> 1.2 +17 -9 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DataSetTool.java Index: DataSetTool.java =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DataSetTool.java,v retrieving revision 1.1 retrieving revision 1.2 diff -u -r1.1 -r1.2 --- DataSetTool.java 1 Aug 2004 11:14:35 -0000 1.1 +++ DataSetTool.java 1 Aug 2004 11:43:10 -0000 1.2 @@ -56,20 +56,19 @@ * ==================================================================== */ -import java.io.FileOutputStream; -import java.io.IOException; -import java.sql.SQLException; -import java.util.Map; -import java.util.HashMap; - import org.apache.commons.lang.StringUtils; - +import org.dbunit.DatabaseUnitException; import org.dbunit.database.IDatabaseConnection; import org.dbunit.dataset.DataSetException; import org.dbunit.dataset.IDataSet; import org.dbunit.dataset.excel.XlsDataSet; import org.dbunit.operation.DatabaseOperation; +import java.io.File; +import java.io.FileOutputStream; +import java.io.IOException; +import java.sql.SQLException; + public class DataSetTool extends DbUnitTool { /** the type of data set being processed */ @@ -155,7 +154,7 @@ /** * Process a dataset using a DbUnit operation */ - public void process() throws ClassNotFoundException, SQLException, IOException, DataSetException + public void process() throws ClassNotFoundException, SQLException, IOException, DataSetException, DatabaseUnitException { if (getOperation().equalsIgnoreCase(EXPORT)) { @@ -174,7 +173,16 @@ else if (dbOperation != null) { // TODO create a dataset of the right type - // dbOperation.execute(getConnection(), dataset) + IDataSet dataset = null; + if ("EXCEL".equalsIgnoreCase(getDataSetFormat())) + { + dataset = new XlsDataSet(new File(getFileName())); + } + else + { + throw new IllegalArgumentException("dataSetFormat of '" + getDataSetFormat() + "' is not supported."); + } + dbOperation.execute(getConnection(), dataset); } } |
From: dion g. <dio...@us...> - 2004-08-01 11:16:26
|
diongillard 04/08/01 04:16:19 Added: dbunit .project Log: Add eclipse project defn Revision Changes Path 1.1 maven-plugins/dbunit/.project Index: .project =================================================================== <?xml version="1.0" encoding="UTF-8"?> <projectDescription> <name>maven-dbunit-plugin</name> <comment>A plugin to automate Dbunit tasks</comment> <projects> </projects> <buildSpec> <buildCommand> <name>org.eclipse.jdt.core.javabuilder</name> <arguments> </arguments> </buildCommand> </buildSpec> <natures> <nature>org.eclipse.jdt.core.javanature</nature> </natures> </projectDescription> |
From: dion g. <dio...@us...> - 2004-08-01 11:15:44
|
diongillard 04/08/01 04:15:38 Added: dbunit .classpath Log: Add eclipse classpath Revision Changes Path 1.1 maven-plugins/dbunit/.classpath Index: .classpath =================================================================== <?xml version="1.0" encoding="UTF-8"?> <classpath> <classpathentry excluding="" kind="src" path="src\main"> </classpathentry> <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"> </classpathentry> <classpathentry kind="var" path="MAVEN_REPO/dbunit/jars/dbunit-2.1.jar"> </classpathentry> <classpathentry kind="var" path="MAVEN_REPO/poi/jars/poi-1.8.0-dev-20020919.jar"> </classpathentry> <classpathentry kind="var" path="MAVEN_REPO/commons-lang/jars/commons-lang-2.0.jar"> </classpathentry> <classpathentry kind="output" path="target\classes"> </classpathentry> </classpath> |
From: dion g. <dio...@us...> - 2004-08-01 11:15:11
|
diongillard 04/08/01 04:15:03 Modified: dbunit project.xml plugin.jelly dbunit/xdocs changes.xml Log: New version Revision Changes Path 1.27 +4 -2 maven-plugins/dbunit/project.xml Index: project.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/project.xml,v retrieving revision 1.26 retrieving revision 1.27 diff -u -r1.26 -r1.27 --- project.xml 28 Jul 2004 14:34:38 -0000 1.26 +++ project.xml 1 Aug 2004 11:15:02 -0000 1.27 @@ -8,11 +8,13 @@ <name>Dbunit Plug-in</name> <!-- groupId is in parent --> - <currentVersion>1.3</currentVersion> + <currentVersion>1.4-SNAPSHOT</currentVersion> <!-- organization is in parent --> <inceptionYear>2003</inceptionYear> - <!-- package, logo are in parent. no gumpRepositoryId --> + <package>net.sourceforge.mavenplugins</package> + + <!-- logo is in parent. no gumpRepositoryId --> <description>A plugin to automate Dbunit tasks</description> <shortDescription>Dbunit tasks</shortDescription> 1.11 +2 -2 maven-plugins/dbunit/plugin.jelly Index: plugin.jelly =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/plugin.jelly,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- plugin.jelly 25 Apr 2004 18:55:41 -0000 1.10 +++ plugin.jelly 1 Aug 2004 11:15:02 -0000 1.11 @@ -24,7 +24,7 @@ description="Generate a dbunit dtd for a connection"> <!-- fixme - this should be a tag lib --> <ant:mkdir dir="${maven.build.dir}/dbunit/" /> - <j:useBean var="generator" class="org.apache.maven.dbunit.DTDGenerator" + <j:useBean var="generator" class="net.sourceforge.mavenplugins.dbunit.DTDGenerator" driverClassName="${maven.dbunit.driverClassName}" url="${maven.dbunit.url}" user="${maven.dbunit.user}" @@ -91,7 +91,7 @@ <goal name="dbunit:export-xls"> <ant:mkdir dir="${maven.build.dir}/dbunit/" /> - <j:useBean var="tool" class="org.apache.maven.dbunit.DataSetTool" + <j:useBean var="tool" class="net.sourceforge.mavenplugins.dbunit.DataSetTool" driverClassName="${maven.dbunit.driverClassName}" url="${maven.dbunit.url}" user="${maven.dbunit.user}" 1.11 +4 -1 maven-plugins/dbunit/xdocs/changes.xml Index: changes.xml =================================================================== RCS file: /cvsroot/maven-plugins/maven-plugins/dbunit/xdocs/changes.xml,v retrieving revision 1.10 retrieving revision 1.11 diff -u -r1.10 -r1.11 --- changes.xml 28 Jul 2004 06:10:48 -0000 1.10 +++ changes.xml 1 Aug 2004 11:15:02 -0000 1.11 @@ -6,7 +6,10 @@ <author email="dio...@so...">dIon Gillard</author> </properties> <body> - <release version="1.3" date="in CVS"> + <release version="1.4-SNAPSHOT" date="in CVS"> + <action dev="diongillard" type="update">Rename packages from org.apache.maven to net.sourceforge.mavenplugins</action> + </release> + <release version="1.3" date="2004-07-29"> <action dev="diongillard" type="update">Use dbunit v2.1</action> </release> <release version="1.2" date="2004-07-19"> |
From: dion g. <dio...@us...> - 2004-08-01 11:14:43
|
diongillard 04/08/01 04:14:36 Added: dbunit/src/main/net/sourceforge/mavenplugins/dbunit DTDGenerator.java DbUnitTool.java DataSetTool.java Removed: dbunit/src/main/org/apache/maven/dbunit DTDGenerator.java DbUnitTool.java DataSetTool.java Log: Rename source tree Revision Changes Path 1.1 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DTDGenerator.java Index: DTDGenerator.java =================================================================== package net.sourceforge.mavenplugins.dbunit; /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" and * "Apache Maven" must not be used to endorse or promote products * derived from this software without prior written permission. For * written permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * "Apache Maven", nor may "Apache" appear in their name, without * prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * ==================================================================== */ import java.io.FileOutputStream; import org.dbunit.database.IDatabaseConnection; import org.dbunit.dataset.xml.FlatDtdDataSet; public class DTDGenerator extends DbUnitTool { /** * Generate the DTD * * @throws Exception */ public void generate() throws Exception { // database connection IDatabaseConnection connection = getConnection(); // write DTD file FlatDtdDataSet.write(connection.createDataSet(), new FileOutputStream(getFileName())); } } 1.1 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DbUnitTool.java Index: DbUnitTool.java =================================================================== package net.sourceforge.mavenplugins.dbunit; /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" and * "Apache Maven" must not be used to endorse or promote products * derived from this software without prior written permission. For * written permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * "Apache Maven", nor may "Apache" appear in their name, without * prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * ==================================================================== */ import org.dbunit.database.IDatabaseConnection; import java.sql.Connection; import java.sql.DriverManager; import java.sql.SQLException; import org.dbunit.database.DatabaseConnection; /** * Base class for working with DbUnit * * @author Dion Gillard */ public class DbUnitTool { private String driverClassName; private String url; private String user; private String password; private String fileName; private String schema; public String getDriverClassName() { return driverClassName; } public void setDriverClassName(String name) { driverClassName = name; } public String getUrl() { return url; } public void setUrl(String newURL) { url = newURL; } public String getUser() { return user; } public void setUser(String newUser) { user = newUser; } public String getPassword() { return password; } public void setPassword(String newPassword) { password = newPassword; } public String getFileName() { return fileName; } public void setFileName(String newFileName) { fileName = newFileName; } public String getSchema() { return schema; } public void setSchema(String schema) { this.schema = schema; } protected IDatabaseConnection getConnection() throws SQLException, ClassNotFoundException { Class driverClass = Class.forName(getDriverClassName()); Connection jdbcConnection = DriverManager.getConnection( getUrl(), getUser(), getPassword()); IDatabaseConnection connection = null; if (getSchema() == null) { connection = new DatabaseConnection(jdbcConnection); } else { connection = new DatabaseConnection(jdbcConnection, getSchema()); } return connection; } } 1.1 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit/DataSetTool.java Index: DataSetTool.java =================================================================== package net.sourceforge.mavenplugins.dbunit; /* ==================================================================== * The Apache Software License, Version 1.1 * * Copyright (c) 2002 The Apache Software Foundation. All rights * reserved. * * Redistribution and use in source and binary forms, with or without * modification, are permitted provided that the following conditions * are met: * * 1. Redistributions of source code must retain the above copyright * notice, this list of conditions and the following disclaimer. * * 2. Redistributions in binary form must reproduce the above copyright * notice, this list of conditions and the following disclaimer in * the documentation and/or other materials provided with the * distribution. * * 3. The end-user documentation included with the redistribution, * if any, must include the following acknowledgment: * "This product includes software developed by the * Apache Software Foundation (http://www.apache.org/)." * Alternately, this acknowledgment may appear in the software itself, * if and wherever such third-party acknowledgments normally appear. * * 4. The names "Apache" and "Apache Software Foundation" and * "Apache Maven" must not be used to endorse or promote products * derived from this software without prior written permission. For * written permission, please contact ap...@ap.... * * 5. Products derived from this software may not be called "Apache", * "Apache Maven", nor may "Apache" appear in their name, without * prior written permission of the Apache Software Foundation. * * THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED * WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES * OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE * DISCLAIMED. IN NO EVENT SHALL THE APACHE SOFTWARE FOUNDATION OR * ITS CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, * SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT * LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF * USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * SUCH DAMAGE. * ==================================================================== * * This software consists of voluntary contributions made by many * individuals on behalf of the Apache Software Foundation. For more * information on the Apache Software Foundation, please see * <http://www.apache.org/>. * * ==================================================================== */ import java.io.FileOutputStream; import java.io.IOException; import java.sql.SQLException; import java.util.Map; import java.util.HashMap; import org.apache.commons.lang.StringUtils; import org.dbunit.database.IDatabaseConnection; import org.dbunit.dataset.DataSetException; import org.dbunit.dataset.IDataSet; import org.dbunit.dataset.excel.XlsDataSet; import org.dbunit.operation.DatabaseOperation; public class DataSetTool extends DbUnitTool { /** the type of data set being processed */ private String dataSetFormat; /** the operation to perform on the data set */ private String operation; /** dbunit database operation based on the string */ private DatabaseOperation dbOperation; /** list of comma separated table names to export */ private String exportTables; /** export psuedo operation */ private static final String EXPORT = "EXPORT"; /** format for excel files */ private static final String EXCEL = "EXCEL"; /** * @return the format of the data set. */ public String getDataSetFormat() { return dataSetFormat; } /** * TODO better document this * Set the format of the dataset, e.g. EXCEL * @param name the dbunit dataset format */ public void setDataSetFormat(String name) { dataSetFormat = name; } /** * The operation to perform on a dataset, e.g. * <code>INSERT</code>, <code>CLEAN_INSERT</code>, <code>DELETE</code> or * <code>EXPORT</code> */ public String getOperation() { return operation; } /** * @return the operation to perform on a dataset * @see #getOperation() */ public void setOperation(String name) { operation = name; if (operation == null) operation = "INSERT"; if (operation.equalsIgnoreCase("CLEAN_INSERT")) dbOperation = DatabaseOperation.CLEAN_INSERT; if (operation.equalsIgnoreCase("DELETE")) dbOperation = DatabaseOperation.DELETE; if (operation.equalsIgnoreCase("INSERT")) dbOperation = DatabaseOperation.INSERT; } /** * @return a comma separated list of table names */ public String getExportTables() { return exportTables; } /** * set the list of tables to be exported * @param tables a comma separated list of table names */ public void setExportTables(String tables) { exportTables = tables; } /** * @return the dataset to operate on from the given connection */ private IDataSet getDataSet(IDatabaseConnection connection) throws SQLException { if (getExportTables() == null) return connection.createDataSet(); else return connection.createDataSet(StringUtils.split(getExportTables(), ",")); } /** * Process a dataset using a DbUnit operation */ public void process() throws ClassNotFoundException, SQLException, IOException, DataSetException { if (getOperation().equalsIgnoreCase(EXPORT)) { // database connection - close? IDatabaseConnection connection = getConnection(); // write file if (getDataSetFormat().equalsIgnoreCase("EXCEL")) { XlsDataSet.write(getDataSet(connection), new FileOutputStream(getFileName())); } else { throw new IllegalArgumentException("operation of '" + getOperation() + "' is not supported."); } } else if (dbOperation != null) { // TODO create a dataset of the right type // dbOperation.execute(getConnection(), dataset) } } } |
From: dion g. <dio...@us...> - 2004-08-01 11:14:33
|
diongillard 04/08/01 04:14:21 maven-plugins/dbunit/src/main/net/sourceforge/mavenplugins/dbunit - New directory |