Name: dbunit Version: 2.4.8 Release: 1%{?dist} Summary: DbUnit Framework - extension for JUnit Group: Development/Libraries License: LGPLv2+ URL: http://dbunit.sourceforge.net/ # svn export https://dbunit.svn.sourceforge.net/svnroot/dbunit/tags/dbunit-2.4.8 # tar czf dbunit-2.4.8-src-svn.tar.gz dbunit-2.4.8 Source0: dbunit-2.4.8-src-svn.tar.gz # fix ant gid # remove org.codehaus.mojo sql-maven-plugin 1.3 # remove org.codehaus.mojo jdepend-maven-plugin # change org.codehaus.mojo failsafe-maven-plugin with maven-failsafe-plugin Patch0: dbunit-2.4.8-pom.patch # remove profiles: official oracle-default oracle-ojdbc6 oracle-ojdbc14 oracle10-ojdbc6 oracle10-ojdbc14 # remove mockmaker # remove mockobjects Patch1: dbunit-2.4.8-remove-oracle-ojdbc-profiles.patch BuildRequires: java-devel BuildRequires: jpackage-utils BuildRequires: ant BuildRequires: apache-commons-collections BuildRequires: apache-poi BuildRequires: derby BuildRequires: h2 BuildRequires: hsqldb BuildRequires: junit BuildRequires: mysql-connector-java BuildRequires: postgresql-jdbc BuildRequires: slf4j BuildRequires: maven BuildRequires: maven-compiler-plugin BuildRequires: maven-failsafe-plugin BuildRequires: maven-install-plugin BuildRequires: maven-jar-plugin BuildRequires: maven-javadoc-plugin BuildRequires: maven-plugin-cobertura BuildRequires: maven-resources-plugin BuildRequires: maven-surefire-plugin # test deps BuildRequires: ant-testutil BuildRequires: apache-commons-io BuildRequires: gsbase BuildRequires: junit-addons BuildRequires: logback # BuildRequires: mockmaker # BuildRequires: mockobjects Requires: ant Requires: apache-commons-collections Requires: apache-poi Requires: junit Requires: slf4j Requires: java Requires: jpackage-utils BuildArch: noarch %description DbUnit is a JUnit extension (also usable with Ant) targeted for database-driven projects that, among other things, puts your database into a known state between test runs. This is an excellent way to avoid the myriad of problems that can occur when one test case corrupts the database and causes subsequent tests to fail or exacerbate the damage. DbUnit has the ability to export and import your database data to and from XML datasets. Since version 2.0, DbUnit can works with very large dataset when use in streaming mode. DbUnit can also helps you to verify that your database data match expected set of values. %package javadoc Group: Documentation Summary: Javadoc for %{name} Requires: jpackage-utils %description javadoc This package contains javadoc for %{name}. %prep %setup -q -n dbunit-%{version} find . -name '*.jar' -delete find . -name '*.class' -delete ( cd src/test/resources/csv/orders %jar -cf orders.jar orders.csv orders_row.csv table-ordering.txt ) # requires # com.oracle ojdbc14 10.2.0.4.0 # com.oracle ojdbc6 11.1.0.7.0 rm -rf src/main/java/org/dbunit/ext/oracle rm -rf src/test/java/org/dbunit/ext/oracle rm -r src/test/java/org/dbunit/OracleEnvironment.java \ src/test/java/org/dbunit/Oracle10Environment.java %patch0 -p0 %patch1 -p0 %build # unavailable test deps mockobjects mockobjects-jdk1.3 0.07 mockmaker mmmockobjects 1.12.0 # available profiles db2 derby h2 hsqldb mssql mysql postgresql mvn-rpmbuild -Phsqldb -Dmaven.test.skip=true install javadoc:aggregate %install mkdir -p %{buildroot}%{_javadir} install -m 644 target/%{name}-%{version}.jar \ %{buildroot}%{_javadir}/%{name}.jar mkdir -p %{buildroot}%{_mavenpomdir} install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom %add_maven_depmap JPP-%{name}.pom %{name}.jar mkdir -p %{buildroot}%{_javadocdir}/%{name} cp -rp target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name} %files %{_javadir}/%{name}.jar %{_mavenpomdir}/JPP-%{name}.pom %{_mavendepmapfragdir}/%{name} %doc LICENSE.txt %files javadoc %{_javadocdir}/%{name} %doc LICENSE.txt %changelog * Fri May 04 2012 gil cattaneo 2.4.8-1 - initial rpm