%global gittag %{version}.201902250526
Name: eclipse-testng
Version: 6.14.3
Release: 3%{?dist}
Summary: TestNG plug-in for Eclipse
License: ASL 2.0
URL: http://testng.org
BuildArch: noarch
# Upstream Eclipse no longer supports non-64bit arches
ExcludeArch: s390 %{arm} %{ix86}
Source0: https://github.com/cbeust/testng-eclipse/archive/%{gittag}/eclipse-testng-%{version}.tar.gz
# Add gson to classpath because in Fedora, testng-remote does not bundle it
Patch0: 0001-Add-gson-to-classpath-because-in-Fedora-testng-remot.patch
BuildRequires: tycho
BuildRequires: maven-enforcer-plugin
BuildRequires: eclipse-jdt >= 1:4.10.0-1
BuildRequires: eclipse-m2e-core
BuildRequires: guava
BuildRequires: junit
BuildRequires: hamcrest-core
BuildRequires: testng >= 6.14.3
BuildRequires: testng-remote >= 1.3.0
BuildRequires: snakeyaml
BuildRequires: google-gson
Requires: eclipse-jdt >= 1:4.10.0-1
Requires: testng >= 6.14.3
Requires: testng-remote >= 1.3.0
Requires: snakeyaml
Requires: google-gson
%description
The Eclipse TestNG plug-in integrates the TestNG testing framework into the
Eclipse IDE.
%prep
%setup -q -n testng-eclipse-%{gittag}
%patch0 -p1
# remove bundled libs
find -name '*.class' -exec rm -f '{}' \;
find -name '*.jar' -exec rm -f '{}' \;
# remove plugin not in Fedora
%pom_remove_plugin "pl.project13.maven:git-commit-id-plugin"
%pom_remove_plugin "pl.project13.maven:git-commit-id-plugin" testng-eclipse-plugin
sed -i -e 's/${git.branch}/%{gittag}/' -e 's/${git.commit.id}/%{gittag}/' -e 's/${git.build.version}/%{version}/' \
testng-eclipse-plugin/src/main/resources/git.properties
# build against fedora packaged libs
build-jar-repository -s -p testng-eclipse-plugin/lib \
testng-remote/testng-remote-dist-shaded google-gson/gson
mv testng-eclipse-plugin/lib/testng-remote_testng-remote-dist-shaded.jar testng-eclipse-plugin/lib/testng-remote.jar
sed -i -e '2iEclipse-BundleShape: dir' testng-eclipse-plugin/META-INF/MANIFEST.MF
# TestNG package doesn't supply an eclipse feature
sed -i -e '/org.testng.p2.feature/d' testng-eclipse-feature/feature.xml
# No need to build update site in RPM builds
%pom_disable_module "testng-eclipse-update-site"
# Don't install poms
%mvn_package "::pom::" __noinstall
%build
%mvn_build -j
%install
%mvn_install
# need to recreate the symlinks to libraries that were setup in "prep"
# this will cause some benign dangling-symlink rpmlint warnings
pushd %{buildroot}%{_datadir}/eclipse/droplets/testng/plugins/org.testng.eclipse_*
rm lib/*.jar
build-jar-repository -s -p lib \
testng-remote/testng-remote-dist-shaded google-gson/gson
mv lib/testng-remote_testng-remote-dist-shaded.jar lib/testng-remote.jar
popd
%files -f .mfiles
%doc README.md
%changelog
* Wed Jul 24 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.14.3-3
- Rebuilt for https://fedoraproject.org/wiki/Fedora_31_Mass_Rebuild
* Fri Mar 15 2019 Mat Booth <mat.booth@redhat.com> - 6.14.3-2
- Ensure patch applies cleanly
* Thu Mar 14 2019 Mat Booth <mat.booth@redhat.com> - 6.14.3-1
- Update to latest upstream release
- Restrict to same architectures as Eclipse itself
* Thu Jan 31 2019 Fedora Release Engineering <releng@fedoraproject.org> - 6.14.0-7
- Rebuilt for https://fedoraproject.org/wiki/Fedora_30_Mass_Rebuild
* Thu Dec 13 2018 Mat Booth <mat.booth@redhat.com> - 6.14.0-6
- Fix build against latest JDT
* Wed Sep 12 2018 Mat Booth <mat.booth@redhat.com> - 6.14.0-5
- Patch to fix erroneous maven property panels
* Thu Jul 12 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.14.0-4
- Rebuilt for https://fedoraproject.org/wiki/Fedora_29_Mass_Rebuild
* Fri May 4 2018 Alexander Kurtakov <akurtako@redhat.com> 6.14.0-3
- Adjust to remove useless extra eclipse dir in droplets.
* Tue Mar 20 2018 Alexander Kurtakov <akurtako@redhat.com> 6.14.0-2
- Rebuild to pickup new testng metadata.
* Tue Mar 20 2018 Alexander Kurtakov <akurtako@redhat.com> 6.14.0-1
- Update to upstream 6.14.0 release.
* Wed Feb 07 2018 Fedora Release Engineering <releng@fedoraproject.org> - 6.12.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_28_Mass_Rebuild
* Thu Sep 14 2017 Mat Booth <mat.booth@redhat.com> - 6.12.0-1
- Update to tagged release
* Wed Aug 23 2017 Mat Booth <mat.booth@redhat.com> - 6.12.0-0.1.gitf991e16
- Update to latest snapshot for broader support of testng versions
* Wed Jul 26 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.11.0-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_27_Mass_Rebuild
* Tue Jul 04 2017 Nick Boldt <nboldt@redhat.com> - 6.11.0-1
- Update to latest release
* Fri Feb 10 2017 Fedora Release Engineering <releng@fedoraproject.org> - 6.9.13-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_26_Mass_Rebuild
* Wed Nov 09 2016 Mat Booth <mat.booth@redhat.com> - 6.9.13-1
- Update to latest upstream version
* Thu Jun 30 2016 Mikolaj Izdebski <mizdebsk@redhat.com> - 6.9.11.1-2
- Add missing BR on maven-enforcer-plugin
* Mon Apr 25 2016 Mat Booth <mat.booth@redhat.com> - 6.9.11.1-1
- Update to latest upstream release
* Wed Feb 03 2016 Fedora Release Engineering <releng@fedoraproject.org> - 6.9.9-2
- Rebuilt for https://fedoraproject.org/wiki/Fedora_24_Mass_Rebuild
* Thu Oct 29 2015 Mat Booth <mat.booth@redhat.com> - 6.9.9-1
- Update to 6.9.9
* Wed Sep 02 2015 Mat Booth <mat.booth@redhat.com> - 6.9.5-1.git4d432f9
- Update to latest upstream
- Build with xmvn/tycho
* Wed Jun 17 2015 Fedora Release Engineering <rel-eng@lists.fedoraproject.org> - 6.8.6-6
- Rebuilt for https://fedoraproject.org/wiki/Fedora_23_Mass_Rebuild
* Mon Mar 9 2015 Alexander Kurtakov <akurtako@redhat.com> 6.8.6-5
- Add BR: slf4j now that it's no longer transitive one.
* Wed Jul 30 2014 Mat Booth <mat.booth@redhat.com> - 6.8.6-4
- Restore testng as an embedded lib due to runtime issues
* Mon Jun 16 2014 Mat Booth <mat.booth@redhat.com> - 6.8.6-3
- Use orbit style deps instead of symlinked libs embedded in the plug-in
* Thu Jun 12 2014 Mat Booth <mat.booth@redhat.com> - 6.8.6-2
- Patch for compatibility with eclipse luna
* Thu Jun 12 2014 Mat Booth <mat.booth@redhat.com> - 6.8.6-1
- Update to latest upstream release.
* Fri Mar 14 2014 Mat Booth <fedora@matbooth.co.uk> - 6.8.5-2.20130625gite0f6037
- Add BR/R on google-guice.
* Tue Jun 25 2013 Mat Booth <fedora@matbooth.co.uk> - 6.8.5-1.20130625gite0f6037
- Initial package.