1 |
Name: maven-surefire |
2 |
Version: 2.7.1 |
3 |
Release: 2%{?dist} |
4 |
Epoch: 0 |
5 |
Summary: Test framework project |
6 |
License: ASL 2.0 |
7 |
Group: Development/Libraries |
8 |
URL: http://maven.apache.org/surefire/ |
9 |
|
10 |
Source0: http://repo2.maven.org/maven2/org/apache/maven/surefire/surefire/%{version}/surefire-%{version}-source-release.zip |
11 |
Source1: %{name}-jpp-depmap.xml |
12 |
|
13 |
# mockito is not available in Fedora yet |
14 |
Patch1: 0001-Remove-mockito-dependency.patch |
15 |
|
16 |
# use current version of maven-failsafe-plugin present in maven-surefire |
17 |
Patch2: 0002-Fix-failsafe-plugin-dependency-version.patch |
18 |
|
19 |
BuildArch: noarch |
20 |
BuildRequires: ant |
21 |
BuildRequires: ant-nodeps |
22 |
BuildRequires: classworlds |
23 |
BuildRequires: jpackage-utils >= 0:1.7.2 |
24 |
BuildRequires: junit >= 3.8.2 |
25 |
BuildRequires: plexus-utils |
26 |
BuildRequires: junit4 |
27 |
BuildRequires: testng |
28 |
|
29 |
BuildRequires: maven2 |
30 |
BuildRequires: maven-compiler-plugin |
31 |
BuildRequires: maven-help-plugin |
32 |
BuildRequires: maven-install-plugin |
33 |
BuildRequires: maven-invoker-plugin |
34 |
BuildRequires: maven-jar-plugin |
35 |
BuildRequires: maven-javadoc-plugin |
36 |
BuildRequires: maven-plugin-plugin |
37 |
BuildRequires: maven-resources-plugin |
38 |
BuildRequires: maven-site-plugin |
39 |
BuildRequires: maven-shade-plugin |
40 |
BuildRequires: maven-shared-verifier |
41 |
BuildRequires: maven-surefire-maven-plugin |
42 |
|
43 |
BuildRequires: plexus-containers-component-api >= 1.0-0.a34 |
44 |
BuildRequires: tomcat6 |
45 |
BuildRequires: tomcat6-servlet-2.5-api |
46 |
BuildRequires: maven-plugin-testing-harness |
47 |
BuildRequires: bsf |
48 |
|
49 |
Requires: classworlds |
50 |
Requires: maven2 |
51 |
Requires: junit |
52 |
Requires: plexus-utils |
53 |
|
54 |
Requires(post): jpackage-utils >= 0:1.7.2 |
55 |
Requires(postun): jpackage-utils >= 0:1.7.2 |
56 |
|
57 |
Obsoletes: maven-surefire-booter <= 0:1.5.3 |
58 |
Provides: maven-surefire-booter = %{epoch}:%{version}-%{release} |
59 |
|
60 |
%description |
61 |
Surefire is a test framework project. |
62 |
|
63 |
%package plugin |
64 |
Summary: Surefire plugin for maven |
65 |
Group: Development/Libraries |
66 |
Requires: maven-surefire = %{epoch}:%{version}-%{release} |
67 |
Obsoletes: maven2-plugin-surefire <= 0:2.0.4 |
68 |
Provides : maven2-plugin-surefire = %{epoch}:%{version}-%{release} |
69 |
Obsoletes: maven-surefire-maven-plugin < 0:2.6 |
70 |
Provides : maven-surefire-maven-plugin = %{epoch}:%{version}-%{release} |
71 |
|
72 |
%description plugin |
73 |
Maven surefire plugin for running tests via the surefire framework. |
74 |
|
75 |
%package report-plugin |
76 |
Summary: Surefire reports plugin for maven |
77 |
Group: Development/Libraries |
78 |
Requires: maven-surefire = %{epoch}:%{version}-%{release} |
79 |
Obsoletes: maven2-plugin-surefire-report <= 0:2.0.4 |
80 |
Provides : maven2-plugin-surefire-report = %{epoch}:%{version}-%{release} |
81 |
Obsoletes: maven-surefire-report-maven-plugin < 0:2.6 |
82 |
Provides : maven-surefire-report-maven-plugin = %{epoch}:%{version}-%{release} |
83 |
|
84 |
%description report-plugin |
85 |
Plugin for generating reports from surefire test runs. |
86 |
|
87 |
%package provider-junit |
88 |
Summary: JUnit3 provider for Maven Surefire |
89 |
Group: Development/Libraries |
90 |
Requires: junit |
91 |
Requires: maven-surefire = %{epoch}:%{version}-%{release} |
92 |
Obsoletes: maven2-plugin-surefire-report <= 0:2.0.4O |
93 |
#Obsoletes: maven-surefire-junit = 2.3.1 |
94 |
Provides: maven2-plugin-surefire-report = %{epoch}:%{version}-%{release} |
95 |
#Provides: maven-surefire-junit = 2.3.1 |
96 |
|
97 |
%description provider-junit |
98 |
JUnit3 provider for Maven Surefire. |
99 |
|
100 |
%package provider-junit4 |
101 |
Summary: JUnit4 provider for Maven Surefire |
102 |
Group: Development/Libraries |
103 |
Requires: maven-surefire = %{epoch}:%{version}-%{release} |
104 |
Requires: junit4 |
105 |
|
106 |
%description provider-junit4 |
107 |
JUnit4 provider for Maven Surefire. |
108 |
|
109 |
%package provider-testng |
110 |
Summary: TestNG provider for Maven Surefire |
111 |
Group: Development/Libraries |
112 |
Requires: maven-surefire = %{epoch}:%{version}-%{release} |
113 |
Requires: testng |
114 |
|
115 |
%description provider-testng |
116 |
TestNG provider for Maven Surefire. |
117 |
|
118 |
%package -n maven-failsafe-plugin |
119 |
Summary: Maven plugin for running integration tests |
120 |
Group: Development/Libraries |
121 |
Requires: maven-surefire = %{epoch}:%{version}-%{release} |
122 |
|
123 |
%description -n maven-failsafe-plugin |
124 |
The Failsafe Plugin is designed to run integration tests while the |
125 |
Surefire Plugins is designed to run unit. The name (failsafe) was |
126 |
chosen both because it is a synonym of surefire and because it implies |
127 |
that when it fails, it does so in a safe way. |
128 |
|
129 |
If you use the Surefire Plugin for running tests, then when you have a |
130 |
test failure, the build will stop at the integration-test phase and |
131 |
your integration test environment will not have been torn down |
132 |
correctly. |
133 |
|
134 |
The Failsafe Plugin is used during the integration-test and verify |
135 |
phases of the build lifecycle to execute the integration tests of an |
136 |
application. The Failsafe Plugin will not fail the build during the |
137 |
integration-test phase thus enabling the post-integration-test phase |
138 |
to execute. |
139 |
|
140 |
%package javadoc |
141 |
Summary: Javadoc for %{name} |
142 |
Group: Documentation |
143 |
|
144 |
%description javadoc |
145 |
Javadoc for %{name}. |
146 |
|
147 |
%prep |
148 |
%setup -q -n surefire-%{version} |
149 |
|
150 |
%patch1 -p1 -b .sav |
151 |
%patch2 -b .sav |
152 |
|
153 |
%build |
154 |
export MAVEN_REPO_LOCAL=$(pwd)/.m2/repository |
155 |
mkdir -p $MAVEN_REPO_LOCAL |
156 |
# tests turned off because they need jmock |
157 |
mvn-jpp -e \ |
158 |
-Dmaven.repo.local=$MAVEN_REPO_LOCAL \ |
159 |
-Dmaven2.jpp.depmap.file=%{SOURCE1} \ |
160 |
-Dmaven.test.skip=true \ |
161 |
install javadoc:aggregate |
162 |
|
163 |
%install |
164 |
rm -rf $RPM_BUILD_ROOT |
165 |
# jars |
166 |
install -d -m 755 $RPM_BUILD_ROOT%{_javadir}/maven-surefire |
167 |
install -d -m 755 $RPM_BUILD_ROOT%{_mavenpomdir} |
168 |
|
169 |
install -pm 644 maven-surefire-plugin/target/maven-surefire-plugin-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/maven-plugin.jar |
170 |
%add_to_maven_depmap org.apache.maven.surefire maven-surefire-plugin %{version} JPP/maven-surefire maven-plugin |
171 |
install -pm 644 maven-surefire-plugin/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-maven-plugin.pom |
172 |
install -pm 644 maven-surefire-plugin/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven2.plugins-surefire-plugin.pom |
173 |
|
174 |
install -pm 644 maven-surefire-common/target/maven-surefire-common-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/common.jar |
175 |
%add_to_maven_depmap org.apache.maven.surefire maven-surefire-common %{version} JPP/maven-surefire common |
176 |
install -pm 644 maven-surefire-common/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-common.pom |
177 |
|
178 |
install -pm 644 maven-surefire-report-plugin/target/maven-surefire-report-plugin-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/report-maven-plugin.jar |
179 |
%add_to_maven_depmap org.apache.maven.surefire maven-surefire-report-plugin %{version} JPP/maven-surefire report-maven-plugin |
180 |
install -pm 644 maven-surefire-report-plugin/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-report-maven-plugin.pom |
181 |
|
182 |
install -pm 644 surefire-api/target/original-surefire-api-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/api.jar |
183 |
%add_to_maven_depmap org.apache.maven.surefire surefire-api %{version} JPP/maven-surefire api |
184 |
install -pm 644 surefire-api/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-api.pom |
185 |
|
186 |
install -pm 644 surefire-booter/target/surefire-booter-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/booter.jar |
187 |
%add_to_maven_depmap org.apache.maven.surefire surefire-booter %{version} JPP/maven-surefire booter |
188 |
install -pm 644 surefire-booter/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-booter.pom |
189 |
|
190 |
install -pm 644 surefire-providers/surefire-junit/target/surefire-junit3-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit.jar |
191 |
%add_to_maven_depmap org.apache.maven.surefire surefire-junit3 %{version} JPP/maven-surefire junit |
192 |
install -pm 644 surefire-providers/surefire-junit/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-junit.pom |
193 |
|
194 |
install -pm 644 surefire-providers/surefire-junit4/target/surefire-junit4-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit4.jar |
195 |
%add_to_maven_depmap org.apache.maven.surefire surefire-junit4 %{version} JPP/maven-surefire junit4 |
196 |
install -pm 644 surefire-providers/surefire-junit4/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-junit4.pom |
197 |
|
198 |
install -pm 644 surefire-providers/surefire-junit47/target/surefire-junit47-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/junit47.jar |
199 |
%add_to_maven_depmap org.apache.maven.surefire surefire-junit47 %{version} JPP/maven-surefire junit47 |
200 |
install -pm 644 surefire-providers/surefire-junit47/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-junit47.pom |
201 |
|
202 |
install -pm 644 surefire-providers/surefire-testng/target/surefire-testng-*.jar $RPM_BUILD_ROOT%{_javadir}/maven-surefire/testng.jar |
203 |
%add_to_maven_depmap org.apache.maven.surefire surefire-testng %{version} JPP/maven-surefire testng |
204 |
install -pm 644 surefire-providers/surefire-testng/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-testng.pom |
205 |
|
206 |
%add_to_maven_depmap org.apache.maven.surefire providers %{version} JPP/maven-surefire providers |
207 |
install -pm 644 surefire-providers/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-providers.pom |
208 |
|
209 |
install -pm 644 maven-failsafe-plugin/target/maven-failsafe-plugin*.jar $RPM_BUILD_ROOT%{_javadir}/maven-failsafe-plugin.jar |
210 |
%add_to_maven_depmap org.apache.maven.plugins maven-failsafe-plugin %{version} JPP maven-failsafe-plugin |
211 |
install -pm 644 maven-failsafe-plugin/pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP-maven-failsafe-plugin.pom |
212 |
|
213 |
install -pm 644 pom.xml $RPM_BUILD_ROOT%{_mavenpomdir}/JPP.maven-surefire-main.pom |
214 |
%add_to_maven_depmap org.apache.maven.surefire surefire %{version} JPP/maven-surefire main |
215 |
|
216 |
# javadoc |
217 |
install -d -m 755 $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} |
218 |
cp -pr target/site/apidocs/* $RPM_BUILD_ROOT%{_javadocdir}/%{name}-%{version} |
219 |
ln -sf %{name}-%{version} $RPM_BUILD_ROOT%{_javadocdir}/%{name} |
220 |
|
221 |
# Create compatibility links |
222 |
ln -s %{_javadir}/maven-surefire/api.jar \ |
223 |
$RPM_BUILD_ROOT%{_javadir}/maven-surefire/surefire.jar |
224 |
|
225 |
install -dm 755 $RPM_BUILD_ROOT%{_datadir}/maven2/plugins |
226 |
ln -s %{_javadir}/maven-surefire/maven-plugin.jar \ |
227 |
$RPM_BUILD_ROOT%{_datadir}/maven2/plugins/surefire-plugin.jar |
228 |
|
229 |
ln -s %{_javadir}/maven-surefire/report-maven-plugin.jar \ |
230 |
$RPM_BUILD_ROOT%{_datadir}/maven2/plugins/surefire-report-plugin.jar |
231 |
|
232 |
%post |
233 |
%update_maven_depmap |
234 |
|
235 |
%postun |
236 |
%update_maven_depmap |
237 |
|
238 |
%files |
239 |
%defattr(-,root,root,-) |
240 |
%dir %{_javadir}/maven-surefire |
241 |
%{_javadir}/maven-surefire/api* |
242 |
%{_javadir}/maven-surefire/booter* |
243 |
%{_javadir}/maven-surefire/surefire.jar |
244 |
%{_javadir}/maven-surefire/common* |
245 |
%{_mavenpomdir}/* |
246 |
%{_mavendepmapfragdir}/* |
247 |
|
248 |
%files plugin |
249 |
%defattr(-,root,root,-) |
250 |
%{_javadir}/maven-surefire/maven-plugin* |
251 |
%dir %{_datadir}/maven2/plugins |
252 |
%{_datadir}/maven2/plugins/surefire-plugin.jar |
253 |
|
254 |
%files report-plugin |
255 |
%defattr(-,root,root,-) |
256 |
%{_javadir}/maven-surefire/report-maven-plugin* |
257 |
%dir %{_datadir}/maven2/plugins |
258 |
%{_datadir}/maven2/plugins/surefire-report-plugin.jar |
259 |
|
260 |
%files provider-junit |
261 |
%defattr(-,root,root,-) |
262 |
%{_javadir}/maven-surefire/junit[^4]* |
263 |
|
264 |
%files provider-junit4 |
265 |
%defattr(-,root,root,-) |
266 |
%{_javadir}/maven-surefire/junit4* |
267 |
|
268 |
%files provider-testng |
269 |
%defattr(-,root,root,-) |
270 |
%{_javadir}/maven-surefire/testng* |
271 |
|
272 |
%files -n maven-failsafe-plugin |
273 |
%defattr(-,root,root,-) |
274 |
%{_javadir}/maven-failsafe-plugin*jar |
275 |
|
276 |
%files javadoc |
277 |
%defattr(-,root,root,-) |
278 |
%doc %{_javadocdir}/* |
279 |
|