jetty-test-helper/jetty-test-helper.spec

97 lines
3.5 KiB
RPMSpec
Raw Permalink Normal View History

2020-08-25 19:06:44 +08:00
Name: jetty-test-helper
2024-01-30 15:56:55 +08:00
Version: 5.9
Release: 1
2022-05-11 16:46:59 +08:00
License: ASL 2.0 or EPL-1.0
2020-08-25 19:06:44 +08:00
Summary: Jetty toolchain test helper
URL: https://github.com/eclipse/jetty.toolchain
2024-01-30 15:56:55 +08:00
Source0: https://github.com/jetty/jetty-toolchain/archive/refs/tags/%{name}-%{version}.tar.gz
2020-08-25 19:06:44 +08:00
Source1: https://github.com/eclipse/jetty.project/blob/jetty-9.3.x/LICENSE-eplv10-aslv20.html
2024-01-30 15:56:55 +08:00
Source2: https://repo.maven.apache.org/maven2/org/junit/jupiter/junit-jupiter/5.8.0/junit-jupiter-5.8.0.pom
2020-08-25 19:06:44 +08:00
BuildArch: noarch
BuildRequires: maven-local mvn(junit:junit)
BuildRequires: mvn(org.eclipse.jetty.toolchain:jetty-toolchain:pom:)
BuildRequires: mvn(org.hamcrest:hamcrest-library)
2024-01-30 15:56:55 +08:00
BuildRequires: mvn(org.eclipse.jetty.toolchain:jetty-artifact-remote-resources)
BuildRequires: mvn(org.eclipse.aether:aether-connector-basic)
BuildRequires: mvn(org.eclipse.aether:aether-transport-wagon)
BuildRequires: mvn(org.apache.maven.wagon:wagon-http)
BuildRequires: mvn(org.apache.maven.wagon:wagon-provider-api)
BuildRequires: mvn(org.apache.maven.plugins:maven-dependency-plugin)
2020-08-25 19:06:44 +08:00
%description
Unit Testing Support for Jetty (common classes for some unit tests).
%package javadoc
Summary: Javadoc %{name}
%description javadoc
This package contains the API documentation for %{name}.
%prep
2024-01-30 15:56:55 +08:00
%setup -q -n jetty-toolchain-%{name}-%{version}/%{name}
2020-08-25 19:06:44 +08:00
find -name '*.?ar' -delete
find -name '*.class' -delete
cp %{SOURCE1} .
%pom_remove_plugin :maven-pmd-plugin
2024-01-30 15:56:55 +08:00
%pom_remove_plugin :license-maven-plugin
2020-08-25 19:06:44 +08:00
%pom_remove_plugin :maven-source-plugin
2024-01-30 15:56:55 +08:00
sed -i '/<release>/d' pom.xml
MVN_DEPENDENCY_PLUGIN_EXTRA_XML="<executions>
<execution>
<phase>prepare-package</phase>
<goals>
<goal>copy</goal>
</goals>
<configuration>
<artifactItems>
<artifactItem>
<groupId>org.junit.jupiter</groupId>
<artifactId>junit-jupiter</artifactId>
<version>5.8.0</version>
<overWrite>false</overWrite>
<outputDirectory>project.build.directory</outputDirectory>
<destFileName></destFileName>
</artifactItem>
</artifactItems>
</configuration>
</execution>
</executions>"
%pom_add_plugin org.apache.maven.plugins:maven-dependency-plugin:3.0.2 . "$MVN_DEPENDENCY_PLUGIN_EXTRA_XML"
sed -i 's/project.build.directory/${project.build.directory}/g' pom.xml
cp %{SOURCE2} ./
2020-08-25 19:06:44 +08:00
%build
2024-01-30 15:56:55 +08:00
%mvn_build -b
sed -i '/junit-jupiter/,+2d;:go;1,2!{P;N;D};N;bgo' .xmvn-reactor
sed -i '/org.junit.jupiter/d' .xmvn-reactor
sed -i '$d' .xmvn-reactor
sed -i '51d' .xmvn-reactor
sed -i '32d' .xmvn-reactor
2020-08-25 19:06:44 +08:00
%install
2024-01-30 15:56:55 +08:00
install -d -m 0755 %{buildroot}%{_javadir}/junit5/
install -d -m 0755 %{buildroot}%{_mavenpomdir}/junit5/
install -pm 0644 ./target/junit-jupiter-5.8.0.jar %{buildroot}%{_javadir}/junit5/junit-jupiter.jar
install -pm 0644 ./junit-jupiter-5.8.0.pom %{buildroot}%{_mavenpomdir}/junit5/junit-jupiter.pom
%add_maven_depmap junit5/junit-jupiter.pom junit5/junit-jupiter.jar
2020-08-25 19:06:44 +08:00
%mvn_install
2024-01-30 15:56:55 +08:00
2020-08-25 19:06:44 +08:00
%files -f .mfiles
2024-01-30 15:56:55 +08:00
%{_javadir}/junit5/junit-jupiter.jar
%{_mavenpomdir}/junit5/junit-jupiter.pom
2020-08-25 19:06:44 +08:00
%license LICENSE-eplv10-aslv20.html
%files javadoc -f .mfiles-javadoc
%license LICENSE-eplv10-aslv20.html
%changelog
2024-01-30 15:56:55 +08:00
* Tue Jan 30 2024 Ge Wang <wang__ge@126.com> - 5.9-1
- update to version 5.9
2022-05-11 16:46:59 +08:00
* Mon May 9 2022 baizhonggui <baizhonggui@h-partners.com> - 3.1-2
- modify license identifier
2020-08-25 19:06:44 +08:00
* Wed Aug 5 2020 huanghaitao <huanghaitao8@huawei.com> - 3.1-1
- package init