Update to upstream version 4.12

This commit is contained in:
Mikolaj Izdebski 2015-01-19 07:52:35 +01:00
parent b818d8c866
commit 637a374511
5 changed files with 46 additions and 136 deletions

1
.gitignore vendored
View File

@ -2,3 +2,4 @@ junit3.8.2.zip
/junit-4.10.tar.xz
/r4.11.tar.gz
/junit-4.11-clean.tar.gz
/junit-4.12-clean.tar.gz

View File

@ -1,33 +0,0 @@
Manifest-Version: 1.0
Bundle-ClassPath: .
Bundle-Vendor: %providerName
Bundle-Localization: plugin
Bundle-RequiredExecutionEnvironment: J2SE-1.5
Bundle-Name: %pluginName
Bundle-SymbolicName: org.junit
Eclipse-SourceReferences: scm:cvs:pserver:dev.eclipse.org:/cvsroot/too
ls:org.eclipse.orbit/org.junit;tag=v201303080030
Require-Bundle: org.hamcrest.core;bundle-version="1.3.0";visibility:=r
eexport
Export-Package: junit.extensions;version="4.11.0",junit.framework;vers
ion="4.11.0",junit.runner;version="4.11.0",junit.textui;version="4.11
.0",org.junit;version="4.11.0",org.junit.experimental;version="4.11.0
",org.junit.experimental.categories;version="4.11.0",org.junit.experi
mental.max;version="4.11.0",org.junit.experimental.results;version="4
.11.0",org.junit.experimental.runners;version="4.11.0",org.junit.expe
rimental.theories;version="4.11.0",org.junit.experimental.theories.in
ternal;version="4.11.0";x-internal:=true,org.junit.experimental.theor
ies.suppliers;version="4.11.0",org.junit.internal;version="4.11.0";x-
internal:=true,org.junit.internal.builders;version="4.11.0";x-interna
l:=true,org.junit.internal.matchers;version="4.11.0";x-internal:=true
,org.junit.internal.requests;version="4.11.0";x-internal:=true,org.ju
nit.internal.runners;version="4.11.0";x-internal:=true,org.junit.inte
rnal.runners.model;version="4.11.0";x-internal:=true,org.junit.intern
al.runners.rules;version="4.11.0";x-internal:=true,org.junit.internal
.runners.statements;version="4.11.0";x-internal:=true,org.junit.match
ers;version="4.11.0",org.junit.rules;version="4.11.0",org.junit.runne
r;version="4.11.0",org.junit.runner.manipulation;version="4.11.0",org
.junit.runner.notification;version="4.11.0",org.junit.runners;version
="4.11.0",org.junit.runners.model;version="4.11.0"
Bundle-Version: 4.11.0.v201303080030
Bundle-ManifestVersion: 2

View File

@ -1,40 +0,0 @@
diff --git a/build.xml b/build.xml
index 0efaf87..2efa11c 100644
--- a/build.xml
+++ b/build.xml
@@ -30,7 +30,6 @@
<property name="javadoczip" location="${dist}-javadoc.zip" />
<property name="hamcrestlib" location="lib/hamcrest-core-1.3.jar" />
<property name="hamcrestlibsources" location="lib/hamcrest-core-1.3-sources.jar" />
- <property name="hamcrestsrc" location="${dist}/temp.hamcrest.source" />
<property name="maven.deploy.goal" value="org.apache.maven.plugins:maven-gpg-plugin:1.1:sign-and-deploy-file" />
@@ -125,10 +124,6 @@
</copy>
</target>
- <target name="unjar.hamcrest">
- <unjar src="${hamcrestlibsources}" dest="${hamcrestsrc}" />
- </target>
-
<target name="release-notes">
<property name="basename" value="doc/ReleaseNotes${version-base}" />
<exec executable="perl" failonerror="true">
@@ -138,7 +133,7 @@
</exec>
</target>
- <target name="javadoc" depends="unjar.hamcrest">
+ <target name="javadoc">
<javadoc destdir="${javadocdir}"
author="false"
version="false"
@@ -151,7 +146,6 @@
<excludepackage name="org.junit.experimental.theories.internal.*" />
<sourcepath location="${src}" />
- <sourcepath location="${hamcrestsrc}" />
<link href="http://java.sun.com/javase/6/docs/api/" />
</javadoc>
</target>

View File

