[dbunit] Initial import (#821284).

gil gil at fedoraproject.org
Tue Aug 5 12:49:04 UTC 2014


commit 481ad113bb21abdfe5a40cf40ac2a1ce66190ae6
Author: gil <puntogil at libero.it>
Date:   Tue Aug 5 14:48:50 2014 +0200

    Initial import (#821284).

 .gitignore  |    1 +
 dbunit.spec |  157 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
 sources     |    1 +
 3 files changed, 159 insertions(+), 0 deletions(-)
---
diff --git a/.gitignore b/.gitignore
index e69de29..f466565 100644
--- a/.gitignore
+++ b/.gitignore
@@ -0,0 +1 @@
+/dbunit-2.5.0.tar.xz
diff --git a/dbunit.spec b/dbunit.spec
new file mode 100644
index 0000000..66157f4
--- /dev/null
+++ b/dbunit.spec
@@ -0,0 +1,157 @@
+%global enable_tests 0
+Name:          dbunit
+Version:       2.5.0
+Release:       2%{?dist}
+Summary:       A JUnit extension targeted for database-driven projects
+# see https://sourceforge.net/p/dbunit/bugs/357/ for Incorrect FSF Address
+License:       LGPLv2+
+URL:           http://dbunit.sourceforge.net/
+# git clone git://git.code.sf.net/p/dbunit/code.git dbunit-2.5.0
+# (cd dbunit-2.5.0/ && git archive --format=tar --prefix=dbunit-2.5.0/ dbunit-2.5.0 | xz > ../dbunit-2.5.0.tar.xz)
+Source0:       %{name}-%{version}.tar.xz
+
+BuildRequires: mvn(commons-collections:commons-collections)
+BuildRequires: mvn(junit:junit)
+BuildRequires: mvn(org.apache.ant:ant)
+BuildRequires: mvn(org.apache.poi:poi)
+BuildRequires: mvn(org.slf4j:jcl-over-slf4j)
+BuildRequires: mvn(org.slf4j:slf4j-api)
+%if %{?fedora} < 21
+BuildRequires: mvn(org.sonatype.oss:oss-parent)
+%else
+BuildRequires: mvn(org.sonatype.oss:oss-parent:pom:)
+%endif
+
+# profiles
+%if 0
+BuildRequires: mvn(com.h2database:h2)
+BuildRequires: mvn(hsqldb:hsqldb:1)
+BuildRequires: mvn(mysql:mysql-connector-java)
+BuildRequires: mvn(org.apache.derby:derby)
+BuildRequires: mvn(postgresql:postgresql)
+%endif
+
+BuildRequires: maven-local
+
+# test deps
+%if %enable_tests
+BuildRequires: mvn(ch.qos.logback:logback-classic)
+BuildRequires: mvn(com.h2database:h2)
+BuildRequires: mvn(commons-io:commons-io)
+BuildRequires: mvn(gsbase:gsbase)
+BuildRequires: mvn(junit-addons:junit-addons)
+BuildRequires: mvn(mockmaker:mmmockobjects)
+BuildRequires: mvn(mockobjects:mockobjects-core)
+BuildRequires: mvn(mockobjects:mockobjects-jdk1.3)
+BuildRequires: mvn(org.apache.ant:ant-testutil)
+BuildRequires: mvn(xerces:xmlParserAPIs)
+%endif
+
+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 data-sets. Since version 2.0, DbUnit can
+works with very large data-set when use in streaming mode.
+DbUnit can also helps you to verify that your database data
+match expected set of values.
+
+%package javadoc
+Summary:       Javadoc for %{name}
+
+%description javadoc
+This package contains javadoc for %{name}.
+
+%prep
+%setup -q
+find . -name "*.class" -print -delete
+find . -name "*.jar" -print -delete
+
+%if %enable_tests
+# test resource
+(
+  cd  %{name}/src/test/resources/csv/orders
+  %jar -cf orders.jar orders.csv orders_row.csv table-ordering.txt
+)
+%endif
+# Unavailable /unwanted plugin 
+%pom_remove_plugin :jdepend-maven-plugin %{name}
+%pom_remove_plugin :sql-maven-plugin %{name}
+%pom_remove_plugin :maven-pmd-plugin %{name}
+
+%pom_xpath_set "pom:dependencies/pom:dependency[pom:artifactId ='ant']/pom:groupId" org.apache.ant %{name}
+
+# disable plugin used for testing
+%pom_remove_plugin :maven-failsafe-plugin %{name}
+%pom_remove_plugin :cobertura-maven-plugin %{name}
+
+# build problem:
+# A type incompatibility occured while executing org.apache.maven.plugins:maven-enforcer-plugin:1.3.1:enforce:
+# org.apache.maven.project.MavenProject cannot be cast to java.lang.String
+%pom_remove_plugin :maven-enforcer-plugin %{name}
+
+# remove all profile with non free deps
+%pom_xpath_remove "pom:profiles/pom:profile[pom:id ='official']" %{name}
+%pom_xpath_remove "pom:profiles/pom:profile[pom:id ='oracle-default']" %{name}
+%pom_xpath_remove "pom:profiles/pom:profile[pom:id ='oracle-ojdbc14']" %{name}
+%pom_xpath_remove "pom:profiles/pom:profile[pom:id ='oracle-ojdbc6']" %{name}
+%pom_xpath_remove "pom:profiles/pom:profile[pom:id ='oracle10-ojdbc14']" %{name}
+%pom_xpath_remove "pom:profiles/pom:profile[pom:id ='oracle10-ojdbc6']" %{name}
+%pom_xpath_remove "pom:profiles/pom:profile[pom:id ='mssql']" %{name}
+%pom_xpath_remove "pom:profiles/pom:profile[pom:id ='db2']" %{name}
+
+# requires
+# com.oracle ojdbc14 10.2.0.4.0
+# com.oracle ojdbc6 11.1.0.7.0
+rm -rf %{name}/src/main/java/org/dbunit/ext/oracle
+rm -rf %{name}/src/test/java/org/dbunit/ext/oracle
+rm -r %{name}/src/test/java/org/dbunit/OracleEnvironment.java \
+  %{name}/src/test/java/org/dbunit/Oracle10Environment.java \
+  %{name}/src/test/java/org/dbunit/ant/DbUnitTaskIT.java \
+  %{name}/src/test/java/org/dbunit/DatabaseEnvironment.java
+
+%pom_xpath_remove "pom:dependencies/pom:dependency[pom:scope ='test']" %{name}
+
+cp -p %{name}/LICENSE.txt .
+%pom_disable_module %{name}-maven-plugin
+
+%build
+
+%mvn_package :%{name}-all __noinstall
+%mvn_file : %{name}
+# unavailable test deps
+# available profiles derby h2 hsqldb mysql postgresql
+%mvn_build -f -- -Dproject.build.sourceEncoding=UTF-8
+
+%install
+%mvn_install
+
+mkdir -p %{buildroot}%{_sysconfdir}/ant.d
+echo "ant %{name} slf4j/slf4j-api" > %{name}-ant
+install -pm 644 %{name}-ant %{buildroot}%{_sysconfdir}/ant.d/%{name}
+
+%files -f .mfiles
+%config(noreplace) %{_sysconfdir}/ant.d/%{name}
+%doc LICENSE.txt
+
+%files javadoc -f .mfiles-javadoc
+%doc LICENSE.txt
+
+%changelog
+* Mon Aug 04 2014 gil cattaneo <puntogil at libero.it> 2.5.0-2
+- fix some review issues
+
+* Sat Aug 02 2014 gil cattaneo <puntogil at libero.it> 2.5.0-1
+- update to 2.5.0
+
+* Tue May 21 2013 gil cattaneo <puntogil at libero.it> 2.4.9-1
+- update to 2.4.9
+
+* Fri May 04 2012 gil cattaneo <puntogil at libero.it> 2.4.8-1
+- initial rpm
\ No newline at end of file
diff --git a/sources b/sources
index e69de29..bdc20ab 100644
--- a/sources
+++ b/sources
@@ -0,0 +1 @@
+ad3e758f63a848c0abfb9adfd302100d  dbunit-2.5.0.tar.xz


More information about the scm-commits mailing list