diff --git a/junit-4.11.pom b/junit-4.11.pom new file mode 100644 index 0000000..97cdd12 --- /dev/null +++ b/junit-4.11.pom @@ -0,0 +1,68 @@ + + + 4.0.0 + junit + junit + 4.11 + JUnit + http://junit.org + + JUnit is a regression testing framework written by Erich Gamma and Kent Beck. + It is used by the developer who implements unit tests in Java. + + + JUnit + http://www.junit.org + + + + JUnit Mailing List + junit@yahoogroups.com + + http://tech.groups.yahoo.com/group/junit/ + + + + + + Common Public License Version 1.0 + http://www.opensource.org/licenses/cpl1.0.txt + + + + scm:git:git://github.com/KentBeck/junit.git + scm:git:git@github.com:KentBeck/junit.git + http://github.com/KentBeck/junit/tree/master + + + + dsaff + David Saff + david@saff.net + + + + + + maven-compiler-plugin + + ISO-8859-1 + ${jdk.version} + ${jdk.version} + + + + + + + org.hamcrest + hamcrest-core + 1.3 + compile + + + + 1.5 + + \ No newline at end of file diff --git a/junit-no-hamcrest-src.patch b/junit-no-hamcrest-src.patch new file mode 100644 index 0000000..ef6fda1 --- /dev/null +++ b/junit-no-hamcrest-src.patch @@ -0,0 +1,40 @@ +diff --git a/build.xml b/build.xml +index 0efaf87..2efa11c 100644 +--- a/build.xml ++++ b/build.xml +@@ -30,7 +30,6 @@ + + + +- + + + +@@ -125,10 +124,6 @@ + + + +- +- +- +- + + + +@@ -138,7 +133,7 @@ + + + +- ++ + + + +- + + + diff --git a/junit.changes b/junit.changes index 366dd26..86508c2 100644 --- a/junit.changes +++ b/junit.changes @@ -1,3 +1,19 @@ +------------------------------------------------------------------- +Fri Oct 25 07:39:22 UTC 2013 - mvyskocil@suse.com + +- Update to 4.11 + * Matchers: Upgrade to Hamcrest 1.3 + no longer included junit jar + * Parameterized Tests + * Specify Test execution order + * New maven artifact 'junit:junit' w/o builtin hamcrest + * Number of improvements into Rules +- Drop jdk7-testfailure.patch, fixed upstream +- Add junit-no-hamcrest-src.patch, don't bundle hamcrest into junit.jar +- Use SourceUrl for release tarball and pom +- Don't inject OSGI manifest, it breaks junit.jar +- Provide/obsolete package junit4 + ------------------------------------------------------------------- Fri Aug 23 09:35:53 UTC 2013 - mvyskocil@suse.com diff --git a/junit.spec b/junit.spec new file mode 100644 index 0000000..bdb4568 --- /dev/null +++ b/junit.spec @@ -0,0 +1,153 @@ +# +# spec file for package junit +# +# Copyright (c) 2013 SUSE LINUX Products GmbH, Nuernberg, Germany. +# +# All modifications and additions to the file contributed by third parties +# remain the property of their copyright owners, unless otherwise agreed +# upon. The license for this file, and modifications and additions to the +# file, is the same license as for the pristine package itself (unless the +# license for the pristine package is not an Open Source License, in which +# case the license is the MIT License). An "Open Source License" is a +# license that conforms to the Open Source Definition (Version 1.9) +# published by the Open Source Initiative. + +# Please submit bugfixes or comments via http://bugs.opensuse.org/ +# + + +Name: junit +Version: 4.11 +Release: 0 +Summary: Java regression test package +License: CPL-1.0 +Group: Development/Libraries/Java +Url: http://www.junit.org/ +Source0: https://github.com/junit-team/junit/archive/r%{version}.tar.gz +#Source1: http://search.maven.org/remotecontent?filepath=junit/junit/4.11/junit-4.11.pom +Source1: junit-4.11.pom + +#PATCH-FIX-OPENSUSE: do not use bundled hamcrest sources, which btw fixes hamcrest build with junit4 +Patch0: junit-no-hamcrest-src.patch + +BuildArch: noarch +BuildRoot: %{_tmppath}/%{name}-%{version}-build + +BuildRequires: ant +BuildRequires: hamcrest >= 1.3 +BuildRequires: java-devel >= 1.6.0 +BuildRequires: javapackages-tools +BuildRequires: perl(Digest::MD5) + +Requires(post): javapackages-tools +Requires(postun): javapackages-tools +Requires: hamcrest +Requires: java >= 1.6.0 +Provides: junit4 = %{version} +Obsoletes: junit4 <= 4.10 + +%description +JUnit is a regression testing framework written by Erich Gamma and Kent Beck. +It is used by the developer who implements unit tests in Java. JUnit is Open +Source Software, released under the Common Public License Version 1.0 and +hosted on GitHub. + +%package manual +Summary: Manual for %{name} +Group: Documentation/Other +Provides: junit4-manual = %{version} +Obsoletes: junit4-manual <= 4.10 + +%description manual +Manual for %{name}. + +%package javadoc +Summary: Javadoc for %{name} +Group: Documentation/HTML +Provides: junit4-javadoc = %{version} +Obsoletes: junit4-javadoc <= 4.10 + +%description javadoc +Javadoc for %{name}. + +%package demo +Summary: Demos for %{name} +Group: Documentation/Other +Requires: %{name} = %{version} +Provides: junit4-demo = %{version} +Obsoletes: junit4-demo <= 4.10 + +%description demo +Demos for %{name}. + +%prep +%setup -q -n junit-r%{version} +%patch0 -p1 + +find . -type f -name "*.jar" -or -name "*.class" | xargs -t rm -rf + +ln -s $(build-classpath hamcrest/core) lib/hamcrest-core-1.3.jar + +%build +#export CLASSPATH= +#export OPT_JAR_LIST=: +#ant -Dant.build.javac.source=1.5 dist +ant dist -Dversion-status= + +%install +# jars +install -d -m 755 %{buildroot}%{_javadir} +install -m 644 junit%{version}/junit-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar +# compat symlink +ln -sf %{_javadir}/%{name}.jar %{buildroot}%{_javadir}/junit4.jar + +# pom +install -d -m 755 %{buildroot}%{_mavenpomdir} +install -m 644 %{SOURCE1} %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom +%add_maven_depmap + +# javadoc +install -d -m 755 %{buildroot}%{_javadocdir}/%{name} +cp -pr junit%{version}/javadoc/* %{buildroot}%{_javadocdir}/%{name} + +# demo +install -d -m 755 %{buildroot}%{_datadir}/%{name}/demo/junit # Not using % name for last part because it is + # part of package name +cp -pr junit%{version}/junit/* %{buildroot}%{_datadir}/%{name}/demo/junit + +%check + +cat > test.java <