Fix build error for hamcrest-2.2

This commit is contained in:
wk333 2023-10-07 16:44:34 +08:00
parent ab8580db52
commit 9511eff503

View File

@ -8,7 +8,7 @@
%define __requires_exclude osgi*
Name: tycho
Version: 1.3.0
Release: 5
Release: 6
Summary: Plugins and extensions for building Eclipse plugins and OSGI bundles with Maven
License: ASL 2.0 and EPL-1.0
URL: http://eclipse.org/tycho
@ -130,20 +130,16 @@ sed -i 's/public int getPriority/public float getPriority/g' tycho-core/src/main
mkdir -p tycho-maven-plugin/src/main/java/org/fedoraproject
sed -i '/^<unit id=.*$/d' tycho-bundles/tycho-bundles-target/tycho-bundles-target.target
%pom_xpath_remove "pom:dependency[pom:classifier='sources' and pom:artifactId='commons-compress']" tycho-p2/tycho-p2-director-plugin
for mod in tycho-bundles/org.eclipse.tycho.{p2.{maven.repository.tests,resolver.impl.test,tools.tests},test.utils,core.shared.tests}; do
sed -i 's/^Require-Bundle://
/org\.junit/ i Require-Bundle: org.hamcrest.core,' \
$mod/META-INF/MANIFEST.MF
done
sed -i '/org.hamcrest.core,/d' fedoraproject-p2/org.fedoraproject.p2.tests/META-INF/MANIFEST.MF
sed -i -e '/tycho-testing-harness/a<version>${project.version}</version>' tycho-surefire/tycho-surefire-plugin/pom.xml
%if %{with bootstrap}
%pom_xpath_remove "pom:compilerId" tycho-lib-detector
%pom_remove_dep "org.eclipse.tycho:tycho-compiler-jdt" tycho-lib-detector
for b in core.shared.tests p2.resolver.impl.test p2.resolver.shared.tests p2.maven.repository.tests p2.tools.tests test.utils ; do
%pom_disable_module org.eclipse.tycho.$b tycho-bundles
done
%pom_disable_module org.fedoraproject.p2.tests fedoraproject-p2
%pom_remove_dep -r :::test
%if %{with bootstrap}
%pom_xpath_remove "pom:compilerId" tycho-lib-detector
%pom_remove_dep "org.eclipse.tycho:tycho-compiler-jdt" tycho-lib-detector
tar -xf %{SOURCE10}
pushd bootstrap
for f in usr/lib/eclipse/plugins/org.eclipse.osgi.compatibility.state_*.jar \
@ -259,6 +255,9 @@ ln -s %{_javadir}/tycho/org.fedoraproject.p2.jar %{buildroot}%{xmvn_libdir}/inst
%files javadoc -f .mfiles-javadoc
%changelog
* Sat Oct 07 2023 wangkai <13474090681@163.com> - 1.3.0-6
- Fix build error for hamcrest-2.2
* Wed Aug 3 2022 caodongxia <caodongxia@h-partners.com> - 1.3.0-5
- fix selfbuild error