@ -1,28 +1,21 @@
Name: junit
Epoch: 1
Version: 4.11
Release: 14%{?dist}
Version: 4.12
Release: 1%{?dist}
Summary: Java regression test package
License: CPL
License: EPL
URL: http://www.junit.org/
BuildArch: noarch
# ./clean-tarball.sh %{version}
Source0: %{name}-%{version}-clean.tar.gz
Source2: junit-OSGi-MANIFEST.MF
Source3: create-tarball.sh
# Removing hamcrest source jar references (not available and/or necessary)
Patch0: %{name}-no-hamcrest-src.patch
BuildRequires: ant
BuildRequires: ant-contrib
BuildRequires: java-devel
BuildRequires: maven-local
BuildRequires: hamcrest
BuildRequires: perl(Digest::MD5)
BuildRequires: mvn(org.apache.felix:maven-bundle-plugin)
Requires: hamcrest
Requires: java-headless
Obsoletes: %{name}-demo < 4.12
%description
JUnit is a regression testing framework written by Erich Gamma and Kent Beck.
@ -42,71 +35,60 @@ Summary: Javadoc for %{name}
%description javadoc
Javadoc for %{name}.
%package demo
Summary: Demos for %{name}
Requires: %{name} = %{epoch}:%{version}-%{release}
%description demo
Demonstrations and samples for %{name}.
%prep
%setup -q -n %{name}-r%{version}
%patch0 -p1
cp build/maven/junit-pom-template.xml pom.xml
# fix placeholder version in pom
%pom_xpath_set pom:project/pom:version "%{version}"
ln -s $(build-classpath hamcrest/core) lib/hamcrest-core-1.3.jar
# InaccessibleBaseClassTest fails with Java 8
sed -i /InaccessibleBaseClassTest/d src/test/java/org/junit/tests/AllTests.java
%build
ant dist -Dversion-status=
%pom_remove_plugin :replacer
sed s/@version@/%{version}/ src/main/java/junit/runner/Version.java.template >src/main/java/junit/runner/Version.java
# inject OSGi manifest
mkdir -p META-INF
cp -p %{SOURCE2} META-INF/MANIFEST.MF
touch META-INF/MANIFEST.MF
zip -u %{name}%{version}/%{name}-%{version}.jar META-INF/MANIFEST.MF
%pom_remove_plugin :animal-sniffer-maven-plugin
# Removing hamcrest source jar references (not available and/or necessary)
%pom_remove_plugin :maven-javadoc-plugin
# Add proper Apache Felix Bundle Plugin instructions
# so that we get a reasonable OSGi manifest.
%pom_xpath_inject pom:project "<packaging>bundle</packaging>"
%pom_xpath_inject pom:build/pom:plugins "
<plugin>
<groupId>org.apache.felix</groupId>
<artifactId>maven-bundle-plugin</artifactId>
<extensions>true</extensions>
<configuration>
<instructions>
<Bundle-SymbolicName>org.junit</Bundle-SymbolicName>
<_nouses>true</_nouses>
</instructions>
</configuration>
</plugin>"
%mvn_file : %{name}
%build
%mvn_build
%install
# jars
install -d -m 755 %{buildroot}%{_javadir}
install -m 644 %{name}%{version}/%{name}-%{version}.jar %{buildroot}%{_javadir}/%{name}.jar
# pom
install -d -m 755 %{buildroot}%{_mavenpomdir}
install -m 644 pom.xml %{buildroot}%{_mavenpomdir}/JPP-%{name}.pom
%add_maven_depmap
# javadoc
install -d -m 755 %{buildroot}%{_javadocdir}/%{name}
cp -pr %{name}%{version}/javadoc/* %{buildroot}%{_javadocdir}/%{name}
# demo
install -d -m 755 %{buildroot}%{_datadir}/%{name}/demo/%{name}
cp -pr %{name}%{version}/%{name}/* %{buildroot}%{_datadir}/%{name}/demo/%{name}
%mvn_install
%files -f .mfiles
%doc LICENSE README CODING_STYLE
%doc LICENSE-junit.txt README.md
%files demo
%doc LICENSE
%{_datadir}/%{name}
%files javadoc
%doc LICENSE
%doc %{_javadocdir}/%{name}
%files javadoc -f .mfiles-javadoc
%doc LICENSE-junit.txt
%files manual
%doc LICENSE README CODING_STYLE
%doc junit%{version}/doc/*
%doc LICENSE-junit.txt
%doc doc/*
%changelog
* Mon Jan 19 2015 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:4.12-1
- Update to upstream version 4.12
- Build with Maven
- Remove demo package
* Mon Jun 9 2014 Mikolaj Izdebski <mizdebsk@redhat.com> - 1:4.11-14
- Add epoch as workaround for a bug in koji-shadow

View File

@ -1 +1 @@
f5f33e6ebaba68f3523c664f5a3860a7 junit-4.11-clean.tar.gz
0de14594aaba3379f6b19ba75a393232 junit-4.12-clean.tar.gz