Commit | Line | Data |
---|---|---|
41125eaf JL |
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2018 Julien Lepiller <julien@lepiller.eu> | |
b7a34617 | 3 | ;;; Copyright © 2019 Tobias Geerinckx-Rice <me@tobias.gr> |
53ba191b | 4 | ;;; Copyright © 2019 Björn Höfling <bjoern.hoefling@bjoernhoefling.de> |
a0068742 | 5 | ;;; Copyright © 2020 Efraim Flashner <efraim@flashner.co.il> |
41125eaf JL |
6 | ;;; |
7 | ;;; This file is part of GNU Guix. | |
8 | ;;; | |
9 | ;;; GNU Guix is free software; you can redistribute it and/or modify it | |
10 | ;;; under the terms of the GNU General Public License as published by | |
11 | ;;; the Free Software Foundation; either version 3 of the License, or (at | |
12 | ;;; your option) any later version. | |
13 | ;;; | |
14 | ;;; GNU Guix is distributed in the hope that it will be useful, but | |
15 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of | |
16 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the | |
17 | ;;; GNU General Public License for more details. | |
18 | ;;; | |
19 | ;;; You should have received a copy of the GNU General Public License | |
20 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. | |
21 | ||
22 | (define-module (gnu packages maven) | |
23 | #:use-module ((guix licenses) #:prefix license:) | |
24 | #:use-module (guix packages) | |
25 | #:use-module (guix download) | |
a661af5c | 26 | #:use-module (guix git-download) |
41125eaf JL |
27 | #:use-module (guix utils) |
28 | #:use-module (guix build-system ant) | |
29 | #:use-module (gnu packages) | |
7504f3c3 | 30 | #:use-module (gnu packages base) |
b2185040 | 31 | #:use-module (gnu packages compression) |
9f25cba6 | 32 | #:use-module (gnu packages java) |
ff0496d0 | 33 | #:use-module (gnu packages maven-parent-pom) |
f216a9f9 | 34 | #:use-module (gnu packages web) |
b1cfac7a JL |
35 | #:use-module (gnu packages xml) |
36 | #:use-module (ice-9 match)) | |
9f25cba6 | 37 | |
41125eaf JL |
38 | (define-public maven-resolver-api |
39 | (package | |
40 | (name "maven-resolver-api") | |
0eab9e13 | 41 | (version "1.3.1") |
41125eaf | 42 | (source (origin |
a661af5c TGR |
43 | (method git-fetch) |
44 | (uri (git-reference | |
b0e7b699 | 45 | (url "https://github.com/apache/maven-resolver") |
a661af5c TGR |
46 | (commit (string-append "maven-resolver-" version)))) |
47 | (file-name (git-file-name name version)) | |
41125eaf JL |
48 | (sha256 |
49 | (base32 | |
a661af5c | 50 | "1x1gll8nkfl6zgnab78fxxvvhg42b2grxgdh1wp2h4qxsjkxg93d")))) |
41125eaf JL |
51 | (build-system ant-build-system) |
52 | (arguments | |
53 | `(#:jar-name "maven-resolver-api.jar" | |
54 | #:source-dir "maven-resolver-api/src/main/java" | |
51087d51 JL |
55 | #:test-dir "maven-resolver-api/src/test" |
56 | #:phases | |
57 | (modify-phases %standard-phases | |
58 | (replace 'install | |
59 | (install-from-pom "maven-resolver-api/pom.xml"))))) | |
41125eaf | 60 | (native-inputs |
0eab9e13 JL |
61 | `(("java-asm" ,java-asm) |
62 | ("java-cglib" ,java-cglib) | |
63 | ("java-hamcrest-core" ,java-hamcrest-core) | |
64 | ("java-junit" ,java-junit) | |
65 | ("java-mockito-1" ,java-mockito-1) | |
66 | ("java-objenesis" ,java-objenesis))) | |
51087d51 JL |
67 | (propagated-inputs |
68 | `(("maven-resolver-parent-pom" ,maven-resolver-parent-pom))) | |
41125eaf JL |
69 | (home-page "https://github.com/apache/maven-resolver") |
70 | (synopsis "Maven repository system API") | |
71 | (description "This package contains the API for the maven repository system.") | |
72 | (license license:asl2.0))) | |
d85cb539 | 73 | |
51087d51 JL |
74 | (define maven-resolver-parent-pom |
75 | (package | |
76 | (inherit maven-resolver-api) | |
77 | (name "maven-resolver-parent-pom") | |
78 | (arguments | |
79 | `(#:tests? #f | |
80 | #:phases | |
81 | (modify-phases %standard-phases | |
82 | (delete 'configure) | |
83 | (delete 'build) | |
84 | (add-before 'install 'fix-pom | |
85 | (lambda _ | |
86 | (substitute* "pom.xml" | |
87 | (("<classifier>no_aop</classifier>") "")) | |
88 | #t)) | |
89 | (replace 'install | |
90 | (install-pom-file "pom.xml"))))) | |
91 | (propagated-inputs '()))) | |
92 | ||
d85cb539 JL |
93 | (define-public maven-resolver-spi |
94 | (package | |
95 | (inherit maven-resolver-api) | |
96 | (name "maven-resolver-spi") | |
97 | (arguments | |
98 | `(#:jar-name "maven-resolver-spi.jar" | |
99 | #:source-dir "maven-resolver-spi/src/main/java" | |
100 | #:test-dir "maven-resolver-spi/src/test" | |
51087d51 JL |
101 | #:phases |
102 | (modify-phases %standard-phases | |
103 | (replace 'install | |
104 | (install-from-pom "maven-resolver-spi/pom.xml"))))) | |
105 | (propagated-inputs | |
d85cb539 JL |
106 | `(("maven-resolver-api" ,maven-resolver-api))) |
107 | (synopsis "Maven repository system SPI") | |
108 | (description "This package contains the service provider interface (SPI) | |
109 | for repository system implementations and repository connectors."))) | |
36053783 JL |
110 | |
111 | (define-public maven-resolver-test-util | |
112 | (package | |
113 | (inherit maven-resolver-api) | |
114 | (name "maven-resolver-test-util") | |
115 | (arguments | |
116 | `(#:jar-name "maven-resolver-test-util.jar" | |
117 | #:source-dir "maven-resolver-test-util/src/main/java" | |
118 | #:test-dir "maven-resolver-test-util/src/test" | |
119 | #:jdk ,icedtea-8)) | |
120 | (inputs | |
121 | `(("maven-resolver-api" ,maven-resolver-api) | |
122 | ("maven-resolver-spi" ,maven-resolver-spi))) | |
123 | (synopsis "Utility classes for testing the maven repository system") | |
124 | (description "This package contains a collection of utility classes to | |
125 | ease testing of the repository system."))) | |
bca6cf54 JL |
126 | |
127 | (define-public maven-resolver-util | |
128 | (package | |
129 | (inherit maven-resolver-api) | |
130 | (name "maven-resolver-util") | |
131 | (arguments | |
132 | `(#:jar-name "maven-resolver-util.jar" | |
133 | #:source-dir "maven-resolver-util/src/main/java" | |
134 | #:test-dir "maven-resolver-util/src/test" | |
51087d51 JL |
135 | #:phases |
136 | (modify-phases %standard-phases | |
137 | (replace 'install | |
138 | (install-from-pom "maven-resolver-util/pom.xml"))))) | |
139 | (propagated-inputs | |
bca6cf54 JL |
140 | `(("maven-resolver-api" ,maven-resolver-api))) |
141 | (native-inputs | |
142 | `(("java-junit" ,java-junit) | |
143 | ("java-hamcrest-core" ,java-hamcrest-core) | |
144 | ("maven-resolver-test-util" ,maven-resolver-test-util))) | |
145 | (synopsis "Utility classes for the maven repository system") | |
146 | (description "This package contains a collection of utility classes to | |
147 | ease usage of the repository system."))) | |
f70666c9 JL |
148 | |
149 | (define-public maven-resolver-connector-basic | |
150 | (package | |
151 | (inherit maven-resolver-api) | |
152 | (name "maven-resolver-connector-basic") | |
153 | (arguments | |
154 | `(#:jar-name "maven-resolver-connector-basic.jar" | |
155 | #:source-dir "maven-resolver-connector-basic/src/main/java" | |
156 | #:test-dir "maven-resolver-connector-basic/src/test" | |
157 | #:jdk ,icedtea-8 | |
158 | #:phases | |
159 | (modify-phases %standard-phases | |
160 | (add-before 'build 'generate-sisu | |
161 | (lambda _ | |
162 | (mkdir-p "build/classes/META-INF/sisu") | |
163 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
164 | (lambda _ | |
0eab9e13 | 165 | (display "org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory\n"))) |
51087d51 JL |
166 | #t)) |
167 | (replace 'install | |
168 | (install-from-pom "maven-resolver-connector-basic/pom.xml"))))) | |
169 | (propagated-inputs | |
f70666c9 JL |
170 | `(("maven-resolver-api" ,maven-resolver-api) |
171 | ("maven-resolver-spi" ,maven-resolver-spi) | |
172 | ("maven-resolver-util" ,maven-resolver-util) | |
0eab9e13 | 173 | ("java-slf4j-api" ,java-slf4j-api))) |
f70666c9 | 174 | (native-inputs |
51087d51 JL |
175 | `(("java-javax-inject" ,java-javax-inject) |
176 | ("java-junit" ,java-junit) | |
f70666c9 JL |
177 | ("maven-resolver-test-util" ,maven-resolver-test-util))) |
178 | (synopsis "Maven repository connector implementation") | |
179 | (description "This package contains a repository connector implementation | |
180 | for repositories using URI-based layouts."))) | |
458687d5 | 181 | |
90fe8797 JL |
182 | (define-public maven-resolver-impl |
183 | (package | |
184 | (inherit maven-resolver-api) | |
185 | (name "maven-resolver-impl") | |
186 | (arguments | |
187 | `(#:jar-name "maven-resolver-impl.jar" | |
188 | #:source-dir "maven-resolver-impl/src/main/java" | |
189 | #:test-dir "maven-resolver-impl/src/test" | |
90fe8797 JL |
190 | #:phases |
191 | (modify-phases %standard-phases | |
192 | (add-before 'build 'generate-sisu | |
193 | (lambda _ | |
194 | (mkdir-p "build/classes/META-INF/sisu") | |
195 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
196 | (lambda _ | |
197 | (display | |
198 | (string-append | |
199 | ;; Build this list by looking for files containing "@Named" | |
200 | "org.eclipse.aether.internal.impl.DefaultArtifactResolver\n" | |
0eab9e13 JL |
201 | "org.eclipse.aether.internal.impl.collect.DefaultDependencyCollector\n" |
202 | "org.eclipse.aether.internal.impl.DefaultChecksumPolicyProvider\n" | |
203 | "org.eclipse.aether.internal.impl.DefaultDeployer\n" | |
90fe8797 | 204 | "org.eclipse.aether.internal.impl.DefaultFileProcessor\n" |
0eab9e13 | 205 | "org.eclipse.aether.internal.impl.DefaultInstaller\n" |
90fe8797 | 206 | "org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider\n" |
90fe8797 | 207 | "org.eclipse.aether.internal.impl.DefaultMetadataResolver\n" |
90fe8797 | 208 | "org.eclipse.aether.internal.impl.DefaultOfflineController\n" |
90fe8797 | 209 | "org.eclipse.aether.internal.impl.DefaultRemoteRepositoryManager\n" |
90fe8797 | 210 | "org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider\n" |
0eab9e13 JL |
211 | "org.eclipse.aether.internal.impl.DefaultRepositoryEventDispatcher\n" |
212 | "org.eclipse.aether.internal.impl.DefaultRepositoryLayoutProvider\n" | |
213 | "org.eclipse.aether.internal.impl.DefaultRepositorySystem\n" | |
214 | "org.eclipse.aether.internal.impl.DefaultSyncContextFactory\n" | |
215 | "org.eclipse.aether.internal.impl.DefaultTransporterProvider\n" | |
90fe8797 | 216 | "org.eclipse.aether.internal.impl.DefaultUpdateCheckManager\n" |
0eab9e13 JL |
217 | "org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer\n" |
218 | "org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManagerFactory\n" | |
219 | "org.eclipse.aether.internal.impl.LoggerFactoryProvider\n" | |
220 | "org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory\n" | |
221 | "org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory\n" | |
222 | "org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory")))) | |
51087d51 JL |
223 | #t)) |
224 | (replace 'install | |
225 | (install-from-pom "maven-resolver-impl/pom.xml"))))) | |
226 | (propagated-inputs | |
90fe8797 JL |
227 | `(("maven-resolver-api" ,maven-resolver-api) |
228 | ("maven-resolver-spi" ,maven-resolver-spi) | |
229 | ("maven-resolver-util" ,maven-resolver-util) | |
230 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
231 | ("java-javax-inject" ,java-javax-inject) | |
232 | ("java-guice" ,java-guice) | |
51087d51 JL |
233 | ("java-slf4j-api" ,java-slf4j-api) |
234 | ("maven-resolver-parent-pom" ,maven-resolver-parent-pom))) | |
90fe8797 JL |
235 | (native-inputs |
236 | `(("java-junit" ,java-junit) | |
90fe8797 JL |
237 | ("maven-resolver-test-util" ,maven-resolver-test-util))))) |
238 | ||
19126bba JL |
239 | (define-public maven-resolver-transport-wagon |
240 | (package | |
241 | (inherit maven-resolver-api) | |
242 | (name "maven-resolver-transport-wagon") | |
243 | (arguments | |
244 | `(#:jar-name "maven-resolver-transport-wagon.jar" | |
245 | #:source-dir "maven-resolver-transport-wagon/src/main/java" | |
246 | #:test-dir "maven-resolver-transport-wagon/src/test" | |
247 | #:jdk ,icedtea-8 | |
248 | #:phases | |
249 | (modify-phases %standard-phases | |
250 | (add-before 'build 'generate-sisu | |
251 | (lambda _ | |
252 | (mkdir-p "build/classes/META-INF/sisu") | |
253 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
254 | (lambda _ | |
255 | (display "org.eclipse.aether.transport.wagon.WagonTransporterFactory\n"))) | |
256 | #t)) | |
257 | (add-before 'build 'generate-components.xml | |
258 | (lambda _ | |
259 | (mkdir-p "build/classes/META-INF/plexus") | |
260 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
261 | (lambda _ | |
262 | (display | |
263 | (string-append | |
264 | "<?xml version=\"1.0\" encoding=\"UTF-8\"?> | |
265 | <component-set> | |
266 | <components> | |
267 | <component> | |
268 | <role>org.eclipse.aether.transport.wagon.WagonConfigurator</role> | |
269 | <role-hint>plexus</role-hint> | |
270 | <implementation>org.eclipse.aether.internal.transport.wagon.PlexusWagonConfigurator</implementation> | |
271 | <description /> | |
272 | <isolated-realm>false</isolated-realm> | |
273 | <requirements> | |
274 | <requirement> | |
275 | <role>org.codehaus.plexus.PlexusContainer</role> | |
276 | <role-hint /> | |
277 | <field-name>container</field-name> | |
278 | </requirement> | |
279 | </requirements> | |
280 | </component> | |
281 | <component> | |
282 | <role>org.eclipse.aether.transport.wagon.WagonProvider</role> | |
283 | <role-hint>plexus</role-hint> | |
284 | <implementation>org.eclipse.aether.internal.transport.wagon.PlexusWagonProvider</implementation> | |
285 | <description /> | |
286 | <isolated-realm>false</isolated-realm> | |
287 | <requirements> | |
288 | <requirement> | |
289 | <role>org.codehaus.plexus.PlexusContainer</role> | |
290 | <role-hint /> | |
291 | <field-name>container</field-name> | |
292 | </requirement> | |
293 | </requirements> | |
294 | </component> | |
295 | </components> | |
296 | </component-set>\n")))) | |
297 | #t))))) | |
298 | (inputs | |
299 | `(("maven-resolver-api" ,maven-resolver-api) | |
300 | ("maven-resolver-spi" ,maven-resolver-spi) | |
301 | ("maven-resolver-util" ,maven-resolver-util) | |
302 | ("java-javax-inject" ,java-javax-inject) | |
303 | ("mavne-wagon-provider-api" ,maven-wagon-provider-api) | |
304 | ("java-plexus-component-annotation" ,java-plexus-component-annotations) | |
305 | ("java-plexus-classworld" ,java-plexus-classworlds) | |
306 | ("java-plexus-plexus-util" ,java-plexus-utils) | |
0eab9e13 | 307 | ("java-slf4j-api" ,java-slf4j-api) |
19126bba JL |
308 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
309 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus))) | |
310 | (native-inputs | |
311 | `(("java-junit" ,java-junit) | |
312 | ("java-hamcrest-core" ,java-hamcrest-core) | |
313 | ("maven-resolver-test-util" ,maven-resolver-test-util) | |
314 | ("java-guava" ,java-guava) | |
315 | ("java-cglib" ,java-cglib) | |
316 | ("java-asm" ,java-asm) | |
317 | ("java-aopalliance" ,java-aopalliance) | |
318 | ("java-guice" ,java-guice))) | |
319 | (synopsis "Transport implementation for Maven") | |
320 | (description "This package contains a transport implementation based on | |
321 | Maven Wagon, for use in Maven."))) | |
322 | ||
a18f0a7f JL |
323 | ;; aether is the parent project that was forked into maven-resolver. It used |
324 | ;; to be used with older versions of Maven, and is still required for some | |
325 | ;; plugins and their dependencies. This version is required for the plugins, | |
326 | ;; even though there are newer versions of this project. | |
327 | (define-public java-sonatype-aether-api | |
328 | (package | |
329 | (name "java-sonatype-aether-api") | |
330 | (version "1.7") | |
331 | (source (origin | |
332 | (method git-fetch) | |
333 | (uri (git-reference | |
334 | (url "https://github.com/sonatype/sonatype-aether") | |
335 | (commit (string-append "aether-" version)))) | |
336 | (file-name (git-file-name name version)) | |
337 | (sha256 | |
338 | (base32 | |
339 | "1wn9fv91n40bvlwbzy0dmh0xqibxl2mpzpnbibhqss3c0zlr1ccq")))) | |
340 | (build-system ant-build-system) | |
341 | (arguments | |
342 | `(#:jar-name "aether-api.jar" | |
343 | #:source-dir "aether-api/src/main/java" | |
344 | #:test-dir "aether-api/src/test" | |
345 | #:phases | |
346 | (modify-phases %standard-phases | |
347 | (add-before 'install 'install-parent (install-pom-file "pom.xml")) | |
348 | (replace 'install (install-from-pom "aether-api/pom.xml"))))) | |
349 | (propagated-inputs | |
350 | `(("java-sonatype-forge-parent-pom" ,java-sonatype-forge-parent-pom-6))) | |
351 | (native-inputs `(("java-junit" ,java-junit))) | |
352 | (home-page "https://github.com/sonatype/sonatype-aether") | |
353 | (synopsis "Maven repository system API") | |
354 | (description "This package contains the API for the maven repository system.") | |
355 | (license license:asl2.0))) | |
356 | ||
c68e3dc1 JL |
357 | (define-public java-sonatype-aether-spi |
358 | (package | |
359 | (inherit java-sonatype-aether-api) | |
360 | (name "java-sonatype-aether-spi") | |
361 | (arguments | |
362 | `(#:jar-name "aether-spi.jar" | |
363 | #:source-dir "aether-spi/src/main/java" | |
364 | #:tests? #f; no tests | |
365 | #:phases | |
366 | (modify-phases %standard-phases | |
367 | (replace 'install (install-from-pom "aether-spi/pom.xml"))))) | |
368 | (propagated-inputs | |
369 | `(("java-sonatype-aether-api" ,java-sonatype-aether-api))) | |
370 | (synopsis "Maven repository system SPI") | |
371 | (description "This package contains the service provider interface (SPI) | |
372 | for repository system implementations and repository connectors."))) | |
373 | ||
a1ed7936 JL |
374 | (define-public java-sonatype-aether-test-util |
375 | (package | |
376 | (inherit java-sonatype-aether-api) | |
377 | (name "java-sonatype-aether-test-util") | |
378 | (arguments | |
379 | `(#:jar-name "java-sonatype-aether-test-util.jar" | |
380 | #:source-dir "aether-test-util/src/main/java" | |
381 | #:test-dir "aether-test-util/src/test")) | |
382 | (inputs | |
383 | `(("java-sonatype-aether-api" ,java-sonatype-aether-api) | |
384 | ("java-sonatype-aether-spi" ,java-sonatype-aether-spi))) | |
385 | (synopsis "Utility classes for testing the maven repository system") | |
386 | (description "This package contains a collection of utility classes to | |
387 | ease testing of the repository system."))) | |
388 | ||
8815719c JL |
389 | (define-public java-sonatype-aether-util |
390 | (package | |
391 | (inherit java-sonatype-aether-api) | |
392 | (name "java-sonatype-aether-util") | |
393 | (arguments | |
394 | `(#:jar-name "aether-util.jar" | |
395 | #:source-dir "aether-util/src/main/java" | |
396 | #:test-dir "aether-util/src/test" | |
397 | #:phases | |
398 | (modify-phases %standard-phases | |
399 | (replace 'install (install-from-pom "aether-util/pom.xml"))))) | |
400 | (propagated-inputs | |
401 | `(("java-sonatype-aether-api" ,java-sonatype-aether-api))) | |
402 | (native-inputs | |
403 | `(("java-junit" ,java-junit) | |
404 | ("java-sonatype-aether-test-util" ,java-sonatype-aether-test-util))) | |
405 | (synopsis "Utility classes for the maven repository system") | |
406 | (description "This package contains a collection of utility classes to | |
407 | ease usage of the repository system."))) | |
408 | ||
540f3628 JL |
409 | (define-public java-sonatype-aether-impl |
410 | (package | |
411 | (inherit java-sonatype-aether-api) | |
412 | (name "java-sonatype-aether-impl") | |
413 | (arguments | |
414 | `(#:jar-name "aether-impl.jar" | |
415 | #:source-dir "aether-impl/src/main/java" | |
416 | #:test-dir "aether-impl/src/test" | |
417 | #:phases | |
418 | (modify-phases %standard-phases | |
419 | (add-before 'install 'fix-pom | |
420 | (lambda _ | |
421 | (substitute* "aether-impl/pom.xml" | |
422 | (("org.sonatype.sisu") "org.codehaus.plexus") | |
423 | (("sisu-inject-plexus") "plexus-container-default")) | |
424 | #t)) | |
425 | (add-after 'build 'generate-metadata | |
426 | (lambda _ | |
427 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
428 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
429 | "--source" "src/main/java" | |
430 | "--output" "build/classes/META-INF/plexus/components.xml" | |
431 | "--classes" "build/classes" | |
432 | "--descriptors" "build/classes/META-INF") | |
433 | #t)) | |
434 | (add-after 'generate-metadata 'rebuild | |
435 | (lambda _ | |
436 | (invoke "ant" "jar") | |
437 | #t)) | |
438 | (replace 'install (install-from-pom "aether-impl/pom.xml"))))) | |
439 | (propagated-inputs | |
440 | `(("java-sonatype-aether-api" ,java-sonatype-aether-api) | |
441 | ("java-sonatype-aether-spi" ,java-sonatype-aether-spi) | |
442 | ("java-sonatype-aether-util" ,java-sonatype-aether-util) | |
443 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
444 | ("java-plexus-container-default" ,java-plexus-container-default) | |
445 | ("java-slf4j-api" ,java-slf4j-api))) | |
446 | (native-inputs | |
447 | `(("java-junit" ,java-junit) | |
448 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) | |
449 | ("java-sonatype-aether-test-util" ,java-sonatype-aether-test-util))))) | |
450 | ||
9a7d55ee JL |
451 | ;; Again, this old version is required by some maven plugins |
452 | (define-public java-eclipse-aether-api | |
453 | (package | |
454 | (name "java-eclipse-aether-api") | |
455 | (version "1.0.2") | |
456 | (source (origin | |
457 | (method git-fetch) | |
458 | (uri (git-reference | |
459 | (url "https://github.com/eclipse/aether-core") | |
460 | (commit "aether-1.0.2.v20150114"))) | |
461 | (file-name (git-file-name name version)) | |
462 | (sha256 | |
463 | (base32 | |
464 | "14d336nn0kh5ddf23j37va3hd8gaai19llrpxhf4bcc7g7sgdqxs")))) | |
465 | (build-system ant-build-system) | |
466 | (arguments | |
467 | `(#:jar-name "aether-api.jar" | |
468 | #:source-dir "aether-api/src/main/java" | |
469 | #:test-dir "aether-api/src/test" | |
470 | #:phases | |
471 | (modify-phases %standard-phases | |
472 | (add-before 'install 'install-parent (install-pom-file "pom.xml")) | |
473 | (replace 'install (install-from-pom "aether-api/pom.xml"))))) | |
474 | (native-inputs `(("java-junit" ,java-junit))) | |
475 | (home-page "https://github.com/sonatype/sonatype-aether") | |
476 | (synopsis "Maven repository system API") | |
477 | (description "This package contains the API for the maven repository system.") | |
478 | (license license:asl2.0))) | |
479 | ||
5d1a24dd JL |
480 | (define-public java-eclipse-aether-spi |
481 | (package | |
482 | (inherit java-eclipse-aether-api) | |
483 | (name "java-eclipse-aether-spi") | |
484 | (arguments | |
485 | `(#:jar-name "aether-spi.jar" | |
486 | #:source-dir "aether-spi/src/main/java" | |
487 | #:test-dir "aether-spi/src/test" | |
488 | #:phases | |
489 | (modify-phases %standard-phases | |
490 | (replace 'install (install-from-pom "aether-spi/pom.xml"))))) | |
491 | (propagated-inputs | |
492 | `(("java-eclipse-aether-api" ,java-eclipse-aether-api))) | |
493 | (synopsis "Maven repository system SPI") | |
494 | (description "This package contains the service provider interface (SPI) | |
495 | for repository system implementations and repository connectors."))) | |
496 | ||
7a85b602 JL |
497 | (define-public java-eclipse-aether-test-util |
498 | (package | |
499 | (inherit java-eclipse-aether-api) | |
500 | (name "java-eclipse-aether-test-util") | |
501 | (arguments | |
502 | `(#:jar-name "aether-test-util.jar" | |
503 | #:source-dir "aether-test-util/src/main/java" | |
504 | #:test-dir "aether-test-util/src/test" | |
505 | #:phases | |
506 | (modify-phases %standard-phases | |
507 | (replace 'install (install-from-pom "aether-util/pom.xml"))))) | |
508 | (propagated-inputs | |
509 | `(("java-eclipse-aether-api" ,java-eclipse-aether-api) | |
510 | ("java-eclipse-aether-spi" ,java-eclipse-aether-spi))) | |
511 | (synopsis "Utility classes for testing the maven repository system") | |
512 | (description "This package contains a collection of utility classes to | |
513 | ease testing of the repository system."))) | |
514 | ||
47b4ed50 JL |
515 | (define-public java-eclipse-aether-util |
516 | (package | |
517 | (inherit java-eclipse-aether-api) | |
518 | (name "java-eclipse-aether-util") | |
519 | (arguments | |
520 | `(#:jar-name "aether-util.jar" | |
521 | #:source-dir "aether-util/src/main/java" | |
522 | #:test-dir "aether-util/src/test" | |
523 | #:phases | |
524 | (modify-phases %standard-phases | |
525 | (replace 'install (install-from-pom "aether-util/pom.xml"))))) | |
526 | (propagated-inputs | |
527 | `(("java-eclipse-aether-api" ,java-eclipse-aether-api))) | |
528 | (native-inputs | |
529 | `(("java-eclipse-aether-test-util" ,java-eclipse-aether-test-util) | |
530 | ("java-junit" ,java-junit))) | |
531 | (synopsis "Utility classes for the maven repository system") | |
532 | (description "This package contains a collection of utility classes to | |
533 | ease usage of the repository system."))) | |
534 | ||
b277bd37 JL |
535 | (define-public java-eclipse-aether-impl |
536 | (package | |
537 | (inherit java-eclipse-aether-api) | |
538 | (name "java-eclipse-aether-impl") | |
539 | (arguments | |
540 | `(#:jar-name "aether-impl.jar" | |
541 | #:source-dir "aether-impl/src/main/java" | |
542 | #:test-dir "aether-impl/src/test" | |
543 | #:phases | |
544 | (modify-phases %standard-phases | |
545 | (replace 'install (install-from-pom "aether-impl/pom.xml"))))) | |
546 | (propagated-inputs | |
547 | `(("java-eclipse-aether-api" ,java-eclipse-aether-api) | |
548 | ("java-eclipse-aether-spi" ,java-eclipse-aether-spi) | |
549 | ("java-eclipse-aether-util" ,java-eclipse-aether-util) | |
550 | ("java-javax-inject" ,java-javax-inject) | |
551 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
552 | ("java-guice" ,java-guice) | |
553 | ("java-slf4j-api" ,java-slf4j-api))) | |
554 | (native-inputs | |
555 | `(("java-eclipse-aether-test-util" ,java-eclipse-aether-test-util) | |
556 | ("java-junit" ,java-junit))))) | |
557 | ||
b2185040 JL |
558 | (define-public maven-shared-utils |
559 | (package | |
560 | (name "maven-shared-utils") | |
561 | (version "3.2.1") | |
562 | (source (origin | |
563 | (method url-fetch) | |
9a01efa2 | 564 | (uri (string-append "mirror://apache/maven/shared/" |
b2185040 JL |
565 | "maven-shared-utils-" version "-source-release.zip")) |
566 | (sha256 | |
567 | (base32 | |
568 | "1kzmj68wwdcznb36hm6kfz57wbavw7g1rp236pz10znkjljn6rf6")))) | |
569 | (build-system ant-build-system) | |
570 | (arguments | |
571 | `(#:jar-name "maven-shared-utils.jar" | |
572 | #:source-dir "src/main/java" | |
b2185040 JL |
573 | #:phases |
574 | (modify-phases %standard-phases | |
159e6d9f JL |
575 | (add-before 'build 'fix-/bin/sh-invocation |
576 | (lambda _ | |
577 | (substitute* (find-files "src" ".*.java$") | |
578 | (("/bin/sh") (which "sh"))) | |
579 | #t)) | |
b2185040 JL |
580 | (add-before 'check 'remove-cyclic-dep |
581 | (lambda _ | |
582 | (delete-file | |
583 | "src/test/java/org/apache/maven/shared/utils/introspection/ReflectionValueExtractorTest.java") | |
51087d51 JL |
584 | #t)) |
585 | (replace 'install | |
586 | (install-from-pom "pom.xml"))))) | |
587 | (propagated-inputs | |
b2185040 JL |
588 | `(("java-jansi" ,java-jansi) |
589 | ("java-commons-io" ,java-commons-io) | |
590 | ("java-jsr305" ,java-jsr305) | |
51087d51 JL |
591 | ("java-plexus-container-default" ,java-plexus-container-default) |
592 | ("maven-parent-pom-30" ,maven-parent-pom-30))) | |
b2185040 JL |
593 | (native-inputs |
594 | `(("unzip" ,unzip) | |
595 | ("java-junit" ,java-junit) | |
596 | ("java-hamcrest-core" ,java-hamcrest-core) | |
597 | ("java-commons-lang3" ,java-commons-lang3))) | |
598 | (home-page "https://maven.apache.org/shared/maven-shared-utils/") | |
599 | (synopsis "Plexus-util replacement for maven") | |
600 | (description "This project aims to be a functional replacement for | |
601 | plexus-utils in Maven. It is not a 100% API compatible replacement but a | |
602 | replacement with improvements.") | |
603 | (license license:asl2.0))) | |
604 | ||
a59d5f35 JL |
605 | (define-public maven-plugin-annotations |
606 | (package | |
607 | (name "maven-plugin-annotations") | |
608 | (version "3.5") | |
609 | (source (origin | |
610 | (method url-fetch) | |
9a01efa2 | 611 | (uri (string-append "mirror://apache/maven/" |
a59d5f35 JL |
612 | "plugin-tools/maven-plugin-tools-" version |
613 | "-source-release.zip")) | |
614 | (sha256 (base32 "1ryqhs62j5pas93brhf5dsnvp99hxbvssf681yj5rk3r9h24hqm2")))) | |
615 | (build-system ant-build-system) | |
616 | (arguments | |
617 | `(#:jar-name "maven-plugin-annotations.jar" | |
618 | #:source-dir "maven-plugin-annotations/src/main/java" | |
f7385760 JL |
619 | #:tests? #f |
620 | #:phases | |
621 | (modify-phases %standard-phases | |
622 | (replace 'install | |
623 | (install-from-pom "maven-plugin-annotations/pom.xml"))))) | |
624 | (propagated-inputs | |
625 | `(("maven-artifact" ,maven-artifact) | |
626 | ("maven-plugin-tools-parent-pom" ,maven-plugin-tools-parent-pom))) | |
a59d5f35 JL |
627 | (native-inputs |
628 | `(("unzip" ,unzip))) | |
629 | (home-page "https://maven.apache.org/plugin-tools/maven-plugin-annotations/") | |
630 | (synopsis "Java 5 annotations to use in Mojos") | |
631 | (description "This package contains Java 5 annotations for use in Mojos.") | |
632 | (license license:asl2.0))) | |
633 | ||
f7385760 JL |
634 | (define maven-plugin-tools-parent-pom |
635 | (package | |
636 | (inherit maven-plugin-annotations) | |
637 | (name "maven-plugin-tools-parent-pom") | |
638 | (arguments | |
639 | `(#:tests? #f | |
640 | #:phases | |
641 | (modify-phases %standard-phases | |
642 | (delete 'configure) | |
643 | (delete 'build) | |
644 | (replace 'install | |
645 | (install-pom-file "pom.xml"))))) | |
646 | (propagated-inputs '()))) | |
647 | ||
ff7a0fcf JL |
648 | (define-public maven-wagon-provider-api |
649 | (package | |
650 | (name "maven-wagon-provider-api") | |
ff0496d0 | 651 | (version "3.3.4") |
ff7a0fcf JL |
652 | (source (origin |
653 | (method url-fetch) | |
51087d51 | 654 | (uri (string-append "https://archive.apache.org/dist/maven/wagon/" |
ff7a0fcf | 655 | "wagon-" version "-source-release.zip")) |
ff0496d0 JL |
656 | (sha256 |
657 | (base32 | |
658 | "1iq9bilgfklzbxwwhzi3f19mkbaaf9dh9f83h3yz5gbmvypask9a")))) | |
ff7a0fcf JL |
659 | (build-system ant-build-system) |
660 | (arguments | |
661 | `(#:jar-name "maven-wagon-provider-api.jar" | |
662 | #:source-dir "wagon-provider-api/src/main/java" | |
ff0496d0 JL |
663 | #:test-dir "wagon-provider-api/src/test" |
664 | #:phases | |
665 | (modify-phases %standard-phases | |
666 | (replace 'install | |
667 | (install-from-pom "wagon-provider-api/pom.xml"))))) | |
668 | (propagated-inputs | |
669 | `(("java-plexus-utils" ,java-plexus-utils) | |
670 | ("maven-wagon-parent-pom" ,maven-wagon-parent-pom))) | |
ff7a0fcf JL |
671 | (native-inputs |
672 | `(("unzip" ,unzip) | |
673 | ("java-junit" ,java-junit) | |
674 | ("java-easymock" ,java-easymock))) | |
675 | (home-page "https://maven.apache.org/wagon") | |
676 | (synopsis "Transport abstraction for Maven") | |
677 | (description "Maven Wagon is a transport abstraction that is used in Maven's | |
678 | artifact and repository handling code.") | |
679 | (license license:asl2.0))) | |
680 | ||
ff0496d0 JL |
681 | (define maven-wagon-parent-pom |
682 | (package | |
683 | (inherit maven-wagon-provider-api) | |
684 | (arguments | |
685 | `(#:tests? #f | |
686 | #:phases | |
687 | (modify-phases %standard-phases | |
688 | (delete 'configure) | |
689 | (delete 'build) | |
690 | (replace 'install | |
691 | (install-pom-file "pom.xml"))))) | |
692 | (propagated-inputs | |
693 | `(("maven-parent-pom-33" ,maven-parent-pom-33))) | |
694 | (native-inputs | |
695 | `(("unzip" ,unzip))))) | |
696 | ||
f216a9f9 JL |
697 | (define-public maven-wagon-provider-test |
698 | (package | |
699 | (inherit maven-wagon-provider-api) | |
700 | (name "maven-wagon-provider-test") | |
701 | (arguments | |
702 | `(#:jar-name "maven-wagon-provider-test.jar" | |
703 | #:source-dir "wagon-provider-test/src/main/java" | |
704 | #:tests? #f; no tests | |
705 | #:jdk ,icedtea-8)) | |
706 | (inputs | |
707 | `(("java-plexus-utils" ,java-plexus-utils) | |
708 | ("java-plexus-container-default" ,java-plexus-container-default) | |
ff0496d0 | 709 | ("java-eclipse-jetty-http-9.2" ,java-eclipse-jetty-http-9.2) |
f216a9f9 JL |
710 | ("java-eclipse-jetty-util-9.2" ,java-eclipse-jetty-util-9.2) |
711 | ("java-eclipse-jetty-security-9.2" ,java-eclipse-jetty-security-9.2) | |
712 | ("java-eclipse-jetty-server-9.2" ,java-eclipse-jetty-server-9.2) | |
713 | ("java-eclipse-jetty-servlet-9.2" ,java-eclipse-jetty-servlet-9.2) | |
714 | ("java-slf4j-api" ,java-slf4j-api) | |
4b472f6a | 715 | ("java-javaee-servletapi" ,java-javaee-servletapi) |
f216a9f9 JL |
716 | ("maven-wagon-provider-api" ,maven-wagon-provider-api))) |
717 | (synopsis "Test classes from maven-wagon") | |
718 | (description "Maven Wagon is a transport abstraction that is used in Maven's | |
719 | artifact and repository handling code. This package contains common test | |
720 | classes used in multiple maven-wagon components."))) | |
721 | ||
0d1b3b39 JL |
722 | (define-public maven-wagon-file |
723 | (package | |
724 | (inherit maven-wagon-provider-api) | |
725 | (name "maven-wagon-file") | |
726 | (arguments | |
727 | `(#:jar-name "maven-wagon-file.jar" | |
728 | #:source-dir "wagon-providers/wagon-file/src/main/java" | |
729 | #:test-dir "wagon-providers/wagon-file/src/test" | |
730 | #:jdk ,icedtea-8 | |
731 | #:phases | |
732 | (modify-phases %standard-phases | |
733 | (add-before 'check 'fix-paths | |
734 | (lambda _ | |
735 | ;; Tests assume they are run by maven, which copies test resources | |
736 | ;; to target. Our ant-build-system does the same, but with the | |
737 | ;; build directory. | |
738 | (substitute* "wagon-providers/wagon-file/src/test/java/org/apache/maven/wagon/providers/file/FileWagonTest.java" | |
739 | (("target") "build")) | |
740 | #t)) | |
741 | (add-after 'build 'generate-metadata | |
742 | (lambda _ | |
743 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
744 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
745 | "--source" "wagon-providers/wagon-file/src/main/java" | |
746 | "--output" "build/classes/META-INF/plexus/components.xml" | |
747 | "--classes" "build/classes" | |
748 | "--descriptors" "build/classes/META-INF") | |
749 | #t)) | |
750 | (add-after 'generate-metadata 'rebuild | |
751 | (lambda _ | |
752 | (invoke "ant" "jar") | |
753 | #t))))) | |
754 | (inputs | |
755 | `(("java-plexus-utils" ,java-plexus-utils) | |
756 | ("maven-wagon-provider-api" ,maven-wagon-provider-api))) | |
757 | (native-inputs | |
758 | `(("maven-wagon-provider-test" ,maven-wagon-provider-test) | |
759 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) | |
760 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
761 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
762 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
763 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
764 | ("java-guava" ,java-guava) | |
765 | ("java-guice" ,java-guice) | |
766 | ("java-javax-inject" ,java-javax-inject) | |
767 | ("java-cglib" ,java-cglib) | |
768 | ("java-slf4j-api" ,java-slf4j-api) | |
769 | ("java-plexus-utils" ,java-plexus-utils) | |
770 | ("java-plexus-cli" ,java-plexus-cli) | |
771 | ("maven-plugin-api" ,maven-plugin-api) | |
772 | ("maven-plugin-annotations" ,maven-plugin-annotations) | |
773 | ("maven-core" ,maven-core) | |
774 | ("maven-model" ,maven-model) | |
775 | ("java-commons-cli" ,java-commons-cli) | |
776 | ("java-qdox" ,java-qdox) | |
777 | ("java-jdom2" ,java-jdom2) | |
778 | ("java-asm" ,java-asm) | |
779 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
780 | ,@(package-native-inputs maven-wagon-provider-api))) | |
781 | (synopsis "Wagon provider that gets and puts artifacts using the file system") | |
782 | (description "Maven Wagon is a transport abstraction that is used in Maven's | |
783 | artifact and repository handling code. It uses providers, that are tools to | |
784 | manage artifacts and deployment. This package contains the file provider which | |
785 | gets and puts artifacts using the file system."))) | |
786 | ||
53360e48 JL |
787 | (define-public maven-wagon-tck-http |
788 | (package | |
789 | (inherit maven-wagon-provider-api) | |
790 | (name "maven-wagon-tck-http") | |
791 | (arguments | |
792 | `(#:jar-name "maven-wagon-tck-http.jar" | |
793 | #:source-dir "wagon-tcks/wagon-tck-http/src/main/java" | |
794 | #:tests? #f; no tests | |
795 | #:jdk ,icedtea-8)) | |
796 | (inputs | |
797 | `(("java-plexus-util" ,java-plexus-utils) | |
798 | ("maven-wagon-provider-api" ,maven-wagon-provider-api) | |
53ba191b | 799 | ("java-javaee-servletapi" ,java-javaee-servletapi) |
53360e48 JL |
800 | ("java-slf4j-api" ,java-slf4j-api) |
801 | ("java-commons-codec" ,java-commons-codec) | |
802 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
803 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
804 | ("java-eclipse-jetty-util-9.2" ,java-eclipse-jetty-util-9.2) | |
805 | ("java-eclipse-jetty-webapp-9.2" ,java-eclipse-jetty-webapp-9.2) | |
806 | ("java-eclipse-jetty-security-9.2" ,java-eclipse-jetty-security-9.2) | |
807 | ("java-eclipse-jetty-server-9.2" ,java-eclipse-jetty-server-9.2) | |
808 | ("java-eclipse-jetty-servlet-9.2" ,java-eclipse-jetty-servlet-9.2))) | |
809 | (synopsis "Wagon HTTP Test Compatibility Kit") | |
810 | (description "Maven Wagon is a transport abstraction that is used in Maven's | |
811 | artifact and repository handling code. This package contains the HTTP | |
812 | Test Compatibility Kit."))) | |
813 | ||
c3f5ec6e JL |
814 | (define-public maven-wagon-http-shared |
815 | (package | |
816 | (inherit maven-wagon-provider-api) | |
817 | (name "maven-wagon-http-shared") | |
818 | (arguments | |
819 | `(#:jar-name "maven-wagon-http-shared.jar" | |
820 | #:source-dir "wagon-providers/wagon-http-shared/src/main/java" | |
821 | #:test-dir "wagon-providers/wagon-http-shared/src/test" | |
822 | #:jdk ,icedtea-8 | |
823 | #:phases | |
824 | (modify-phases %standard-phases | |
825 | (add-after 'build 'generate-metadata | |
826 | (lambda _ | |
827 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
828 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
829 | "--source" "wagon-providers/wagon-http-shared/src/main/java" | |
830 | "--output" "build/classes/META-INF/plexus/components.xml" | |
831 | "--classes" "build/classes" | |
832 | "--descriptors" "build/classes/META-INF") | |
833 | #t)) | |
834 | (add-after 'generate-metadata 'rebuild | |
835 | (lambda _ | |
836 | (invoke "ant" "jar") | |
837 | #t))))) | |
838 | (inputs | |
839 | `(("java-plexus-utils" ,java-plexus-utils) | |
840 | ("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) | |
841 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
842 | ("java-commons-io" ,java-commons-io) | |
843 | ("java-jsoup" ,java-jsoup) | |
844 | ("maven-wagon-provider-api" ,maven-wagon-provider-api))) | |
845 | (native-inputs | |
846 | `(("maven-wagon-provider-test" ,maven-wagon-provider-test) | |
847 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) | |
848 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
849 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
850 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
851 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
852 | ("java-guava" ,java-guava) | |
853 | ("java-guice" ,java-guice) | |
854 | ("java-javax-inject" ,java-javax-inject) | |
855 | ("java-cglib" ,java-cglib) | |
856 | ("java-slf4j-api" ,java-slf4j-api) | |
857 | ("java-plexus-utils" ,java-plexus-utils) | |
858 | ("java-plexus-cli" ,java-plexus-cli) | |
859 | ("maven-plugin-api" ,maven-plugin-api) | |
860 | ("maven-plugin-annotations" ,maven-plugin-annotations) | |
861 | ("maven-core" ,maven-core) | |
862 | ("maven-model" ,maven-model) | |
863 | ("java-commons-cli" ,java-commons-cli) | |
864 | ("java-qdox" ,java-qdox) | |
865 | ("java-jdom2" ,java-jdom2) | |
866 | ("java-asm" ,java-asm) | |
867 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
868 | ,@(package-native-inputs maven-wagon-provider-api))) | |
869 | (synopsis "Shared Library for wagon providers supporting HTTP.") | |
870 | (description "Maven Wagon is a transport abstraction that is used in Maven's | |
871 | artifact and repository handling code. It uses providers, that are tools to | |
872 | manage artifacts and deployment. This package contains a shared library for | |
873 | wagon providers supporting HTTP."))) | |
874 | ||
aa06dd0f JL |
875 | (define-public maven-wagon-http |
876 | (package | |
877 | (inherit maven-wagon-provider-api) | |
878 | (name "maven-wagon-http") | |
879 | (arguments | |
880 | `(#:jar-name "maven-wagon-http.jar" | |
881 | #:source-dir "wagon-providers/wagon-http/src/main/java" | |
882 | #:test-dir "wagon-providers/wagon-http/src/test" | |
883 | #:test-exclude (list | |
884 | "**/Abstract*.java" | |
885 | ;; FIXME: javax.net.ssl.SSLHandshakeException: | |
886 | ;; sun.security.validator.ValidatorException: | |
887 | ;; PKIX path building failed: | |
888 | ;; sun.security.provider.certpath.SunCertPathBuilderException: | |
889 | ;; unable to find valid certification path to requested target | |
890 | "**/HttpsWagonPreemptiveTest.java" | |
891 | "**/HttpsWagonTest.java" | |
1962c6b2 MR |
892 | ;; Timeout |
893 | "**/HugeFileDownloadTest.java" | |
aa06dd0f JL |
894 | ;; Injection errors |
895 | "**/TckTest.java") | |
896 | #:jdk ,icedtea-8 | |
897 | #:phases | |
898 | (modify-phases %standard-phases | |
899 | (add-before 'build 'copy-resources | |
900 | (lambda _ | |
901 | (install-file "wagon-providers/wagon-http/src/main/resources/META-INF/plexus/components.xml" | |
902 | "build/classes/META-INF/plexus") | |
903 | #t)) | |
904 | (add-before 'check 'fix-resource-path | |
905 | (lambda _ | |
906 | (substitute* '("wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpsWagonPreemptiveTest.java" | |
907 | "wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpsWagonTest.java") | |
908 | (("src/test") "wagon-providers/wagon-http/src/test")) | |
909 | #t))))) | |
910 | (inputs | |
911 | `(("java-plexus-utils" ,java-plexus-utils) | |
912 | ("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) | |
913 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
914 | ("maven-wagon-http-shared" ,maven-wagon-http-shared) | |
915 | ("maven-wagon-tck-http" ,maven-wagon-tck-http) | |
916 | ("maven-wagon-provider-api" ,maven-wagon-provider-api))) | |
917 | (native-inputs | |
918 | `(("maven-wagon-provider-test" ,maven-wagon-provider-test) | |
919 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) | |
920 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
921 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
922 | ("java-plexus-container-default" ,java-plexus-container-default) | |
923 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
924 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
925 | ("java-guava" ,java-guava) | |
926 | ("java-guice" ,java-guice) | |
927 | ("java-inject" ,java-javax-inject) | |
928 | ("java-cglib" ,java-cglib) | |
929 | ("java-slf4j-api" ,java-slf4j-api) | |
930 | ("java-plexus-utils" ,java-plexus-utils) | |
931 | ("java-plexus-cli" ,java-plexus-cli) | |
932 | ("maven-plugin-api" ,maven-plugin-api) | |
933 | ("maven-plugin-annotations" ,maven-plugin-annotations) | |
934 | ("maven-core" ,maven-core) | |
935 | ("maven-model" ,maven-model) | |
936 | ("java-commons-cli" ,java-commons-cli) | |
937 | ("java-qdox" ,java-qdox) | |
938 | ("java-jdom2" ,java-jdom2) | |
939 | ("java-asm" ,java-asm) | |
940 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
53ba191b | 941 | ("java-javaee-servletapi" ,java-javaee-servletapi) |
aa06dd0f JL |
942 | ("java-eclipse-jetty-util-9.2" ,java-eclipse-jetty-util-9.2) |
943 | ("java-eclipse-jetty-io-9.2" ,java-eclipse-jetty-io-9.2) | |
944 | ("java-eclipse-jetty-http-9.2" ,java-eclipse-jetty-http-9.2) | |
945 | ("java-eclipse-jetty-server-9.2" ,java-eclipse-jetty-server-9.2) | |
946 | ("java-eclipse-jetty-servlet-9.2" ,java-eclipse-jetty-servlet-9.2) | |
947 | ("java-eclipse-jetty-security-9.2" ,java-eclipse-jetty-security-9.2) | |
948 | ("java-hamcrest-core" ,java-hamcrest-core) | |
949 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
950 | ("java-commons-codec" ,java-commons-codec) | |
951 | ("java-commons-io" ,java-commons-io) | |
952 | ("java-jsoup" ,java-jsoup) | |
953 | ("java-slf4j-simple" ,java-slf4j-simple) | |
954 | ,@(package-native-inputs maven-wagon-provider-api))) | |
955 | (synopsis "Wagon provider that gets and puts artifacts through HTTP(S)") | |
956 | (description "Maven Wagon is a transport abstraction that is used in Maven's | |
957 | artifact and repository handling code. It uses providers, that are tools to | |
958 | manage artifacts and deployment. This package contains a Wagon provider that | |
959 | gets and puts artifacts through HTTP(S) using Apache HttpClient-4.x."))) | |
960 | ||
51087d51 | 961 | (define maven-pom |
458687d5 | 962 | (package |
51087d51 | 963 | (name "maven-pom") |
b77c8ddb | 964 | (version "3.6.1") |
458687d5 JL |
965 | (source (origin |
966 | (method url-fetch) | |
9a01efa2 | 967 | (uri (string-append "mirror://apache/maven/" |
458687d5 JL |
968 | "maven-3/" version "/source/" |
969 | "apache-maven-" version "-src.tar.gz")) | |
b77c8ddb | 970 | (sha256 (base32 "0grw9zp166ci53rd7qkyy2qmwmik37xhiz1z84jpm0msyvzj2n82")) |
458687d5 JL |
971 | (modules '((guix build utils))) |
972 | (snippet | |
973 | '(begin | |
974 | (for-each delete-file (find-files "." "\\.jar$")) | |
975 | #t)) | |
976 | (patches | |
977 | (search-patches "maven-generate-component-xml.patch" | |
978 | "maven-generate-javax-inject-named.patch")))) | |
979 | (build-system ant-build-system) | |
51087d51 JL |
980 | (arguments |
981 | `(#:tests? #f | |
982 | #:phases | |
983 | (modify-phases %standard-phases | |
984 | (delete 'configure) | |
985 | (delete 'build) | |
986 | (add-before 'install 'fix-dependencies | |
987 | (lambda _ | |
988 | (substitute* "pom.xml" | |
989 | (("classWorldsVersion>.*") | |
990 | (string-append | |
991 | "classWorldsVersion>" | |
992 | ,(package-version java-plexus-classworlds) | |
993 | "</classWorldsVersion>\n")) | |
994 | (("commonsCliVersion>.*") | |
995 | (string-append | |
996 | "commonsCliVersion>" | |
997 | ,(package-version java-commons-cli) | |
998 | "</commonsCliVersion>\n")) | |
999 | (("commonsLangVersion>.*") | |
1000 | (string-append | |
1001 | "commonsLangVersion>" | |
1002 | ,(package-version java-commons-lang3) | |
1003 | "</commonsLangVersion>\n")) | |
1004 | (("plexusUtilsVersion>.*") | |
1005 | (string-append | |
1006 | "plexusUtilsVersion>" | |
1007 | ,(package-version java-plexus-utils) | |
1008 | "</plexusUtilsVersion>\n")) | |
1009 | (("plexusInterpolationVersion>.*") | |
1010 | (string-append | |
1011 | "plexusInterpolationVersion>" | |
1012 | ,(package-version java-plexus-interpolation) | |
1013 | "</plexusInterpolationVersion>\n")) | |
1014 | (("guiceVersion>.*") | |
1015 | (string-append | |
1016 | "guiceVersion>" | |
1017 | ,(package-version java-guice) | |
1018 | "</guiceVersion>\n")) | |
1019 | (("sisuInjectVersion>.*") | |
1020 | (string-append | |
1021 | "sisuInjectVersion>" | |
1022 | ,(package-version java-eclipse-sisu-inject) | |
1023 | "</sisuInjectVersion>\n")) | |
1024 | (("securityDispatcherVersion>.*") | |
1025 | (string-append | |
1026 | "securityDispatcherVersion>" | |
1027 | ,(package-version java-plexus-sec-dispatcher) | |
1028 | "</securityDispatcherVersion>\n")) | |
1029 | (("cipherVersion>.*") | |
1030 | (string-append | |
1031 | "cipherVersion>" | |
1032 | ,(package-version java-plexus-cipher) | |
1033 | "</cipherVersion>\n")) | |
1034 | (("slf4jVersion>.*") | |
1035 | (string-append | |
1036 | "slf4jVersion>" | |
1037 | ,(package-version java-slf4j-api) | |
1038 | "</slf4jVersion>\n")) | |
1039 | (("<classifier>no_aop</classifier>") "")) | |
1040 | #t)) | |
1041 | (replace 'install | |
1042 | (install-pom-file "pom.xml"))))) | |
1043 | (propagated-inputs | |
1044 | `(("maven-parent-pom-33" ,maven-parent-pom-33))) | |
1045 | (home-page "https://maven.apache.org/") | |
1046 | (synopsis "Build system") | |
1047 | (description "Apache Maven is a software project management and comprehension | |
1048 | tool. This package contains the Maven pom file, used by all maven components.") | |
1049 | (license license:asl2.0))) | |
1050 | ||
1051 | (define-public maven-artifact | |
1052 | (package | |
1053 | (inherit maven-pom) | |
1054 | (name "maven-artifact") | |
458687d5 JL |
1055 | (arguments |
1056 | `(#:jar-name "maven-artifact.jar" | |
1057 | #:source-dir "maven-artifact/src/main/java" | |
1058 | #:test-dir "maven-artifact/src/test" | |
51087d51 JL |
1059 | #:main-class "org.apache.maven.artifact.versioning.ComparableVersion" |
1060 | #:phases | |
1061 | (modify-phases %standard-phases | |
1062 | (replace 'install | |
1063 | (install-from-pom "maven-artifact/pom.xml"))))) | |
1064 | (propagated-inputs | |
458687d5 | 1065 | `(("java-plexus-utils" ,java-plexus-utils) |
51087d51 JL |
1066 | ("java-commons-lang3" ,java-commons-lang3) |
1067 | ("maven-pom" ,maven-pom))) | |
458687d5 JL |
1068 | (native-inputs |
1069 | `(("java-junit" ,java-junit))) | |
458687d5 JL |
1070 | (description "Apache Maven is a software project management and comprehension |
1071 | tool. This package contains the Maven Artifact classes, providing the | |
1072 | @code{Artifact} interface, with its @code{DefaultArtifact} implementation. The | |
1073 | jar file is executable and provides a little tool to display how Maven parses | |
51087d51 | 1074 | and compares versions:"))) |
d55503a6 JL |
1075 | |
1076 | (define-public maven-model | |
1077 | (package | |
1078 | (inherit maven-artifact) | |
1079 | (name "maven-model") | |
1080 | (arguments | |
1081 | `(#:jar-name "maven-model.jar" | |
1082 | #:source-dir "maven-model/src/main/java" | |
1083 | #:test-dir "maven-model/src/test" | |
d55503a6 JL |
1084 | #:phases |
1085 | (modify-phases %standard-phases | |
1086 | (add-before 'build 'generate-models | |
1087 | (lambda* (#:key inputs #:allow-other-keys) | |
1088 | (define (modello-single-mode file version mode) | |
1089 | (invoke "java" "org.codehaus.modello.ModelloCli" | |
1090 | file mode "maven-model/src/main/java" version | |
1091 | "false" "true")) | |
1092 | (let ((file "maven-model/src/main/mdo/maven.mdo")) | |
1093 | (modello-single-mode file "4.0.0" "java") | |
1094 | (modello-single-mode file "4.0.0" "xpp3-reader") | |
1095 | (modello-single-mode file "4.0.0" "xpp3-writer") | |
1096 | (modello-single-mode file "4.0.0" "xpp3-extended-reader")) | |
51087d51 JL |
1097 | #t)) |
1098 | (replace 'install (install-from-pom "maven-model/pom.xml"))))) | |
1099 | (propagated-inputs | |
d55503a6 | 1100 | `(("java-commons-lang3" ,java-commons-lang3) |
51087d51 JL |
1101 | ("java-plexus-utils" ,java-plexus-utils) |
1102 | ("maven-pom" ,maven-pom))) | |
d55503a6 JL |
1103 | (native-inputs |
1104 | `(("java-modello-core" ,java-modello-core) | |
1105 | ;; for modello: | |
1106 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
1107 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
1108 | ("java-guice" ,java-guice) | |
1109 | ("java-cglib" ,java-cglib) | |
1110 | ("java-asm" ,java-asm) | |
1111 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
1112 | ("java-javax-inject" ,java-javax-inject) | |
1113 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
1114 | ("java-guava" ,java-guava) | |
1115 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
1116 | ("java-sisu-build-api" ,java-sisu-build-api) | |
1117 | ;; modello plugins: | |
1118 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
1119 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) | |
1120 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) | |
1121 | ;; for tests | |
1122 | ("java-junit" ,java-junit))) | |
1123 | (description "Apache Maven is a software project management and comprehension | |
1124 | tool. This package contains the model for Maven @dfn{POM} (Project Object Model), | |
1125 | so really just plain Java objects."))) | |
f084641a JL |
1126 | |
1127 | (define-public maven-builder-support | |
1128 | (package | |
1129 | (inherit maven-artifact) | |
1130 | (name "maven-builder-support") | |
1131 | (arguments | |
1132 | `(#:jar-name "maven-builder-support.jar" | |
1133 | #:source-dir "maven-builder-support/src/main/java" | |
1134 | #:jdk ,icedtea-8 | |
1135 | #:test-dir "maven-builder-support/src/test" | |
1136 | #:phases | |
1137 | (modify-phases %standard-phases | |
1138 | (add-before 'check 'fix-paths | |
1139 | (lambda _ | |
1140 | (with-directory-excursion "maven-builder-support/src/test/java" | |
1141 | (substitute* | |
1142 | '("org/apache/maven/building/FileSourceTest.java" | |
1143 | "org/apache/maven/building/UrlSourceTest.java") | |
1144 | (("target/test-classes") "maven-builder-support/src/test/resources"))) | |
51087d51 JL |
1145 | #t)) |
1146 | (replace 'install (install-from-pom "maven-builder-support/pom.xml"))))) | |
1147 | (propagated-inputs | |
1148 | `(("maven-pom" ,maven-pom))) | |
f084641a | 1149 | (native-inputs |
51087d51 | 1150 | `(("java-junit" ,java-junit))) |
f084641a JL |
1151 | (description "Apache Maven is a software project management and comprehension |
1152 | tool. This package contains a support library for descriptor builders (model, | |
1153 | setting, toolchains)"))) | |
18110e45 JL |
1154 | |
1155 | (define-public maven-settings | |
1156 | (package | |
1157 | (inherit maven-artifact) | |
1158 | (name "maven-settings") | |
1159 | (arguments | |
1160 | `(#:jar-name "maven-settings.jar" | |
1161 | #:source-dir "maven-settings/src/main/java" | |
18110e45 JL |
1162 | #:tests? #f; no tests |
1163 | #:phases | |
1164 | (modify-phases %standard-phases | |
1165 | (add-before 'build 'generate-models | |
1166 | (lambda* (#:key inputs #:allow-other-keys) | |
1167 | (define (modello-single-mode file version mode) | |
1168 | (invoke "java" "org.codehaus.modello.ModelloCli" | |
1169 | file mode "maven-settings/src/main/java" version | |
1170 | "false" "true")) | |
1171 | (let ((file "maven-settings/src/main/mdo/settings.mdo")) | |
1172 | (modello-single-mode file "1.1.0" "java") | |
1173 | (modello-single-mode file "1.1.0" "xpp3-reader") | |
1174 | (modello-single-mode file "1.1.0" "xpp3-writer")) | |
51087d51 JL |
1175 | #t)) |
1176 | (replace 'install (install-from-pom "maven-settings/pom.xml"))))) | |
1177 | (propagated-inputs | |
1178 | `(("java-plexus-utils" ,java-plexus-utils) | |
1179 | ("maven-pom" ,maven-pom))) | |
18110e45 JL |
1180 | (native-inputs |
1181 | `(("java-modello-core" ,java-modello-core) | |
1182 | ;; for modello: | |
1183 | ;("container" ,java-plexus-container-default) | |
1184 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
1185 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
1186 | ("java-guice" ,java-guice) | |
1187 | ("java-cglib" ,java-cglib) | |
1188 | ("java-asm" ,java-asm) | |
1189 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
1190 | ("java-javax-inject" ,java-javax-inject) | |
1191 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
1192 | ("java-plexus-utils" ,java-plexus-utils) | |
1193 | ("java-guava" ,java-guava) | |
1194 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
1195 | ("java-sisu-build-api" ,java-sisu-build-api) | |
1196 | ;; modello plugins: | |
1197 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
1198 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) | |
1199 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3))) | |
1200 | (description "Apache Maven is a software project management and comprehension | |
1201 | tool. This package contains strictly the model for Maven settings, that is | |
1202 | simply plain java objects."))) | |
3a5572ae JL |
1203 | |
1204 | (define-public maven-settings-builder | |
1205 | (package | |
1206 | (inherit maven-artifact) | |
1207 | (name "maven-settings-builder") | |
1208 | (arguments | |
1209 | `(#:jar-name "maven-settings-builder.jar" | |
1210 | #:source-dir "maven-settings-builder/src/main/java" | |
1211 | #:jdk ,icedtea-8 | |
1212 | #:test-dir "maven-settings-builder/src/test" | |
1213 | #:phases | |
1214 | (modify-phases %standard-phases | |
1215 | (add-before 'build 'generate-components.xml | |
1216 | (lambda _ | |
1217 | (mkdir-p "build/classes/META-INF/plexus") | |
1218 | (chmod "components.sh" #o755) | |
1219 | (invoke "./components.sh" "maven-settings-builder/src/main/java" | |
1220 | "build/classes/META-INF/plexus/components.xml") | |
51087d51 JL |
1221 | #t)) |
1222 | (replace 'install (install-from-pom "maven-settings-builder/pom.xml"))))) | |
1223 | (propagated-inputs | |
3a5572ae | 1224 | `(("java-plexus-utils" ,java-plexus-utils) |
3a5572ae JL |
1225 | ("java-plexus-interpolation" ,java-plexus-interpolation) |
1226 | ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) | |
1227 | ("maven-builder-support" ,maven-builder-support) | |
1228 | ("maven-settings" ,maven-settings) | |
51087d51 | 1229 | ("maven-pom" ,maven-pom))) |
3a5572ae | 1230 | (native-inputs |
51087d51 JL |
1231 | `(("java-junit" ,java-junit) |
1232 | ("java-plexus-component-annotations" ,java-plexus-component-annotations))) | |
3a5572ae JL |
1233 | (description "Apache Maven is a software project management and comprehension |
1234 | tool. This package contains the effective model builder, with profile activation, | |
1235 | inheritance, interpolation, @dots{}"))) | |
516db3b9 JL |
1236 | |
1237 | (define-public maven-model-builder | |
1238 | (package | |
1239 | (inherit maven-artifact) | |
1240 | (name "maven-model-builder") | |
1241 | (arguments | |
1242 | `(#:jar-name "maven-model-builder.jar" | |
1243 | #:source-dir "maven-model-builder/src/main/java" | |
1244 | #:jdk ,icedtea-8 | |
1245 | #:test-dir "maven-model-builder/src/test" | |
1246 | #:phases | |
1247 | (modify-phases %standard-phases | |
1248 | (add-before 'build 'copy-resources | |
1249 | (lambda _ | |
1250 | (copy-recursively "maven-model-builder/src/main/resources" | |
1251 | "build/classes") | |
1252 | #t)) | |
1253 | (add-before 'build 'generate-components.xml | |
1254 | (lambda _ | |
1255 | (mkdir-p "build/classes/META-INF/plexus") | |
1256 | (chmod "components.sh" #o755) | |
1257 | (invoke "./components.sh" "maven-model-builder/src/main/java" | |
1258 | "build/classes/META-INF/plexus/components.xml") | |
1259 | #t)) | |
1260 | (add-before 'check 'fix-paths | |
1261 | (lambda _ | |
1262 | (substitute* (find-files "maven-model-builder/src/test/java" ".*.java") | |
1263 | (("src/test") "maven-model-builder/src/test")) | |
51087d51 JL |
1264 | #t)) |
1265 | (replace 'install | |
1266 | (install-from-pom "maven-model-builder/pom.xml"))))) | |
1267 | (propagated-inputs | |
1268 | `(("java-plexus-interpolation" ,java-plexus-interpolation) | |
1269 | ("java-plexus-utils" ,java-plexus-utils) | |
1270 | ("maven-artifact" ,maven-artifact) | |
1271 | ("maven-builder-support" ,maven-builder-support) | |
1272 | ("maven-model" ,maven-model) | |
1273 | ("maven-pom" ,maven-pom))) | |
516db3b9 JL |
1274 | (native-inputs |
1275 | `(("java-junit" ,java-junit) | |
51087d51 | 1276 | ("java-guava" ,java-guava) |
516db3b9 JL |
1277 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
1278 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
1279 | ("guice" ,java-guice) | |
1280 | ("java-cglib" ,java-cglib) | |
1281 | ("java-asm" ,java-asm) | |
1282 | ("sisu-inject" ,java-eclipse-sisu-inject) | |
1283 | ("javax-inject" ,java-javax-inject) | |
c5928211 JL |
1284 | ("java-xmlunit" ,java-xmlunit) |
1285 | ("java-xmlunit-matchers" ,java-xmlunit-matchers) | |
516db3b9 JL |
1286 | ("xbean" ,java-geronimo-xbean-reflect) |
1287 | ("classworlds" ,java-plexus-classworlds))) | |
1288 | (description "Apache Maven is a software project management and comprehension | |
1289 | tool. This package contains the effective model builder, with profile activation, | |
1290 | inheritance, interpolation, @dots{}"))) | |
18736663 JL |
1291 | |
1292 | (define-public maven-repository-metadata | |
1293 | (package | |
1294 | (inherit maven-artifact) | |
1295 | (name "maven-repository-metadata") | |
1296 | (arguments | |
1297 | `(#:jar-name "maven-repository-metadata.jar" | |
1298 | #:source-dir "maven-repository-metadata/src/main/java" | |
1299 | #:jdk ,icedtea-8 | |
1300 | #:tests? #f; no tests | |
1301 | #:phases | |
1302 | (modify-phases %standard-phases | |
1303 | (add-before 'build 'generate-models | |
1304 | (lambda* (#:key inputs #:allow-other-keys) | |
1305 | (define (modello-single-mode file version mode) | |
1306 | (invoke "java" "org.codehaus.modello.ModelloCli" | |
1307 | file mode "maven-repository-metadata/src/main/java" version | |
1308 | "false" "true")) | |
1309 | (let ((file "maven-repository-metadata/src/main/mdo/metadata.mdo")) | |
1310 | (modello-single-mode file "1.1.0" "java") | |
1311 | (modello-single-mode file "1.1.0" "xpp3-reader") | |
1312 | (modello-single-mode file "1.1.0" "xpp3-writer")) | |
51087d51 JL |
1313 | #t)) |
1314 | (replace 'install | |
1315 | (install-from-pom "maven-repository-metadata/pom.xml"))))) | |
1316 | (propagated-inputs | |
1317 | `(("java-plexus-utils" ,java-plexus-utils) | |
1318 | ("maven-pom" ,maven-pom))) | |
18736663 JL |
1319 | (native-inputs |
1320 | `(("modello" ,java-modello-core) | |
1321 | ;; for modello: | |
1322 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
1323 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
1324 | ("java-guice" ,java-guice) | |
1325 | ("java-cglib" ,java-cglib) | |
1326 | ("java-asm" ,java-asm) | |
1327 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
1328 | ("java-javax-inject" ,java-javax-inject) | |
1329 | ("java-plexus-utils" ,java-plexus-utils) | |
1330 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
1331 | ("java-guava" ,java-guava) | |
1332 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
1333 | ("java-sisu-build-api" ,java-sisu-build-api) | |
1334 | ;; modello plugins: | |
1335 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
1336 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) | |
1337 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3))) | |
1338 | (description "Apache Maven is a software project management and comprehension | |
1339 | tool. This package contains strictly the model for Maven Repository Metadata, | |
1340 | so really just plain objects."))) | |
5aa4ea6a JL |
1341 | |
1342 | (define-public maven-resolver-provider | |
1343 | (package | |
1344 | (inherit maven-artifact) | |
1345 | (name "maven-resolver-provider") | |
1346 | (arguments | |
1347 | `(#:jar-name "maven-resolver-provider.jar" | |
1348 | #:source-dir "maven-resolver-provider/src/main/java" | |
1349 | #:test-dir "maven-resolver-provider/src/test" | |
1350 | #:jdk ,icedtea-8 | |
1351 | #:tests? #f; dependency loop on maven-core (@Component RepositorySystem) | |
1352 | #:phases | |
1353 | (modify-phases %standard-phases | |
1354 | (add-before 'build 'generate-sisu-named | |
1355 | (lambda _ | |
1356 | (mkdir-p "build/classes/META-INF/sisu") | |
1357 | (chmod "./sisu.sh" #o755) | |
1358 | (invoke "./sisu.sh" "maven-resolver-provider/src/main/java" | |
1359 | "build/classes/META-INF/sisu/javax.inject.Named") | |
51087d51 JL |
1360 | #t)) |
1361 | (replace 'install | |
1362 | (install-from-pom "maven-resolver-provider/pom.xml"))))) | |
1363 | (propagated-inputs | |
1364 | `(("maven-model" ,maven-model) | |
1365 | ("maven-model-builder" ,maven-model-builder) | |
1366 | ("maven-resolver-spi" ,maven-resolver-spi) | |
5aa4ea6a JL |
1367 | ("maven-resolver-api" ,maven-resolver-api) |
1368 | ("maven-resolver-impl" ,maven-resolver-impl) | |
1369 | ("maven-resolver-util" ,maven-resolver-util) | |
5aa4ea6a JL |
1370 | ("maven-builder-support" ,maven-builder-support) |
1371 | ("maven-repository-metadata" ,maven-repository-metadata) | |
1372 | ("java-plexus-utils" ,java-plexus-utils) | |
1373 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
5aa4ea6a | 1374 | ("java-guice" ,java-guice) |
5aa4ea6a | 1375 | ("java-javax-inject" ,java-javax-inject))))) |
8f5caf93 JL |
1376 | |
1377 | (define-public maven-plugin-api | |
1378 | (package | |
1379 | (inherit maven-artifact) | |
1380 | (name "maven-plugin-api") | |
1381 | (arguments | |
1382 | `(#:jar-name "maven-plugin-api.jar" | |
1383 | #:source-dir "maven-plugin-api/src/main/java" | |
1384 | #:jdk ,icedtea-8 | |
1385 | #:test-dir "maven-plugin-api/src/test" | |
1386 | #:phases | |
1387 | (modify-phases %standard-phases | |
1388 | (add-before 'build 'generate-models | |
1389 | (lambda* (#:key inputs #:allow-other-keys) | |
1390 | (define (modello-single-mode file version mode) | |
1391 | (invoke "java" "org.codehaus.modello.ModelloCli" | |
1392 | file mode "maven-plugin-api/src/main/java" version | |
1393 | "false" "true")) | |
1394 | (let ((file "maven-plugin-api/src/main/mdo/lifecycle.mdo")) | |
1395 | (modello-single-mode file "1.0.0" "java") | |
1396 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
1397 | (modello-single-mode file "1.0.0" "xpp3-writer")) | |
51087d51 JL |
1398 | #t)) |
1399 | (replace 'install | |
1400 | (install-from-pom "maven-plugin-api/pom.xml"))))) | |
1401 | (propagated-inputs | |
8f5caf93 JL |
1402 | `(("maven-artifact" ,maven-artifact) |
1403 | ("maven-model" ,maven-model) | |
1404 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
1405 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
1406 | ("guice" ,java-guice) | |
1407 | ("java-cglib" ,java-cglib) | |
1408 | ("java-asm" ,java-asm) | |
1409 | ("sisu-inject" ,java-eclipse-sisu-inject) | |
1410 | ("javax-inject" ,java-javax-inject) | |
1411 | ("utils" ,java-plexus-utils))) | |
1412 | (native-inputs | |
1413 | `(("modello" ,java-modello-core) | |
1414 | ;; for modello: | |
1415 | ("classworlds" ,java-plexus-classworlds) | |
1416 | ("guava" ,java-guava) | |
1417 | ("xbean" ,java-geronimo-xbean-reflect) | |
1418 | ("build-api" ,java-sisu-build-api) | |
1419 | ;; modello plugins: | |
1420 | ("java" ,java-modello-plugins-java) | |
1421 | ("xml" ,java-modello-plugins-xml) | |
1422 | ("xpp3" ,java-modello-plugins-xpp3) | |
1423 | ;; for tests | |
1424 | ("java-junit" ,java-junit))) | |
1425 | (description "Apache Maven is a software project management and comprehension | |
1426 | tool. This package contains strictly the API for plugins -- composed of goals | |
1427 | implemented by Mojos -- development. | |
1428 | ||
1429 | A plugin is described in a @file{META-INF/maven/plugin.xml} plugin descriptor, | |
1430 | generally generated from plugin sources using maven-plugin-plugin."))) | |
7a42f058 | 1431 | |
015e8774 JL |
1432 | (define-public maven-core-bootstrap |
1433 | (hidden-package | |
1434 | (package | |
1435 | (inherit maven-artifact) | |
1436 | (name "maven-core") | |
1437 | (arguments | |
1438 | `(#:jar-name "maven-core.jar" | |
1439 | #:source-dir "src/main/java" | |
1440 | #:jdk ,icedtea-8 | |
1441 | ;; Tests need maven-compat, which requires maven-core | |
1442 | #:tests? #f | |
1443 | #:phases | |
1444 | (modify-phases %standard-phases | |
1445 | (add-before 'configure 'chdir | |
1446 | (lambda _ | |
1447 | ;; Required for generating components.xml in maven-core | |
1448 | (chdir "maven-core") | |
1449 | #t)) | |
1450 | (add-before 'build 'copy-resources | |
1451 | (lambda _ | |
1452 | (mkdir-p "build/classes/") | |
1453 | (copy-recursively "src/main/resources" "build/classes") | |
1454 | #t)) | |
1455 | (add-after 'copy-resources 'fill-properties | |
1456 | (lambda _ | |
1457 | ;; This file controls the output of some mvn subcommands, such as | |
1458 | ;; mvn -version. | |
1459 | (substitute* "build/classes/org/apache/maven/messages/build.properties" | |
1460 | (("\\$\\{buildNumber\\}") "guix_build") | |
1461 | (("\\$\\{timestamp\\}") "0") | |
1462 | (("\\$\\{project.version\\}") ,(package-version maven-artifact)) | |
1463 | (("\\$\\{distributionId\\}") "apache-maven") | |
1464 | (("\\$\\{distributionShortName\\}") "Maven") | |
1465 | (("\\$\\{distributionName\\}") "Apache Maven")) | |
1466 | #t)) | |
1467 | (add-before 'build 'generate-sisu-named | |
1468 | (lambda _ | |
1469 | (mkdir-p "build/classes/META-INF/sisu") | |
1470 | (chmod "../sisu.sh" #o755) | |
1471 | (invoke "../sisu.sh" "src/main/java" | |
1472 | "build/classes/META-INF/sisu/javax.inject.Named") | |
1473 | #t)) | |
1474 | (add-before 'build 'generate-models | |
1475 | (lambda* (#:key inputs #:allow-other-keys) | |
1476 | (define (modello-single-mode file version mode) | |
1477 | (invoke "java" "org.codehaus.modello.ModelloCli" | |
1478 | file mode "src/main/java" version | |
1479 | "false" "true")) | |
1480 | (let ((file "src/main/mdo/toolchains.mdo")) | |
1481 | (modello-single-mode file "1.1.0" "java") | |
1482 | (modello-single-mode file "1.1.0" "xpp3-reader") | |
1483 | (modello-single-mode file "1.1.0" "xpp3-writer")) | |
1484 | #t)) | |
1485 | (add-before 'install 'fix-pom | |
1486 | (lambda _ | |
1487 | (substitute* "pom.xml" | |
1488 | (("<classifier>no_aop</classifier>") "")) | |
1489 | #t)) | |
1490 | (replace 'install | |
1491 | (install-from-pom "pom.xml"))))) | |
1492 | (propagated-inputs | |
1493 | `(("maven-artifact" ,maven-artifact) | |
1494 | ("maven-resolver-provider" ,maven-resolver-provider) | |
1495 | ("maven-builder-support" ,maven-builder-support) | |
1496 | ("maven-model" ,maven-model) | |
1497 | ("maven-model-builder" ,maven-model-builder) | |
1498 | ("maven-settings" ,maven-settings) | |
1499 | ("maven-settings-builder" ,maven-settings-builder) | |
1500 | ("maven-plugin-api" ,maven-plugin-api) | |
1501 | ("maven-repository-metadata" ,maven-repository-metadata) | |
1502 | ("maven-shared-utils" ,maven-shared-utils) | |
1503 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
1504 | ("java-plexus-utils" ,java-plexus-utils) | |
1505 | ("java-commons-lang3" ,java-commons-lang3) | |
1506 | ("java-guava" ,java-guava) | |
1507 | ("java-guice" ,java-guice) | |
1508 | ("maven-resolver-api" ,maven-resolver-api) | |
1509 | ("maven-resolver-spi" ,maven-resolver-spi) | |
1510 | ("maven-resolver-util" ,maven-resolver-util) | |
1511 | ("maven-resolver-impl" ,maven-resolver-impl) | |
1512 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
1513 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
1514 | ("java-javax-inject" ,java-javax-inject) | |
1515 | ("java-plexus-classworld" ,java-plexus-classworlds))) | |
1516 | (native-inputs | |
1517 | `(("java-modello-core" ,java-modello-core) | |
1518 | ("java-cglib" ,java-cglib) | |
1519 | ("java-asm" ,java-asm) | |
1520 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
1521 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
1522 | ("java-sisu-build-api" ,java-sisu-build-api) | |
1523 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
1524 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) | |
1525 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) | |
1526 | ;; tests | |
1527 | ("java-junit" ,java-junit) | |
1528 | ("java-mockito-1" ,java-mockito-1) | |
1529 | ("java-commons-jxpath" ,java-commons-jxpath))) | |
1530 | (description "Apache Maven is a software project management and comprehension | |
7a42f058 | 1531 | tool. This package contains the maven core classes managing the whole build |
015e8774 | 1532 | process.")))) |
b822544c JL |
1533 | |
1534 | (define-public maven-core | |
1535 | (package | |
1536 | (inherit maven-core-bootstrap) | |
1537 | (arguments | |
1538 | (substitute-keyword-arguments (package-arguments maven-core-bootstrap) | |
1539 | ((#:phases phases) | |
1540 | `(modify-phases ,phases | |
1541 | (add-before 'build 'modify-metainf | |
1542 | (lambda _ | |
1543 | (substitute* "build.xml" | |
d440df61 | 1544 | (("message=\"\"") "message=\"Implementation-Version: 3.5.4\n\"")) |
b822544c JL |
1545 | #t)) |
1546 | (add-before 'build 'add-maven-files | |
1547 | (lambda _ | |
1548 | (mkdir-p "build/classes/META-INF/maven/org.apache.maven/maven-core") | |
1549 | (copy-file "pom.xml" | |
1550 | "build/classes/META-INF/maven/org.apache.maven/maven-core/pom.xml") | |
1551 | (with-output-to-file "build/classes/META-INF/maven/org.apache.maven/maven-core/pom.properties" | |
1552 | (lambda _ | |
1553 | (format #t "version=~a~% | |
1554 | groupId=org.apache.maven~% | |
1555 | artifactId=maven-core" ,(package-version maven-core-bootstrap)))) | |
1556 | #t)) | |
1557 | (add-after 'build 'generate-metadata | |
1558 | (lambda _ | |
1559 | (define (components file) | |
1560 | (let ((sxml (with-input-from-file file | |
1561 | (lambda _ (xml->sxml (current-input-port) | |
1562 | #:trim-whitespace? #t))))) | |
1563 | ;; Select the list of <component>s inside the <component-set> | |
1564 | ;; and <components>. | |
1565 | ((@ (ice-9 match) match) sxml | |
1566 | (('*TOP* | |
1567 | ('*PI* foo ...) | |
1568 | ('component-set | |
1569 | ('components x ...))) x)))) | |
1570 | (use-modules (sxml simple)) | |
1571 | (delete-file "build/classes/META-INF/plexus/components.xml") | |
1572 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
1573 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
1574 | "--source" "build/classes/META-INF/plexus" | |
1575 | "--output" "build/classes/META-INF/plexus/components.t.xml" | |
1576 | "--classes" "build/classes" | |
1577 | "--descriptors" "build/classes") | |
1578 | ;; Now we merge all other components from hand-written xml | |
1579 | (let ((generated-xml (components "build/classes/META-INF/plexus/components.t.xml")) | |
1580 | (components-xml (components "src/main/resources/META-INF/plexus/components.xml")) | |
1581 | (default-bindings-xml (components "src/main/resources/META-INF/plexus/default-bindings.xml")) | |
1582 | (artifact-handlers-xml (components "src/main/resources/META-INF/plexus/artifact-handlers.xml"))) | |
1583 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
1584 | (lambda _ | |
1585 | (display "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") | |
1586 | (sxml->xml | |
1587 | `(component-set | |
1588 | (components | |
1589 | ,@(append generated-xml components-xml | |
1590 | default-bindings-xml | |
1591 | artifact-handlers-xml))))))) | |
1592 | #t)) | |
1593 | (add-after 'generate-metadata 'rebuild | |
1594 | (lambda _ | |
1595 | (invoke "ant" "jar") | |
1596 | #t)))))) | |
1597 | (native-inputs | |
1598 | `(("java-plexus-component-metadata" ,java-plexus-component-metadata) | |
1599 | ("java-commons-cli" ,java-commons-cli) | |
1600 | ("java-plexus-cli" ,java-plexus-cli) | |
1601 | ("java-jdom2" ,java-jdom2) | |
1602 | ("java-qdox" ,java-qdox) | |
1603 | ("maven-core-boot" ,maven-core-bootstrap) | |
1604 | ,@(package-native-inputs maven-core-bootstrap))))) | |
e2c7d329 JL |
1605 | |
1606 | (define-public maven-embedder | |
1607 | (package | |
1608 | (inherit maven-artifact) | |
1609 | (name "maven-embedder") | |
1610 | (arguments | |
1611 | `(#:jar-name "maven-embedder.jar" | |
1612 | #:source-dir "maven-embedder/src/main/java" | |
1613 | #:test-dir "maven-embedder/src/test" | |
1614 | #:test-exclude (list "**/MavenCliTest.java") | |
1615 | #:jdk ,icedtea-8 | |
1616 | #:phases | |
1617 | (modify-phases %standard-phases | |
1618 | (add-before 'build 'generate-sisu-named | |
1619 | (lambda _ | |
1620 | (mkdir-p "build/classes/META-INF/sisu") | |
1621 | (chmod "sisu.sh" #o755) | |
1622 | (invoke "./sisu.sh" "maven-embedder/src/main/java" | |
1623 | "build/classes/META-INF/sisu/javax.inject.Named") | |
1624 | #t)) | |
1625 | (add-before 'build 'generate-models | |
1626 | (lambda* (#:key inputs #:allow-other-keys) | |
1627 | (define (modello-single-mode file version mode) | |
1628 | (invoke "java" "org.codehaus.modello.ModelloCli" | |
1629 | file mode "maven-embedder/src/main/java" version | |
1630 | "false" "true")) | |
1631 | (let ((file "maven-embedder/src/main/mdo/core-extensions.mdo")) | |
1632 | (modello-single-mode file "1.0.0" "java") | |
1633 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
1634 | (modello-single-mode file "1.0.0" "xpp3-writer")) | |
1635 | #t)) | |
1636 | (add-before 'check 'fix-test-paths | |
1637 | (lambda _ | |
1638 | (substitute* "maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java" | |
1639 | (("target/test-classes") "build/test-classes")) | |
1640 | #t)) | |
1641 | (add-before 'check 'fix-test-compilation | |
1642 | (lambda _ | |
1643 | ;; Tests are in the java/ subdir. Other subdirectories contain | |
1644 | ;; additional test plugins, with duplicate classes, so we can't | |
1645 | ;; compile them. Also, they are meant to be built with maven, to | |
1646 | ;; test its build process. | |
1647 | (substitute* "build.xml" | |
1648 | (("srcdir=\"maven-embedder/src/test\"") | |
1649 | "srcdir=\"maven-embedder/src/test/java\"")) | |
51087d51 JL |
1650 | #t)) |
1651 | (replace 'install | |
1652 | (install-from-pom "maven-embedder/pom.xml"))))) | |
1653 | (propagated-inputs | |
e2c7d329 JL |
1654 | `(("maven-core" ,maven-core) |
1655 | ("maven-artifact" ,maven-artifact) | |
1656 | ("maven-plugin-api" ,maven-plugin-api) | |
1657 | ("maven-builder-support" ,maven-builder-support) | |
1658 | ("maven-model" ,maven-model) | |
1659 | ("maven-model-builder" ,maven-model-builder) | |
1660 | ("maven-settings" ,maven-settings) | |
1661 | ("maven-settings-builder" ,maven-settings-builder) | |
1662 | ("maven-shared-utils" ,maven-shared-utils) | |
1663 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
1664 | ("java-plexus-util" ,java-plexus-utils) | |
1665 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
1666 | ("java-plexus-cipher" ,java-plexus-cipher) | |
1667 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
1668 | ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) | |
1669 | ("maven-resolevr-util" ,maven-resolver-util) | |
1670 | ("maven-resolevr-api" ,maven-resolver-api) | |
1671 | ("java-logback-core" ,java-logback-core) | |
1672 | ("java-logback-classic" ,java-logback-classic) | |
1673 | ("java-commons-cli" ,java-commons-cli) | |
1674 | ("java-commons-io" ,java-commons-io) | |
1675 | ("java-commons-lang3" ,java-commons-lang3) | |
1676 | ("java-guava" ,java-guava) | |
1677 | ("java-guice" ,java-guice) | |
1678 | ("java-javax-inject" ,java-javax-inject) | |
1679 | ("java-slf4j-api" ,java-slf4j-api) | |
51087d51 JL |
1680 | ("java-slf4j-simple" ,java-slf4j-simple) |
1681 | ("java-jsr250" ,java-jsr250))) | |
e2c7d329 JL |
1682 | (native-inputs |
1683 | `(("java-modello-core" ,java-modello-core) | |
1684 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
1685 | ("java-sisu-build-api" ,java-sisu-build-api) | |
1686 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
1687 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
1688 | ("java-cglib" ,java-cglib) | |
1689 | ("java-asm" ,java-asm) | |
1690 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
1691 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) | |
1692 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) | |
1693 | ;; tests | |
1694 | ("java-junit" ,java-junit) | |
1695 | ("java-objenesis" ,java-objenesis) | |
1696 | ("java-mockito-1" ,java-mockito-1) | |
1697 | ("java-hamcrest-core" ,java-hamcrest-core))) | |
1698 | (description "Apache Maven is a software project management and comprehension | |
1699 | tool. This package contains a Maven embeddable component, with CLI and | |
1700 | logging support."))) | |
0c1e98eb JL |
1701 | |
1702 | (define-public maven-compat | |
1703 | (package | |
1704 | (inherit maven-artifact) | |
1705 | (name "maven-compat") | |
1706 | (arguments | |
1707 | `(#:jar-name "maven-compat.jar" | |
1708 | #:source-dir "src/main/java" | |
1709 | #:jdk ,icedtea-8 | |
1710 | #:test-dir "src/test" | |
1711 | #:phases | |
1712 | (modify-phases %standard-phases | |
1713 | ;; Tests assume we're in this directory | |
1714 | (add-before 'configure 'chdir | |
1715 | (lambda _ | |
1716 | (chdir "maven-compat") | |
1717 | #t)) | |
892a5647 JL |
1718 | (add-before 'build 'recreate-removed-jar |
1719 | (lambda _ | |
1720 | (with-output-to-file "src/test/repository-system/maven-core-2.1.0.jar" | |
1721 | (const #t)) | |
1722 | (with-directory-excursion "src/test/resources" | |
1723 | (with-output-to-file "artifact-install/artifact-1.0.jar" | |
1724 | (lambda _ | |
1725 | (format #t "dummy~%"))) | |
1726 | (for-each | |
1727 | (lambda (file) | |
1728 | (with-output-to-file file | |
1729 | (lambda _ | |
1730 | (format #t "foo~%")))) | |
1731 | '("local-repo/maven-test/jars/maven-test-a-1.0.jar" | |
1732 | "local-repo/maven-test/jars/maven-test-c-1.0.jar" | |
1733 | "local-repo/maven-test/jars/maven-test-d-1.0.jar" | |
1734 | "inheritance-repo/t04/maven-test/jars/t04-a-1.0.jar" | |
1735 | "inheritance-repo/t04/maven-test/jars/t04-b-1.0.jar" | |
1736 | "inheritance-repo/t04/maven-test/jars/t04-b-2.0.jar" | |
1737 | "inheritance-repo/t04/maven-test/jars/t04-c-1.0.jar" | |
1738 | "inheritance-repo/t04/maven-test/jars/t04-c-2.0.jar" | |
1739 | "inheritance-repo/t05/maven-test/jars/t05-a-1.0.jar" | |
1740 | "inheritance-repo/t05/maven-test/jars/t05-a-2.0.jar" | |
1741 | "inheritance-repo/t05/maven-test/jars/t05-b-1.0.jar" | |
1742 | "inheritance-repo/t05/maven-test/jars/t05-b-1.1.jar" | |
1743 | "inheritance-repo/t05/maven-test/jars/t05-b-2.0.jar" | |
1744 | "inheritance-repo/t05/maven-test/jars/t05-c-1.0.jar" | |
1745 | "inheritance-repo/t05/maven-test/jars/t05-d-1.0.jar" | |
1746 | "inheritance-repo/t05/maven-test/jars/t05-d-1.1.jar" | |
1747 | "inheritance-repo/t05/maven-test/jars/t05-d-1.2.jar" | |
1748 | "inheritance-repo/t06/maven-test/jars/t06-a-1.0.jar" | |
1749 | "inheritance-repo/t06/maven-test/jars/t06-b-1.0.jar" | |
1750 | "inheritance-repo/t06/maven-test/jars/t06-b-1.1.jar" | |
1751 | "inheritance-repo/t06/maven-test/jars/t06-c-1.0.jar" | |
1752 | "inheritance-repo/t06/maven-test/jars/t06-d-1.0.jar" | |
1753 | "inheritance-repo/t06/maven-test/jars/t06-d-1.1.jar" | |
1754 | "inheritance-repo/t06/maven-test/jars/t06-d-1.2.jar" | |
1755 | "inheritance-repo/t07/maven-test/jars/t07-a-1.0.jar" | |
1756 | "inheritance-repo/t07/maven-test/jars/t07-b-1.0.jar" | |
1757 | "inheritance-repo/t07/maven-test/jars/t07-b-1.1.jar" | |
1758 | "inheritance-repo/t07/maven-test/jars/t07-c-1.0.jar" | |
1759 | "inheritance-repo/t07/maven-test/jars/t07-d-1.0.jar" | |
1760 | "inheritance-repo/t07/maven-test/jars/t07-d-1.1.jar" | |
1761 | "inheritance-repo/t07/maven-test/jars/t07-d-1.2.jar" | |
1762 | "inheritance-repo/t08/maven-test/jars/t08-a-1.0.jar" | |
1763 | "inheritance-repo/t08/maven-test/jars/t08-b-1.0.jar" | |
1764 | "inheritance-repo/t08/maven-test/jars/t08-b-1.1.jar" | |
1765 | "inheritance-repo/t08/maven-test/jars/t08-c-1.0.jar" | |
1766 | "inheritance-repo/t08/maven-test/jars/t08-d-1.0.jar" | |
1767 | "inheritance-repo/t08/maven-test/jars/t08-d-1.1.jar" | |
1768 | "inheritance-repo/t08/maven-test/jars/t08-d-1.2.jar" | |
1769 | "inheritance-repo/t09/maven-test/jars/t09-a-1.0.jar" | |
1770 | "inheritance-repo/t09/maven-test/jars/t09-b-1.0.jar" | |
1771 | "inheritance-repo/t09/maven-test/jars/t09-c-1.0.jar" | |
1772 | "inheritance-repo/t09/maven-test/jars/t09-d-1.0.jar" | |
1773 | "inheritance-repo/t10/maven-test/jars/t10-a-1.0.jar" | |
1774 | "inheritance-repo/t10/maven-test/jars/t10-b-1.0.jar" | |
1775 | "inheritance-repo/t10/maven-test/jars/t10-c-1.0.jar")) | |
1776 | (with-directory-excursion "local-repo/snapshot-test/jars" | |
1777 | (for-each | |
1778 | (lambda (file) | |
1779 | (with-output-to-file file | |
1780 | (lambda _ | |
1781 | ;; No end-of-line | |
1782 | (format #t "local")))) | |
1783 | '("maven-snapshot-e-1.0-SNAPSHOT.jar" | |
1784 | "maven-snapshot-b-1.0-SNAPSHOT.jar" | |
1785 | "maven-snapshot-a-1.0-SNAPSHOT.jar")))) | |
1786 | (for-each | |
1787 | (lambda (letter) | |
1788 | (with-directory-excursion | |
1789 | (string-append "src/test/remote-repo/org/apache/maven/its/" | |
1790 | letter "/0.1") | |
1791 | (let ((dir (string-append "META-INF/maven/org.apache.maven.its/" | |
1792 | letter))) | |
1793 | (mkdir-p dir) | |
1794 | (copy-file (string-append letter "-0.1.pom") | |
1795 | (string-append dir "/pom.xml")) | |
1796 | (with-output-to-file (string-append dir "/pom.properties") | |
1797 | (lambda _ | |
1798 | (format #t "version=0.1~%") | |
1799 | (format #t "groupId=org.apache.maven.its") | |
1800 | (format #t (string-append "artifactId=" letter)))) | |
1801 | (with-output-to-file "META-INF/MANIFEST.MF" | |
1802 | (lambda _ | |
1803 | (format #t "Manifest-Version: 1.0~%")))) | |
1804 | (invoke "jar" "cmf" "META-INF/MANIFEST.MF" | |
1805 | (string-append letter "-0.1.jar") "META-INF"))) | |
1806 | '("a" "b")) | |
1807 | #t)) | |
0c1e98eb JL |
1808 | (add-before 'build 'generate-models |
1809 | (lambda* (#:key inputs #:allow-other-keys) | |
1810 | (define (modello-single-mode file version mode) | |
1811 | (invoke "java" "org.codehaus.modello.ModelloCli" | |
1812 | file mode "src/main/java" version | |
1813 | "false" "true")) | |
1814 | (let ((file "src/main/mdo/profiles.mdo")) | |
1815 | (modello-single-mode file "1.0.0" "java") | |
1816 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
1817 | (modello-single-mode file "1.0.0" "xpp3-writer")) | |
1818 | (let ((file "src/main/mdo/paramdoc.mdo")) | |
1819 | (modello-single-mode file "1.0.0" "java") | |
1820 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
1821 | (modello-single-mode file "1.0.0" "xpp3-writer")) | |
1822 | #t)) | |
1823 | (add-after 'build 'generate-metadata | |
1824 | (lambda _ | |
1825 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
1826 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
1827 | "--source" "src/main/java" | |
1828 | "--output" "build/classes/META-INF/plexus/components.xml" | |
1829 | "--classes" "build/classes" | |
1830 | "--descriptors" "build/classes/META-INF") | |
1831 | #t)) | |
1832 | (add-before 'check 'build-tests | |
1833 | (lambda _ | |
1834 | (invoke "ant" "compile-tests") | |
1835 | #t)) | |
1836 | (add-after 'build-tests 'generate-test-metadata | |
1837 | (lambda _ | |
1838 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") | |
1839 | ":build/classes" | |
1840 | ":build/test-classes") | |
1841 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
1842 | "--source" "src/test/java" | |
1843 | "--output" "build/test-classes/META-INF/plexus/components.xml" | |
1844 | "--classes" "build/test-classes" | |
1845 | "--descriptors" "build/test-classes/META-INF") | |
1846 | #t)) | |
1847 | (add-after 'generate-metadata 'rebuild | |
1848 | (lambda _ | |
1849 | (invoke "ant" "jar") | |
51087d51 JL |
1850 | #t)) |
1851 | (replace 'install | |
1852 | (install-from-pom "pom.xml"))))) | |
1853 | (propagated-inputs | |
0c1e98eb JL |
1854 | `(("maven-artifact" ,maven-artifact) |
1855 | ("maven-repository-metadata" ,maven-repository-metadata) | |
1856 | ("maven-builder-support" ,maven-builder-support) | |
1857 | ("maven-model" ,maven-model) | |
1858 | ("maven-model-builder" ,maven-model-builder) | |
1859 | ("maven-settings" ,maven-settings) | |
1860 | ("maven-settings-builder" ,maven-settings-builder) | |
1861 | ("maven-core" ,maven-core) | |
1862 | ("maven-wagon-provider-api" ,maven-wagon-provider-api) | |
1863 | ("maven-wagon-file" ,maven-wagon-file) | |
1864 | ("maven-resolver-api" ,maven-resolver-api) | |
1865 | ("maven-resolver-util" ,maven-resolver-util) | |
1866 | ("maven-resolver-spi" ,maven-resolver-spi) | |
1867 | ("java-plexus-interpolation" ,java-plexus-interpolation))) | |
1868 | (native-inputs | |
1869 | `(("java-modello-core" ,java-modello-core) | |
1870 | ("java-plexus-utils" ,java-plexus-utils) | |
1871 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
1872 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
1873 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) | |
1874 | ("java-sisu-build-api" ,java-sisu-build-api) | |
1875 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
1876 | ("java-exclispe-sisu-inject" ,java-eclipse-sisu-inject) | |
1877 | ("java-javax-inject" ,java-javax-inject) | |
1878 | ("java-guice" ,java-guice) | |
1879 | ("java-guava" ,java-guava) | |
1880 | ("java-cglib" ,java-cglib) | |
1881 | ("java-asm" ,java-asm) | |
1882 | ("java-modello-plugins-java" ,java-modello-plugins-java) | |
1883 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) | |
1884 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) | |
1885 | ;; metadata | |
1886 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) | |
1887 | ("java-commons-cli" ,java-commons-cli) | |
1888 | ("java-plexus-cli" ,java-plexus-cli) | |
1889 | ("java-jdom2" ,java-jdom2) | |
1890 | ("maven-plugin-api" ,maven-plugin-api) | |
1891 | ("java-qdox" ,java-qdox) | |
1892 | ;; tests | |
1893 | ("java-plexus-cipher" ,java-plexus-cipher) | |
1894 | ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) | |
de99ba7e | 1895 | ("java-jsr250" ,java-jsr250) |
0c1e98eb JL |
1896 | ("java-cdi-api" ,java-cdi-api) |
1897 | ("java-junit" ,java-junit) | |
1898 | ("maven-resolver-impl" ,maven-resolver-impl) | |
1899 | ("maven-resolver-connector-basic" ,maven-resolver-connector-basic) | |
1900 | ("maven-resolver-transport-wagon" ,maven-resolver-transport-wagon) | |
1901 | ("java-commons-lang3" ,java-commons-lang3) | |
1902 | ("java-aop" ,java-aopalliance) | |
1903 | ("maven-resolver-provider" ,maven-resolver-provider) | |
1904 | ("java-slf4j-api" ,java-slf4j-api) | |
1905 | ("java-slf4j-simple" ,java-slf4j-simple) | |
1906 | ,@(package-inputs java-slf4j-api))) | |
1907 | (description "Apache Maven is a software project management and comprehension | |
1908 | tool. This package contains Maven2 classes maintained as compatibility | |
1909 | layer for plugins that need to keep Maven2 compatibility."))) | |
8c2c105c JL |
1910 | |
1911 | (define-public maven | |
1912 | (package | |
1913 | (inherit maven-artifact) | |
1914 | (name "maven") | |
1915 | (arguments | |
1916 | `(#:phases | |
1917 | (modify-phases %standard-phases | |
1918 | (replace 'build | |
137bd983 JL |
1919 | (lambda* (#:key inputs #:allow-other-keys) |
1920 | ;; Recreate the configuration for the loader | |
1921 | (with-output-to-file "apache-maven/src/bin/m2.conf" | |
1922 | (lambda _ | |
1923 | (format #t "main is org.apache.maven.cli.MavenCli from plexus.core~%") | |
1924 | (format #t "~%") | |
1925 | (format #t "set maven.conf default ${maven.home}/conf~%") | |
1926 | (format #t "~%") | |
1927 | (format #t "[plexus.core]~%") | |
1928 | (format #t "load ${maven.conf}/logging~%") | |
1929 | (format #t "optionally ${maven.home}/lib/ext/*.jar~%") | |
1930 | ;; Reference every jar so plexus-classworlds can find them. | |
1931 | (for-each | |
1932 | (lambda (dependency) | |
51087d51 JL |
1933 | (for-each |
1934 | (lambda (file) | |
1935 | (format #t "load ~a~%" file)) | |
1936 | (find-files (assoc-ref inputs dependency) ".*.jar$"))) | |
137bd983 JL |
1937 | '("maven-artifact" "maven-embedder" "maven-core" "maven-compat" |
1938 | "maven-builder-support" "maven-model" "maven-model-builder" | |
1939 | "maven-settings" "maven-settings-builder" "maven-plugin-api" | |
1940 | "maven-repository-metadata" "maven-shared-utils" "maven-resolver-api" | |
1941 | "maven-resolver-spi" "maven-resolver-util" "maven-resolver-impl" | |
1942 | "maven-resolver-connector-basic" "maven-resolver-provider" | |
1943 | "maven-resolver-transport-wagon" "maven-wagon-provider-api" | |
1944 | "maven-wagon-file" "maven-wagon-http" "java-commons-logging-minimal" | |
1945 | "java-httpcomponents-httpclient" "java-httpcomponents-httpcore" | |
1946 | "maven-wagon-http-shared" "maven-wagon-tck-http" | |
1947 | "java-eclipse-sisu-plexus" "java-guice" "java-aopalliance" | |
1948 | "java-cglib" "java-asm" "java-eclipse-sisu-inject" | |
1949 | "java-javax-inject" "java-plexus-component-annotations" | |
1950 | "java-plexus-utils" "java-plexus-interpolation" | |
1951 | "java-plexus-sec-dispatcher" "java-plexus-cipher" "java-guava" | |
1952 | "java-jansi" "java-jsr250" "java-cdi-api" "java-commons-cli" | |
1953 | "java-commons-io" "java-commons-lang3" "java-slf4j-api" | |
1954 | "java-slf4j-simple")))) | |
8c2c105c JL |
1955 | (substitute* "apache-maven/src/bin/mvn" |
1956 | (("cygwin=false;") | |
1957 | (string-append | |
137bd983 JL |
1958 | "CLASSPATH=" |
1959 | (car (find-files | |
1960 | (assoc-ref inputs "java-plexus-classworlds") | |
1961 | ".*.jar")) | |
1962 | "\ncygwin=false;")) | |
8c2c105c JL |
1963 | (("-classpath.*") "-classpath ${CLASSPATH} \\\n")) |
1964 | #t)) | |
1965 | (delete 'check) | |
1966 | (replace 'install | |
1967 | (lambda* (#:key outputs #:allow-other-keys) | |
1968 | (let ((bin (string-append (assoc-ref outputs "out") "/bin/")) | |
1969 | (conf (string-append (assoc-ref outputs "out") "/conf/"))) | |
1970 | (mkdir-p (string-append (assoc-ref outputs "out") "/lib")) | |
1971 | (for-each (lambda (file) | |
1972 | (install-file (string-append "apache-maven/src/bin/" file) | |
1973 | bin) | |
1974 | (chmod (string-append bin file) #o755)) | |
1975 | '("mvn" "mvnDebug" "mvnyjp")) | |
1976 | (install-file "apache-maven/src/bin/m2.conf" bin) | |
1977 | (copy-recursively "apache-maven/src/conf" conf)) | |
1978 | #t))))) | |
1979 | (inputs | |
1980 | `(("java-plexus-classworlds" ,java-plexus-classworlds) | |
1981 | ("maven-artifact" ,maven-artifact) | |
1982 | ("maven-embedder" ,maven-embedder) | |
1983 | ("maven-core" ,maven-core) | |
1984 | ("maven-compat" ,maven-compat) | |
1985 | ("maven-builder-support" ,maven-builder-support) | |
1986 | ("maven-model" ,maven-model) | |
1987 | ("maven-model-builder" ,maven-model-builder) | |
1988 | ("maven-settings" ,maven-settings) | |
1989 | ("maven-settings-builder" ,maven-settings-builder) | |
1990 | ("maven-plugin-api" ,maven-plugin-api) | |
de99ba7e | 1991 | ("maven-repository-metadata" ,maven-repository-metadata) |
8c2c105c JL |
1992 | ("maven-shared-utils" ,maven-shared-utils) |
1993 | ("maven-resolver-api" ,maven-resolver-api) | |
1994 | ("maven-resolver-spi" ,maven-resolver-spi) | |
1995 | ("maven-resolver-util" ,maven-resolver-util) | |
1996 | ("maven-resolver-impl" ,maven-resolver-impl) | |
1997 | ("maven-resolver-connector-basic" ,maven-resolver-connector-basic) | |
1998 | ("maven-resolver-provider" ,maven-resolver-provider) | |
1999 | ("maven-resolver-transport-wagon" ,maven-resolver-transport-wagon) | |
2000 | ("maven-wagon-provider-api" ,maven-wagon-provider-api) | |
2001 | ("maven-wagon-file" ,maven-wagon-file) | |
2002 | ("maven-wagon-http" ,maven-wagon-http) | |
2003 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) | |
2004 | ("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) | |
2005 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) | |
2006 | ("maven-wagon-http-shared" ,maven-wagon-http-shared) | |
2007 | ("maven-wagon-tck-http" ,maven-wagon-tck-http) | |
2008 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
2009 | ("java-guice" ,java-guice) | |
2010 | ("java-aopalliance" ,java-aopalliance) | |
2011 | ("java-cglib" ,java-cglib) | |
2012 | ("java-asm" ,java-asm) | |
2013 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) | |
2014 | ("java-javax-inject" ,java-javax-inject) | |
2015 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
2016 | ("java-plexus-utils" ,java-plexus-utils) | |
2017 | ("java-plexus-interpolation" ,java-plexus-interpolation) | |
2018 | ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) | |
2019 | ("java-plexus-cipher" ,java-plexus-cipher) | |
2020 | ("java-guava" ,java-guava) | |
2021 | ("java-jansi" ,java-jansi) | |
2022 | ("java-jsr250" ,java-jsr250) | |
2023 | ("java-cdi-api" ,java-cdi-api) | |
2024 | ("java-commons-cli" ,java-commons-cli) | |
2025 | ("java-commons-io" ,java-commons-io) | |
2026 | ("java-commons-lang3" ,java-commons-lang3) | |
2027 | ("java-slf4j-api" ,java-slf4j-api) | |
2028 | ;; TODO: replace with maven-slf4j-provider | |
2029 | ("java-slf4j-simple" ,java-slf4j-simple))) | |
7504f3c3 JL |
2030 | (propagated-inputs |
2031 | `(("coreutils" ,coreutils) | |
2032 | ("which" ,which))) | |
8c2c105c JL |
2033 | (description "Apache Maven is a software project management and comprehension |
2034 | tool. Based on the concept of a project object model: builds, dependency | |
2035 | management, documentation creation, site publication, and distribution | |
2036 | publication are all controlled from the @file{pom.xml} declarative file. Maven | |
2037 | can be extended by plugins to utilise a number of other development tools for | |
2038 | reporting or the build process."))) | |
756e976e JL |
2039 | |
2040 | ;; Many plugins require maven 3.0 as a dependency. | |
2041 | (define maven-3.0-pom | |
2042 | (package | |
2043 | (inherit maven-pom) | |
2044 | (version "3.0") | |
2045 | (source (origin | |
2046 | (method git-fetch) | |
2047 | (uri (git-reference | |
2048 | (url "https://github.com/apache/maven") | |
2049 | (commit (string-append "maven-" version)))) | |
2050 | (file-name (git-file-name "maven" version)) | |
2051 | (sha256 | |
2052 | (base32 | |
2053 | "06jdwxx9w24shhv3kca80rlrikynn7kdqcrwg59lv2b7adpllwnh")) | |
2054 | (modules '((guix build utils))) | |
2055 | (snippet | |
2056 | '(begin | |
2057 | (for-each delete-file (find-files "." "\\.jar$")) | |
2058 | (for-each (lambda (file) (chmod file #o644)) | |
2059 | (find-files "." ".")) | |
2060 | #t)) | |
2061 | (patches | |
2062 | (search-patches "maven-generate-component-xml.patch" | |
2063 | "maven-generate-javax-inject-named.patch")))) | |
2064 | (propagated-inputs | |
2065 | `(("maven-parent-pom-15" ,maven-parent-pom-15))))) | |
2066 | ||
2067 | (define-public maven-3.0-artifact | |
2068 | (package | |
2069 | (inherit maven-artifact) | |
2070 | (version (package-version maven-3.0-pom)) | |
2071 | (source (package-source maven-3.0-pom)) | |
2072 | (propagated-inputs | |
2073 | (map | |
2074 | (lambda (input) | |
2075 | (if (equal? (car input) "maven-pom") | |
2076 | `("maven-pom" ,maven-3.0-pom) | |
2077 | input)) | |
2078 | (package-propagated-inputs maven-artifact))))) | |
b909d584 JL |
2079 | |
2080 | (define-public maven-3.0-model | |
2081 | (package | |
2082 | (inherit maven-model) | |
2083 | (version (package-version maven-3.0-pom)) | |
2084 | (source (package-source maven-3.0-pom)) | |
2085 | (propagated-inputs | |
2086 | (map | |
2087 | (lambda (input) | |
2088 | (if (equal? (car input) "maven-pom") | |
2089 | `("maven-pom" ,maven-3.0-pom) | |
2090 | input)) | |
2091 | (package-propagated-inputs maven-artifact))) | |
2092 | (arguments | |
2093 | `(#:jar-name "maven-model.jar" | |
2094 | #:source-dir "maven-model/src/main/java" | |
2095 | #:test-dir "maven-model/src/test" | |
2096 | #:modules | |
2097 | ((guix build ant-build-system) | |
2098 | (guix build java-utils) | |
2099 | (guix build syscalls) | |
2100 | (guix build utils)) | |
2101 | #:phases | |
2102 | (modify-phases %standard-phases | |
2103 | (add-after 'configure 'use-newer-model | |
2104 | (lambda* (#:key inputs #:allow-other-keys) | |
2105 | ;; The model has almost not changed, but the newer version is | |
2106 | ;; needed to prevent an error in the newer modello we have | |
2107 | (let ((source (assoc-ref inputs "maven-source")) | |
2108 | (dir (mkdtemp! "maven-source-XXXXXXXX"))) | |
2109 | (with-directory-excursion dir | |
2110 | (invoke "tar" "xf" source) | |
2111 | (copy-file (car (find-files "." "maven.mdo")) | |
2112 | "../maven-model/src/main/mdo/maven.mdo"))) | |
2113 | #t)) | |
2114 | (add-before 'build 'generate-models | |
2115 | (lambda* (#:key inputs #:allow-other-keys) | |
2116 | (define (modello-single-mode file version mode) | |
2117 | (invoke "java" "org.codehaus.modello.ModelloCli" | |
2118 | file mode "maven-model/src/main/java" version | |
2119 | "false" "true" "UTF-8")) | |
2120 | (let ((file "maven-model/src/main/mdo/maven.mdo")) | |
2121 | (modello-single-mode file "4.0.0" "java") | |
2122 | (modello-single-mode file "4.0.0" "xpp3-reader") | |
2123 | (modello-single-mode file "4.0.0" "xpp3-writer") | |
2124 | (modello-single-mode file "4.0.0" "xpp3-extended-reader")) | |
2125 | #t)) | |
2126 | (replace 'install | |
2127 | (install-from-pom "maven-model/pom.xml"))))) | |
2128 | (inputs | |
2129 | `(("maven-source" ,(package-source maven-pom)) | |
2130 | ,@(package-inputs maven-model))))) | |
ba58d208 JL |
2131 | |
2132 | (define-public maven-3.0-settings | |
2133 | (package | |
2134 | (inherit maven-settings) | |
2135 | (version (package-version maven-3.0-pom)) | |
2136 | (source (package-source maven-3.0-pom)) | |
2137 | (propagated-inputs | |
2138 | (map | |
2139 | (lambda (input) | |
2140 | (if (equal? (car input) "maven-pom") | |
2141 | `("maven-pom" ,maven-3.0-pom) | |
2142 | input)) | |
2143 | (package-propagated-inputs maven-settings))))) | |
b1cfac7a JL |
2144 | |
2145 | (define-public maven-3.0-settings-builder | |
2146 | (package | |
2147 | (inherit maven-settings-builder) | |
2148 | (version (package-version maven-3.0-pom)) | |
2149 | (source (package-source maven-3.0-pom)) | |
2150 | (propagated-inputs | |
2151 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
2152 | ,@(filter | |
2153 | (lambda (a) a) | |
2154 | (map | |
2155 | (lambda (input) | |
2156 | (match (car input) | |
2157 | ("maven-pom" `("maven-pom" ,maven-3.0-pom)) | |
2158 | ("maven-settings" `("maven-settings" ,maven-3.0-settings)) | |
2159 | ("maven-builder-support" #f) | |
2160 | (_ input))) | |
2161 | (package-propagated-inputs maven-settings-builder))))))) | |
279ec0c0 JL |
2162 | |
2163 | (define-public maven-3.0-model-builder | |
2164 | (package | |
2165 | (inherit maven-model-builder) | |
2166 | (version (package-version maven-3.0-pom)) | |
2167 | (source (package-source maven-3.0-pom)) | |
2168 | (propagated-inputs | |
2169 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
2170 | ,@(filter | |
2171 | (lambda (a) a) | |
2172 | (map | |
2173 | (lambda (input) | |
2174 | (match (car input) | |
2175 | ("maven-pom" `("maven-pom" ,maven-3.0-pom)) | |
2176 | ("maven-model" `("maven-model" ,maven-3.0-model)) | |
2177 | ("maven-artifact" `("maven-artifact" ,maven-3.0-artifact)) | |
2178 | ("maven-builder-support" #f) | |
2179 | (_ input))) | |
2180 | (package-propagated-inputs maven-model-builder))))))) | |
457efe29 JL |
2181 | |
2182 | (define-public maven-3.0-plugin-api | |
2183 | (package | |
2184 | (inherit maven-plugin-api) | |
2185 | (version (package-version maven-3.0-pom)) | |
2186 | (source (package-source maven-3.0-pom)) | |
2187 | (arguments | |
2188 | (substitute-keyword-arguments (package-arguments maven-plugin-api) | |
2189 | ((#:phases phases) | |
2190 | `(modify-phases ,phases | |
2191 | (add-before 'install 'fix-pom | |
2192 | (lambda _ | |
2193 | (substitute* "maven-plugin-api/pom.xml" | |
2194 | (("org.sonatype.sisu") "org.codehaus.plexus") | |
2195 | (("sisu-inject-plexus") "plexus-container-default")) | |
2196 | #t)))))) | |
2197 | (propagated-inputs | |
2198 | (map | |
2199 | (lambda (input) | |
2200 | (match (car input) | |
2201 | ("maven-pom" `("maven-pom" ,maven-3.0-pom)) | |
2202 | ("maven-artifact" `("maven-artifact" ,maven-3.0-artifact)) | |
2203 | ("maven-model" `("maven-model" ,maven-3.0-model)) | |
2204 | (_ input))) | |
2205 | (package-propagated-inputs maven-model-builder))) | |
2206 | (native-inputs | |
2207 | `(("java-plexus-container-default" ,java-plexus-container-default) | |
2208 | ,@(package-native-inputs maven-plugin-api))))) | |
721a00c0 JL |
2209 | |
2210 | (define-public maven-3.0-repository-metadata | |
2211 | (package | |
2212 | (inherit maven-repository-metadata) | |
2213 | (version (package-version maven-3.0-pom)) | |
2214 | (source (package-source maven-3.0-pom)) | |
2215 | (propagated-inputs | |
2216 | (map | |
2217 | (lambda (input) | |
2218 | (if (equal? (car input) "maven-pom") | |
2219 | `("maven-pom" ,maven-3.0-pom) | |
2220 | input)) | |
2221 | (package-propagated-inputs maven-repository-metadata))))) | |
65f0946a JL |
2222 | |
2223 | (define-public maven-3.0-aether-provider | |
2224 | (package | |
2225 | (inherit maven-3.0-pom) | |
2226 | (name "maven-aether-provider") | |
2227 | (arguments | |
2228 | `(#:jar-name "maven-aether-provider.jar" | |
2229 | #:source-dir "maven-aether-provider/src/main/java" | |
2230 | #:tests? #f; no tests in 3.0 | |
2231 | #:phases | |
2232 | (modify-phases %standard-phases | |
2233 | (add-after 'build 'generate-metadata | |
2234 | (lambda _ | |
2235 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
2236 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
2237 | "--source" "src/main/java" | |
2238 | "--output" "build/classes/META-INF/plexus/components.xml" | |
2239 | "--classes" "build/classes" | |
2240 | "--descriptors" "build/classes/META-INF") | |
2241 | #t)) | |
2242 | (add-after 'generate-metadata 'rebuild | |
2243 | (lambda _ | |
2244 | (invoke "ant" "jar") | |
2245 | #t)) | |
2246 | (replace 'install | |
2247 | (install-from-pom "maven-aether-provider/pom.xml"))))) | |
2248 | (propagated-inputs | |
2249 | `(("maven-model" ,maven-3.0-model) | |
2250 | ("maven-model-builder" ,maven-3.0-model-builder) | |
2251 | ("maven-repository-metadata" ,maven-3.0-repository-metadata) | |
2252 | ("java-sonatype-aether-api" ,java-sonatype-aether-api) | |
2253 | ("java-sonatype-aether-spi" ,java-sonatype-aether-spi) | |
2254 | ("java-sonatype-aether-impl" ,java-sonatype-aether-impl) | |
2255 | ("java-plexus-component-annotation" ,java-plexus-component-annotations) | |
2256 | ("java-plexus-utils" ,java-plexus-utils) | |
2257 | ("maven-pom" ,maven-3.0-pom))) | |
2258 | (native-inputs | |
2259 | `(("java-plexus-component-metadata" ,java-plexus-component-metadata))))) | |
6f852f3b JL |
2260 | |
2261 | (define-public maven-3.0-core | |
2262 | (package | |
2263 | (inherit maven-core) | |
2264 | (version (package-version maven-3.0-pom)) | |
2265 | (source (package-source maven-3.0-pom)) | |
2266 | (arguments | |
2267 | `(#:jar-name "maven-core.jar" | |
2268 | #:source-dir "src/main/java" | |
2269 | #:tests? #f | |
2270 | #:phases | |
2271 | (modify-phases %standard-phases | |
2272 | (add-before 'configure 'chdir | |
2273 | (lambda _ | |
2274 | ;; Required for generating components.xml in maven-core | |
2275 | (chdir "maven-core") | |
2276 | #t)) | |
2277 | (add-before 'build 'generate-models | |
2278 | (lambda* (#:key inputs #:allow-other-keys) | |
2279 | (define (modello-single-mode file version mode) | |
2280 | (invoke "java" "org.codehaus.modello.ModelloCli" | |
2281 | file mode "src/main/java" version | |
2282 | "false" "true" "UTF-8")) | |
2283 | (let ((file "src/main/mdo/toolchains.mdo")) | |
2284 | (modello-single-mode file "1.0.0" "java") | |
2285 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
2286 | (modello-single-mode file "1.0.0" "xpp3-writer")) | |
2287 | #t)) | |
2288 | (add-before 'build 'copy-resources | |
2289 | (lambda _ | |
2290 | (mkdir-p "build/classes/") | |
2291 | (copy-recursively "src/main/resources" "build/classes") | |
2292 | #t)) | |
2293 | (add-after 'build 'generate-metadata | |
2294 | (lambda _ | |
2295 | (define (components file) | |
2296 | (let ((sxml (with-input-from-file file | |
2297 | (lambda _ (xml->sxml (current-input-port) | |
2298 | #:trim-whitespace? #t))))) | |
2299 | ;; Select the list of <component>s inside the <component-set> | |
2300 | ;; and <components>. | |
2301 | ((@ (ice-9 match) match) sxml | |
2302 | (('*TOP* | |
2303 | ('*PI* foo ...) | |
2304 | ('component-set | |
2305 | ('components x ...))) x)))) | |
2306 | (use-modules (sxml simple)) | |
2307 | (delete-file "build/classes/META-INF/plexus/components.xml") | |
2308 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
2309 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
2310 | "--source" "build/classes/META-INF/plexus" | |
2311 | "--output" "build/classes/META-INF/plexus/components.t.xml" | |
2312 | "--classes" "build/classes" | |
2313 | "--descriptors" "build/classes") | |
2314 | ;; Now we merge all other components from hand-written xml | |
2315 | (let ((generated-xml (components "build/classes/META-INF/plexus/components.t.xml")) | |
2316 | (components-xml (components "src/main/resources/META-INF/plexus/components.xml")) | |
2317 | (artifact-handlers-xml (components "src/main/resources/META-INF/plexus/artifact-handlers.xml"))) | |
2318 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
2319 | (lambda _ | |
2320 | (display "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n") | |
2321 | (sxml->xml | |
2322 | `(component-set | |
2323 | (components | |
2324 | ,@(append generated-xml components-xml | |
2325 | artifact-handlers-xml))))))) | |
2326 | #t)) | |
2327 | (add-after 'generate-metadata 'rebuild | |
2328 | (lambda _ | |
2329 | (invoke "ant" "jar") | |
2330 | #t)) | |
2331 | (add-before 'install 'fix-pom | |
2332 | (lambda _ | |
2333 | (substitute* "pom.xml" | |
2334 | (("org.sonatype.sisu") "org.codehaus.plexus") | |
2335 | (("sisu-inject-plexus") "plexus-container-default")) | |
2336 | #t)) | |
2337 | (replace 'install | |
2338 | (install-from-pom "pom.xml"))))) | |
2339 | (propagated-inputs | |
2340 | `(("maven-model" ,maven-3.0-model) | |
2341 | ("maven-settings" ,maven-3.0-settings) | |
2342 | ("maven-settings-builder" ,maven-3.0-settings-builder) | |
2343 | ("maven-repository-metadata" ,maven-3.0-repository-metadata) | |
2344 | ("maven-artifact" ,maven-3.0-artifact) | |
2345 | ("maven-model-builder" ,maven-3.0-model-builder) | |
2346 | ("maven-aether-provider" ,maven-3.0-aether-provider) | |
2347 | ("java-sonatype-aether-impl" ,java-sonatype-aether-impl) | |
2348 | ("java-sonatype-aether-api" ,java-sonatype-aether-api) | |
2349 | ("java-sonatype-aether-util" ,java-sonatype-aether-util) | |
2350 | ("java-plexus-interpolation" ,java-plexus-interpolation) | |
2351 | ("java-plexus-utils" ,java-plexus-utils) | |
2352 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
2353 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
2354 | ("java-plexus-container-default" ,java-plexus-container-default) | |
2355 | ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) | |
2356 | ("maven-pom" ,maven-3.0-pom))))) | |
1203b94f JL |
2357 | |
2358 | (define-public maven-3.0-compat | |
2359 | (package | |
2360 | (inherit maven-compat) | |
2361 | (version (package-version maven-3.0-pom)) | |
2362 | (source (package-source maven-3.0-pom)) | |
2363 | (arguments | |
2364 | `(#:tests? #f ;require an old version of java-easymock | |
2365 | ,@(substitute-keyword-arguments (package-arguments maven-compat) | |
2366 | ((#:phases phases) | |
2367 | `(modify-phases ,phases | |
2368 | (add-before 'install 'fix-pom | |
2369 | (lambda _ | |
2370 | (substitute* "pom.xml" | |
2371 | (("org.sonatype.sisu") "org.codehaus.plexus") | |
2372 | (("sisu-inject-plexus") "plexus-container-default")) | |
2373 | #t)) | |
2374 | (delete 'build-tests)))))) | |
2375 | (propagated-inputs | |
2376 | `(("maven-model" ,maven-3.0-model) | |
2377 | ("maven-model-builder" ,maven-3.0-model-builder) | |
2378 | ("maven-settings" ,maven-3.0-settings) | |
2379 | ("maven-settings-builder" ,maven-3.0-settings-builder) | |
2380 | ("maven-artifact" ,maven-3.0-artifact) | |
2381 | ("maven-core" ,maven-3.0-core) | |
2382 | ("maven-aether-provider" ,maven-3.0-aether-provider) | |
2383 | ("maven-repository-metadata" ,maven-3.0-repository-metadata) | |
2384 | ("java-sonatype-aether-api" ,java-sonatype-aether-api) | |
2385 | ("java-sonatype-aether-util" ,java-sonatype-aether-util) | |
2386 | ("java-sonatype-aether-impl" ,java-sonatype-aether-impl) | |
2387 | ("java-plexus-utils" ,java-plexus-utils) | |
2388 | ("java-plexus-interpolation" ,java-plexus-interpolation) | |
2389 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) | |
2390 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
2391 | ("java-plexus-container-default" ,java-plexus-container-default) | |
2392 | ("maven-wagon-provider-api" ,maven-wagon-provider-api) | |
2393 | ("maven-pom" ,maven-3.0-pom))))) | |
708e0e1d JL |
2394 | |
2395 | (define-public maven-shared-utils-3.0 | |
2396 | (package | |
2397 | (inherit maven-shared-utils) | |
2398 | (version "3.0.0") | |
2399 | (source (origin | |
2400 | (method url-fetch) | |
2401 | (uri (string-append "https://archive.apache.org/dist/maven/shared/" | |
2402 | "maven-shared-utils-" version "-source-release.zip")) | |
2403 | (sha256 | |
2404 | (base32 | |
2405 | "0qm8y85kip2hyhnhlkqgj0rhmf83z07s7l7gzsfl5dzl3kvp8nal")))) | |
2406 | (propagated-inputs | |
2407 | `(("maven-core" ,maven-3.0-core) | |
2408 | ("maven-components-parent-pom" ,maven-components-parent-pom-21) | |
2409 | ,@(package-propagated-inputs maven-shared-utils))))) | |
ebaaad1d | 2410 | |
ef61b4a1 JL |
2411 | (define-public maven-shared-utils-3.1 |
2412 | (package | |
2413 | (inherit maven-shared-utils) | |
2414 | (version "3.1.0") | |
2415 | (source (origin | |
2416 | (method url-fetch) | |
2417 | (uri (string-append "https://archive.apache.org/dist/maven/shared/" | |
2418 | "maven-shared-utils-" version "-source-release.zip")) | |
2419 | (sha256 | |
2420 | (base32 | |
2421 | "0vfaas4g09ch0agrd1dcxcmhdd3w971ssvfr9mx9gi2lp5nv8w66")))))) | |
2422 | ||
ebaaad1d JL |
2423 | (define-public maven-shared-io |
2424 | (package | |
2425 | (name "maven-shared-io") | |
2426 | (version "3.0.0") | |
2427 | (source (origin | |
2428 | (method url-fetch) | |
2429 | (uri (string-append "mirror://apache/maven/shared/" | |
2430 | "maven-shared-io-" version | |
2431 | "-source-release.zip")) | |
2432 | (sha256 | |
2433 | (base32 | |
2434 | "0hsyll8gg581802xhs4achdz8fpmfz7y02abx9s4mb8bc6yfh229")))) | |
2435 | (build-system ant-build-system) | |
2436 | (arguments | |
2437 | `(#:jar-name "maven-shared-io.jar" | |
2438 | #:source-dir "src/main/java" | |
2439 | #:test-dir "src/test" | |
2440 | #:phases | |
2441 | (modify-phases %standard-phases | |
2442 | (add-before 'build 'copy-resources | |
2443 | (lambda _ | |
2444 | (copy-recursively "src/main/resources" "build/classes/") | |
2445 | (copy-recursively "src/test/resources" "build/test-classes/") | |
2446 | #t)) | |
2447 | (replace 'install | |
2448 | (install-from-pom "pom.xml"))))) | |
2449 | (propagated-inputs | |
2450 | `(("maven-artifact" ,maven-3.0-artifact) | |
2451 | ("maven-compat" ,maven-3.0-compat) | |
2452 | ("maven-plugin-api" ,maven-3.0-plugin-api) | |
2453 | ("maven-shared-utils" ,maven-shared-utils) | |
2454 | ("maven-wagon-provider-api" ,maven-wagon-provider-api) | |
2455 | ("java-plexus-utils" ,java-plexus-utils) | |
2456 | ("maven-components-parent-pom" ,maven-components-parent-pom-22))) | |
2457 | (native-inputs | |
2458 | `(("unzip" ,unzip) | |
2459 | ("java-junit" ,java-junit) | |
2460 | ("java-easymock" ,java-easymock))) | |
2461 | (home-page "https://maven.apache.org/shared/maven-dependency-tree") | |
2462 | (synopsis "Tree-based API for resolution of Maven project dependencies") | |
2463 | (description "This package provides a tree-based API for resolution of | |
2464 | Maven project dependencies.") | |
2465 | (license license:asl2.0))) | |
9f547318 JL |
2466 | |
2467 | (define-public maven-file-management | |
2468 | (package | |
2469 | (name "maven-file-management") | |
2470 | (version "3.0.0") | |
2471 | (source (origin | |
2472 | (method url-fetch) | |
2473 | (uri (string-append "mirror://apache/maven/shared/" | |
2474 | "file-management-" version | |
2475 | "-source-release.zip")) | |
2476 | (sha256 | |
2477 | (base32 | |
2478 | "0wisz6sm67axrwvx8a75mb9s03h7kzkzfw8j3aaa4sx4k9ph58da")))) | |
2479 | (build-system ant-build-system) | |
2480 | (arguments | |
2481 | `(#:jar-name "maven-file-management.jar" | |
2482 | #:source-dir "src/main/java" | |
2483 | #:phases | |
2484 | (modify-phases %standard-phases | |
2485 | (add-before 'build 'copy-resources | |
2486 | (lambda _ | |
2487 | (copy-recursively "src/main/resources" "build/classes/") | |
2488 | #t)) | |
2489 | (add-before 'build 'generate-models | |
2490 | (lambda* (#:key inputs #:allow-other-keys) | |
2491 | (define (modello-single-mode file version mode) | |
2492 | (invoke "java" | |
2493 | "org.codehaus.modello.ModelloCli" | |
2494 | file mode "src/main/java" version | |
2495 | "false" "true")) | |
2496 | (let ((file "src/main/mdo/fileset.mdo")) | |
2497 | (modello-single-mode file "1.1.0" "java") | |
2498 | (modello-single-mode file "1.1.0" "xpp3-reader") | |
2499 | (modello-single-mode file "1.1.0" "xpp3-writer")) | |
2500 | #t)) | |
2501 | (replace 'install | |
2502 | (install-from-pom "pom.xml"))))) | |
2503 | (propagated-inputs | |
2504 | `(("maven-plugin-api" ,maven-3.0-plugin-api) | |
2505 | ("maven-shared-io" ,maven-shared-io) | |
2506 | ("maven-shared-utils" ,maven-shared-utils) | |
2507 | ("java-plexus-utils" ,java-plexus-utils) | |
2508 | ("maven-components-parent-pom" ,maven-components-parent-pom-22))) | |
2509 | (native-inputs | |
2510 | `(("java-modello-core" ,java-modello-core) | |
2511 | ;; modello plugins: | |
2512 | ("java-modellop-plugins-java" ,java-modello-plugins-java) | |
2513 | ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3) | |
2514 | ("unzip" ,unzip))) | |
2515 | (home-page "https://maven.apache.org/shared/maven-dependency-tree") | |
2516 | (synopsis "Tree-based API for resolution of Maven project dependencies") | |
2517 | (description "This package provides a tree-based API for resolution of | |
2518 | Maven project dependencies.") | |
2519 | (license license:asl2.0))) | |
84ca4dbe JL |
2520 | |
2521 | (define-public maven-archiver | |
2522 | (package | |
2523 | (name "maven-archiver") | |
2524 | (version "3.5.0") | |
2525 | (source (origin | |
2526 | (method url-fetch) | |
2527 | (uri (string-append "mirror://apache/maven/shared/" | |
2528 | "maven-archiver-" version | |
2529 | "-source-release.zip")) | |
2530 | (sha256 | |
2531 | (base32 | |
2532 | "1204xkqj259brpk3yscprml0lbfbyn1vn5nrgqjk44z5vx127lbw")))) | |
2533 | (build-system ant-build-system) | |
2534 | (arguments | |
2535 | `(#:jar-name "maven-archiver.jar" | |
2536 | #:source-dir "src/main/java" | |
2537 | #:phases | |
2538 | (modify-phases %standard-phases | |
2539 | (replace 'install | |
2540 | (install-from-pom "pom.xml"))))) | |
2541 | (propagated-inputs | |
2542 | `(("java-commons-io" ,java-commons-io) | |
2543 | ("maven-artifact" ,maven-3.0-artifact) | |
2544 | ("maven-core" ,maven-3.0-core) | |
2545 | ("maven-model" ,maven-3.0-model) | |
2546 | ("maven-shared-utils" ,maven-shared-utils) | |
2547 | ("java-plexus-archiver" ,java-plexus-archiver) | |
2548 | ("java-plexus-interpolation" ,java-plexus-interpolation) | |
2549 | ("java-plexus-utils" ,java-plexus-utils) | |
2550 | ("maen-parent-pom" ,maven-parent-pom-33))) | |
2551 | (native-inputs | |
2552 | `(("java-junit" ,java-junit) | |
2553 | ("java-assertj" ,java-assertj) | |
2554 | ("unzip" ,unzip))) | |
2555 | (home-page "https://maven.apache.org/shared/maven-dependency-tree") | |
2556 | (synopsis "Tree-based API for resolution of Maven project dependencies") | |
2557 | (description "This package provides a tree-based API for resolution of | |
2558 | Maven project dependencies.") | |
2559 | (license license:asl2.0))) | |
24bdd150 JL |
2560 | |
2561 | (define-public maven-dependency-tree | |
2562 | (package | |
2563 | (name "maven-dependency-tree") | |
2564 | (version "3.0.1") | |
2565 | (source (origin | |
2566 | (method url-fetch) | |
2567 | (uri (string-append "mirror://apache/maven/shared/" | |
2568 | "maven-dependency-tree-" version | |
2569 | "-source-release.zip")) | |
2570 | (sha256 | |
2571 | (base32 | |
2572 | "0mxfslxvcmjs13jl30zhcg672j970dzn6ihh79w9ajh6sfqmlds2")))) | |
2573 | (build-system ant-build-system) | |
2574 | (arguments | |
2575 | `(#:jar-name "maven-dependency-tree.jar" | |
2576 | #:source-dir "src/main/java" | |
2577 | #:phases | |
2578 | (modify-phases %standard-phases | |
2579 | (replace 'install | |
2580 | (install-from-pom "pom.xml"))))) | |
2581 | (propagated-inputs | |
2582 | `(("maven-core" ,maven-3.0-core) | |
2583 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
2584 | ("maven-parent-pom" ,maven-parent-pom-30))) | |
2585 | (inputs | |
2586 | `(("java-sonatype-aether-api" ,java-sonatype-aether-api) | |
2587 | ("java-sonatype-aether-util" ,java-sonatype-aether-util) | |
2588 | ("java-eclipse-aether-api" ,java-eclipse-aether-api) | |
2589 | ("java-eclipse-aether-util" ,java-eclipse-aether-util))) | |
2590 | (native-inputs | |
2591 | `(("unzip" ,unzip) | |
2592 | ("java-junit" ,java-junit))) | |
2593 | (home-page "https://maven.apache.org/shared/maven-dependency-tree") | |
2594 | (synopsis "Tree-based API for resolution of Maven project dependencies") | |
2595 | (description "This package provides a tree-based API for resolution of | |
2596 | Maven project dependencies.") | |
2597 | (license license:asl2.0))) | |
ee1bed9d JL |
2598 | |
2599 | (define-public maven-common-artifact-filters | |
2600 | (package | |
2601 | (name "maven-common-artifact-filters") | |
2602 | (version "3.1.0") | |
2603 | (source (origin | |
2604 | (method url-fetch) | |
2605 | (uri (string-append "mirror://apache/maven/shared/" | |
2606 | "maven-common-artifact-filters-" version | |
2607 | "-source-release.zip")) | |
2608 | (sha256 | |
2609 | (base32 | |
2610 | "1cl1qk4r0gp62bjzfm7lml9raz1my2kd4yf0ci0lnfsn0h5qivnb")))) | |
2611 | (build-system ant-build-system) | |
2612 | (arguments | |
2613 | `(#:jar-name "maven-common-artifact-filters.jar" | |
2614 | #:source-dir "src/main/java" | |
2615 | #:tests? #f; require maven-plugin-testing-harness, which requires maven 3.2. | |
2616 | #:phases | |
2617 | (modify-phases %standard-phases | |
2618 | (add-before 'build 'remove-sisu | |
2619 | (lambda _ | |
2620 | ;; Replace sisu with an existing dependency, to prevent a failure | |
2621 | ;; when rewritting dependency versions | |
2622 | (substitute* "pom.xml" | |
2623 | (("sisu-inject-plexus") "maven-plugin-api") | |
2624 | (("org.sonatype.sisu") "org.apache.maven")) | |
2625 | #t)) | |
2626 | (replace 'install | |
2627 | (install-from-pom "pom.xml"))))) | |
2628 | (propagated-inputs | |
2629 | `(("maven-artifact" ,maven-3.0-artifact) | |
2630 | ("maven-model" ,maven-3.0-model) | |
2631 | ("maven-core" ,maven-3.0-core) | |
2632 | ("maven-plugin-api" ,maven-3.0-plugin-api) | |
2633 | ("maven-shared-utils" ,maven-shared-utils) | |
2634 | ("maven-parent-pom" ,maven-parent-pom-33) | |
2635 | ("java-sonatype-aether-api" ,java-sonatype-aether-api) | |
2636 | ("java-sonatype-aether-util" ,java-sonatype-aether-util))) | |
2637 | (inputs | |
2638 | `(("maven-resolver-api" ,maven-resolver-api) | |
2639 | ("maven-resolver-util" ,maven-resolver-util))) | |
2640 | (native-inputs | |
2641 | `(("unzip" ,unzip))) | |
2642 | (home-page "https://maven.apache.org/shared/maven-dependency-tree") | |
2643 | (synopsis "Tree-based API for resolution of Maven project dependencies") | |
2644 | (description "This package provides a tree-based API for resolution of | |
2645 | Maven project dependencies.") | |
2646 | (license license:asl2.0))) | |
c3951015 JL |
2647 | |
2648 | (define-public maven-enforcer-api | |
2649 | (package | |
2650 | (name "maven-enforcer-api") | |
2651 | (version "3.0.0-M3") | |
2652 | (source (origin | |
2653 | (method url-fetch) | |
2654 | (uri (string-append "mirror://apache/maven/enforcer/" | |
2655 | "enforcer-" version "-source-release.zip")) | |
2656 | (sha256 | |
2657 | (base32 | |
2658 | "014cwj0dqa69nnlzcin8pk9wsjmmg71vsbcpb16cibcjpm6h9wjg")) | |
2659 | (patches | |
2660 | (search-patches "maven-enforcer-api-fix-old-dependencies.patch")))) | |
2661 | (build-system ant-build-system) | |
2662 | (arguments | |
2663 | `(#:jar-name "maven-enforcer-api.jar" | |
2664 | #:source-dir "enforcer-api/src/main/java" | |
2665 | #:tests? #f; no tests | |
2666 | #:phases | |
2667 | (modify-phases %standard-phases | |
2668 | (replace 'install | |
2669 | (install-from-pom "enforcer-api/pom.xml"))))) | |
2670 | (propagated-inputs | |
2671 | `(("maven-plugin-api" ,maven-plugin-api) | |
2672 | ("java-plexus-container-default" ,java-plexus-container-default) | |
2673 | ("java-jsr305" ,java-jsr305) | |
2674 | ("maven-enforcer-parent-pom" ,maven-enforcer-parent-pom))) | |
2675 | (native-inputs | |
2676 | `(("unzip" ,unzip))) | |
2677 | (home-page "https://maven.apache.org/shared/maven-dependency-tree") | |
2678 | (synopsis "Tree-based API for resolution of Maven project dependencies") | |
2679 | (description "This package provides a tree-based API for resolution of | |
2680 | Maven project dependencies.") | |
2681 | (license license:asl2.0))) | |
2682 | ||
2683 | (define maven-enforcer-parent-pom | |
2684 | (package | |
2685 | (inherit maven-enforcer-api) | |
2686 | (name "maven-enforcer-parent-pom") | |
2687 | (arguments | |
2688 | `(#:tests? #f | |
2689 | #:phases | |
2690 | (modify-phases %standard-phases | |
2691 | (delete 'configure) | |
2692 | (delete 'build) | |
2693 | (replace 'install | |
2694 | (install-pom-file "pom.xml"))))) | |
2695 | (propagated-inputs | |
2696 | `(("maven-parent-pom" ,maven-parent-pom-30))))) | |
94261e7c JL |
2697 | |
2698 | (define-public maven-enforcer-rules | |
2699 | (package | |
2700 | (inherit maven-enforcer-api) | |
2701 | (name "maven-enforcer-rules") | |
2702 | (arguments | |
2703 | `(#:tests? #f; requires maven-plugin-testing-harness | |
2704 | #:jar-name "maven-enforcer-rules.jar" | |
2705 | #:source-dir "enforcer-rules/src/main/java" | |
2706 | #:test-dir "enforcer-rules/src/test" | |
2707 | #:phases | |
2708 | (modify-phases %standard-phases | |
2709 | (replace 'install | |
2710 | (install-from-pom "enforcer-rules/pom.xml"))))) | |
2711 | (propagated-inputs | |
2712 | `(("maven-artifact" ,maven-artifact) | |
2713 | ("maven-plugin-api" ,maven-plugin-api) | |
2714 | ("maven-core" ,maven-core) | |
2715 | ("maven-common-artifact-filters" ,maven-common-artifact-filters) | |
2716 | ("java-commons-codec" ,java-commons-codec) | |
2717 | ("java-commons-lang3" ,java-commons-lang3) | |
2718 | ("maven-enforcer-api" ,maven-enforcer-api) | |
2719 | ("maven-resolver-util" ,maven-resolver-util) | |
2720 | ("java-bsh" ,java-bsh) | |
2721 | ("maven-dependency-tree" ,maven-dependency-tree) | |
2722 | ("maven-compat" ,maven-3.0-compat) | |
2723 | ("maven-enforcer-parent-pom" ,maven-enforcer-parent-pom))))) | |
e244157b JL |
2724 | |
2725 | (define-public maven-enforcer-plugin | |
2726 | (package | |
2727 | (inherit maven-enforcer-api) | |
2728 | (name "maven-enforcer-plugin") | |
2729 | (arguments | |
2730 | `(#:tests? #f | |
2731 | #:jar-name "maven-enforcer-plugin.jar" | |
2732 | #:source-dir "maven-enforcer-plugin/src/main/java" | |
2733 | #:phases | |
2734 | (modify-phases %standard-phases | |
2735 | (add-before 'build 'generate-plugin.xml | |
2736 | (generate-plugin.xml "maven-enforcer-plugin/pom.xml" | |
2737 | "enforcer" | |
2738 | "maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/" | |
2739 | (list | |
2740 | (list "DisplayInfoMojo.java") | |
2741 | (list "EnforceMojo.java")))) | |
2742 | (replace 'install | |
2743 | (install-from-pom "maven-enforcer-plugin/pom.xml"))))) | |
2744 | (propagated-inputs | |
2745 | `(("maven-artifact" ,maven-artifact) | |
2746 | ("maven-plugin-api" ,maven-plugin-api) | |
2747 | ("maven-core" ,maven-core) | |
2748 | ("java-plexus-utils" ,java-plexus-utils) | |
2749 | ("maven-enforcer-api" ,maven-enforcer-api) | |
2750 | ("maven-enforcer-rules" ,maven-enforcer-rules) | |
2751 | ("maven-plugin-annotations" ,maven-plugin-annotations) | |
2752 | ("maven-enforcer-parent-pom" ,maven-enforcer-parent-pom))))) | |
ea806229 JL |
2753 | |
2754 | (define-public maven-artifact-transfer | |
2755 | (package | |
2756 | (name "maven-artifact-transfer") | |
2757 | (version "0.12.0") | |
2758 | (source (origin | |
2759 | (method url-fetch) | |
2760 | (uri (string-append "mirror://apache/maven/shared/" | |
2761 | "maven-artifact-transfer-" version | |
2762 | "-source-release.zip")) | |
2763 | (sha256 | |
2764 | (base32 | |
2765 | "0mkdjr3wnvaxqaq68sy7h4mqlq3xgwwp5s2anj5vbxfy4bsc1ivj")))) | |
2766 | (build-system ant-build-system) | |
2767 | (arguments | |
2768 | `(#:tests? #f; require mockito 2 | |
2769 | #:jar-name "maven-artifact-transfer.jar" | |
2770 | #:source-dir "src/main/java" | |
2771 | #:phases | |
2772 | (modify-phases %standard-phases | |
2773 | (add-after 'build 'generate-metadata | |
2774 | (lambda _ | |
2775 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
2776 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
2777 | "--source" "src/main/java" | |
2778 | "--output" "build/classes/META-INF/plexus/components.xml" | |
2779 | "--classes" "build/classes" | |
2780 | "--descriptors" "build/classes/META-INF") | |
2781 | #t)) | |
2782 | (add-after 'generate-metadata 'rebuild | |
2783 | (lambda _ | |
2784 | (invoke "ant" "jar") | |
2785 | #t)) | |
2786 | (replace 'install | |
2787 | (install-from-pom "pom.xml"))))) | |
2788 | (propagated-inputs | |
2789 | `(("java-commons-codec" ,java-commons-codec) | |
2790 | ("maven-artifact" ,maven-3.0-artifact) | |
2791 | ("maven-core" ,maven-3.0-core) | |
2792 | ("maven-common-artifact-filters" ,maven-common-artifact-filters) | |
2793 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
2794 | ("java-plexus-utils" ,java-plexus-utils) | |
2795 | ("java-slf4j-api" ,java-slf4j-api) | |
2796 | ("java-plexus-classworlds" ,java-plexus-classworlds) | |
2797 | ("java-sonatype-aether-api" ,java-sonatype-aether-api) | |
2798 | ("java-eclipse-aether-api" ,java-eclipse-aether-api) | |
2799 | ("java-eclipse-aether-util" ,java-eclipse-aether-util) | |
2800 | ("java-eclipse-aether-impl" ,java-eclipse-aether-impl))) | |
2801 | (native-inputs | |
2802 | `(("unzip" ,unzip) | |
2803 | ("java-plexus-component-metadata" ,java-plexus-component-metadata))) | |
2804 | (home-page "https://maven.apache.org/shared/maven-artifact-transfer") | |
2805 | (synopsis "API to install, deploy and resolve artifacts in Maven") | |
2806 | (description "This package contains an API to install, deploy and resolve | |
2807 | artifacts in Maven 3.") | |
2808 | (license license:asl2.0))) | |
ebe6e6f5 JL |
2809 | |
2810 | (define-public maven-install-plugin | |
2811 | (package | |
2812 | (name "maven-install-plugin") | |
2813 | (version "3.0.0-M1") | |
2814 | (source (origin | |
2815 | (method url-fetch) | |
2816 | (uri (string-append "mirror://apache/maven/plugins/" | |
2817 | "maven-install-plugin-" version | |
2818 | "-source-release.zip")) | |
2819 | (sha256 | |
2820 | (base32 | |
2821 | "1l9iydxririrair0i5sk2iypn9wspzbb666lc0ddg20yyr8w39dm")))) | |
2822 | (build-system ant-build-system) | |
2823 | (arguments | |
2824 | `(#:tests? #f; require maven-plugin-testing-harness | |
2825 | #:jar-name "maven-install-plugin.jar" | |
2826 | #:source-dir "src/main/java" | |
2827 | #:phases | |
2828 | (modify-phases %standard-phases | |
2829 | (add-before 'build 'fix-pom | |
2830 | (lambda _ | |
2831 | (substitute* "pom.xml" | |
2832 | (("maven-project") "maven-core") | |
2833 | (("maven-artifact-manager") "maven-artifact") | |
2834 | (("2.0.6") "3.0")) | |
2835 | #t)) | |
2836 | (add-before 'build 'generate-plugin.xml | |
2837 | (generate-plugin.xml "pom.xml" | |
2838 | "install" | |
2839 | "src/main/java/org/apache/maven/plugins/install" | |
2840 | (list | |
2841 | (list "AbstractInstallMojo.java" "InstallFileMojo.java") | |
2842 | (list "AbstractInstallMojo.java" "InstallMojo.java")))) | |
2843 | (replace 'install | |
2844 | (install-from-pom "pom.xml"))))) | |
2845 | (propagated-inputs | |
2846 | `(("maven-artifact" ,maven-artifact) | |
2847 | ("maven-plugin-api" ,maven-plugin-api) | |
2848 | ("maven-compat" ,maven-compat) | |
2849 | ("maven-artifact-transfer" ,maven-artifact-transfer) | |
2850 | ("maven-plugins-pom-23" ,maven-plugins-pom-23) | |
2851 | ("java-plexus-digest" ,java-plexus-digest))) | |
2852 | (inputs | |
2853 | `(("maven-plugin-annotations" ,maven-plugin-annotations) | |
2854 | ("java-slf4j-api" ,java-slf4j-api))) | |
2855 | (native-inputs | |
2856 | `(("unzip" ,unzip))) | |
2857 | (home-page "https://maven.apache.org/plugin/maven-install-plugin") | |
2858 | (synopsis "Maven's install plugin") | |
2859 | (description "The Install Plugin is used during the install phase to add | |
2860 | artifact(s) to the local repository. The Install Plugin uses the information | |
2861 | in the POM (groupId, artifactId, version) to determine the proper location for | |
2862 | the artifact within the local repository. | |
2863 | ||
2864 | The local repository is the local cache where all artifacts needed for the | |
2865 | build are stored. By default, it is located within the user's home directory | |
2866 | (@file{~/.m2/repository}) but the location can be configured in | |
2867 | @file{~/.m2/settings.xml} using the @code{<localRepository>} element.") | |
2868 | (license license:asl2.0))) | |
f0e3e6ca JL |
2869 | |
2870 | (define-public maven-filtering | |
2871 | (package | |
2872 | (name "maven-filtering") | |
2873 | (version "3.1.1") | |
2874 | (source (origin | |
2875 | (method url-fetch) | |
2876 | (uri (string-append "https://archive.apache.org/dist/maven/" | |
2877 | "shared/maven-filtering-" version | |
2878 | "-source-release.zip")) | |
2879 | (sha256 | |
2880 | (base32 | |
2881 | "09wrdhchnszd2l6h4z30ra0bv1a19qyjgac9z8zf1pn0m4nw05yz")))) | |
2882 | (build-system ant-build-system) | |
2883 | (arguments | |
2884 | `(#:jar-name "maven-filtering.jar" | |
2885 | #:source-dir "src/main/java" | |
2886 | #:test-dir "src/test" | |
2887 | ;; this test comes from sisu-build-api, not this package | |
2888 | #:test-exclude (list "**/IncrementalResourceFilteringTest.java" | |
2889 | "**/Abstract*.java") | |
2890 | #:phases | |
2891 | (modify-phases %standard-phases | |
2892 | (add-after 'build 'generate-metadata | |
2893 | (lambda _ | |
2894 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
2895 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
2896 | "--source" "src/main/java" | |
2897 | "--output" "build/classes/META-INF/plexus/components.xml" | |
2898 | "--classes" "build/classes" | |
2899 | "--descriptors" "build/classes/META-INF") | |
2900 | #t)) | |
2901 | (add-after 'generate-metadata 'rebuild | |
2902 | (lambda _ | |
2903 | (invoke "ant" "jar") | |
2904 | #t)) | |
2905 | (add-before 'check 'decompress-tests | |
2906 | (lambda* (#:key inputs #:allow-other-keys) | |
2907 | (let* ((build-api-source (assoc-ref inputs "java-sisu-build-api-origin")) | |
2908 | (classes (string-append build-api-source "/src/test/java"))) | |
2909 | (copy-recursively classes "src/test/")) | |
2910 | #t)) | |
2911 | (add-before 'check 'fix-directory | |
2912 | (lambda _ | |
2913 | (substitute* (find-files "src/test" ".*.java$") | |
2914 | (("target/test-classes/") "build/test-classes/")))) | |
2915 | (add-before 'check 'copy-test-resources | |
2916 | (lambda _ | |
2917 | (copy-recursively "src/test/resources" "build/test-classes/") | |
2918 | #t)) | |
2919 | (replace 'install | |
2920 | (install-from-pom "pom.xml"))))) | |
2921 | (propagated-inputs | |
2922 | `(("maven-core" ,maven-3.0-core) | |
2923 | ("maven-shared-utils" ,maven-shared-utils) | |
2924 | ("java-plexus-utils" ,java-plexus-utils) | |
2925 | ("java-plexus-interpolation" ,java-plexus-interpolation) | |
2926 | ("java-sisu-build-api" ,java-sisu-build-api) | |
2927 | ("maven-parent-pom" ,maven-parent-pom-30))) | |
2928 | (inputs | |
2929 | `(("java-jsr305" ,java-jsr305))) | |
2930 | (native-inputs | |
2931 | `(("unzip" ,unzip) | |
2932 | ("java-assertj" ,java-assertj) | |
2933 | ("java-junit" ,java-junit) | |
2934 | ("java-mockito" ,java-mockito-1) | |
2935 | ("java-objenesis" ,java-objenesis) | |
2936 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) | |
2937 | ("java-sisu-build-api-origin" ,(package-source java-sisu-build-api)))) | |
2938 | (home-page "https://maven.apache.org/shared/maven-filtering") | |
2939 | (synopsis "Shared component for all plugins that needs to filter resources") | |
2940 | (description "This component provides an API to filter resources in Maven | |
2941 | projects.") | |
2942 | (license license:asl2.0))) | |
5bebb1e8 JL |
2943 | |
2944 | (define-public maven-resources-plugin | |
2945 | (package | |
2946 | (name "maven-resources-plugin") | |
2947 | (version "3.1.0") | |
2948 | (source (origin | |
7cd50ad7 EF |
2949 | (method git-fetch) |
2950 | (uri (git-reference | |
2951 | (url "https://github.com/apache/maven-resources-plugin") | |
2952 | (commit (string-append "maven-resources-plugin-" version)))) | |
2953 | (file-name (git-file-name name version)) | |
5bebb1e8 JL |
2954 | (sha256 |
2955 | (base32 | |
7cd50ad7 | 2956 | "090k5j2y7ak54czfjjg3v7pdmdlgd96fbs91d1fd3vslm9zzndg8")))) |
5bebb1e8 JL |
2957 | (build-system ant-build-system) |
2958 | (arguments | |
2959 | `(#:jar-name "maven-resources-plugin.jar" | |
2960 | #:source-dir "src/main/java" | |
2961 | #:test-dir "src/test" | |
2962 | #:tests? #f; test depends on maven-plugin-test-harness | |
2963 | #:phases | |
2964 | (modify-phases %standard-phases | |
2965 | (add-before 'build 'generate-plugin.xml | |
2966 | (generate-plugin.xml "pom.xml" "resources" | |
2967 | "src/main/java/org/apache/maven/plugins/resources" | |
2968 | (list | |
2969 | (list "ResourcesMojo.java" "CopyResourcesMojo.java") | |
2970 | (list "ResourcesMojo.java") | |
2971 | (list "ResourcesMojo.java" "TestResourcesMojo.java")))) | |
2972 | (replace 'install | |
2973 | (install-from-pom "pom.xml"))))) | |
2974 | (propagated-inputs | |
2975 | `(("maven-plugin-api" ,maven-plugin-api) | |
2976 | ("maven-core" ,maven-core) | |
2977 | ("java-plexus-utils" ,java-plexus-utils) | |
2978 | ("maven-filtering" ,maven-filtering) | |
2979 | ("java-plexus-interpolation" ,java-plexus-interpolation) | |
2980 | ("maven-parent-pom" ,maven-parent-pom-31))) | |
2981 | (inputs | |
2982 | `(("maven-plugin-annotations" ,maven-plugin-annotations) | |
2983 | ("java-commons-io" ,java-commons-io))) | |
2984 | (native-inputs | |
2985 | `(("java-plexus-component-metadata" ,java-plexus-component-metadata))) | |
2986 | (home-page "https://maven.apache.org/plugins/maven-resources-plugin") | |
2987 | (synopsis "Maven plugin to collect and install resources") | |
2988 | (description "The Resources Plugin handles the copying of project resources | |
2989 | to the output directory. There are two different kinds of resources: main | |
2990 | resources and test resources. The difference is that the main resources are | |
2991 | the resources associated to the main source code while the test resources are | |
2992 | associated to the test source code. | |
2993 | ||
2994 | Thus, this allows the separation of resources for the main source code and its | |
2995 | unit tests.") | |
2996 | (license license:asl2.0))) | |
c45e7ee6 JL |
2997 | |
2998 | (define-public maven-shared-incremental | |
2999 | (package | |
3000 | (name "maven-shared-incremental") | |
3001 | (version "1.1") | |
3002 | (source (origin | |
3003 | (method url-fetch) | |
3004 | (uri (string-append "https://archive.apache.org/dist/maven/shared/" | |
3005 | "maven-shared-incremental-" version | |
3006 | "-source-release.zip")) | |
3007 | (sha256 | |
3008 | (base32 | |
3009 | "03n4nfswyg9ahkz2zx4skcr3ghs01zh95g9js51hc75mfqx9b976")))) | |
3010 | (build-system ant-build-system) | |
3011 | (arguments | |
3012 | `(#:jar-name "shared-incremental.java" | |
3013 | #:source-dir "src/main/java" | |
3014 | #:test-dir "src/test" | |
3015 | #:phases | |
3016 | (modify-phases %standard-phases | |
3017 | (add-before 'build 'change-parent | |
3018 | (lambda _ | |
3019 | (substitute* "pom.xml" | |
3020 | (("19") "30")) | |
3021 | #t)) | |
3022 | (add-before 'build 'fix-pom | |
3023 | (lambda _ | |
3024 | (substitute* "pom.xml" | |
3025 | (("plexus-component-api") "plexus-component-annotations")) | |
3026 | #t)) | |
3027 | (add-after 'build 'generate-metadata | |
3028 | (lambda _ | |
3029 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
3030 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
3031 | "--source" "src/main/java" | |
3032 | "--output" "build/classes/META-INF/plexus/components.xml" | |
3033 | "--classes" "build/classes" | |
3034 | "--descriptors" "build/classes/META-INF") | |
3035 | #t)) | |
3036 | (replace 'install | |
3037 | (install-from-pom "pom.xml"))))) | |
3038 | (propagated-inputs | |
3039 | `(("maven-plugin-api" ,maven-plugin-api) | |
3040 | ("maven-core" ,maven-core) | |
3041 | ("maven-shared-utils" ,maven-shared-utils) | |
3042 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) | |
3043 | ("maven-parent-pom" ,maven-parent-pom-30))) | |
3044 | (native-inputs | |
3045 | `(("unzip" ,unzip) | |
3046 | ("java-plexus-component-metadata" ,java-plexus-component-metadata))) | |
3047 | (home-page "https://maven.apache.org/shared/maven-shared-incremental") | |
3048 | (synopsis "Maven Incremental Build support utilities") | |
3049 | (description "This package contains various utility classes and plexus | |
3050 | components for supporting incremental build functionality in maven plugins.") | |
3051 | (license license:asl2.0))) | |
dd607254 JL |
3052 | |
3053 | (define-public maven-compiler-plugin | |
3054 | (package | |
3055 | (name "maven-compiler-plugin") | |
3056 | (version "3.8.1") | |
3057 | (source (origin | |
276ab588 EF |
3058 | (method git-fetch) |
3059 | (uri (git-reference | |
3060 | (url "https://github.com/apache/maven-compiler-plugin") | |
3061 | (commit (string-append "maven-compiler-plugin-" version)))) | |
3062 | (file-name (git-file-name name version)) | |
dd607254 JL |
3063 | (sha256 |
3064 | (base32 | |
276ab588 | 3065 | "0jkbq02vykd09ws8k9bzqxv6fjrpmir8gcxydbmj05kkhl242bma")))) |
dd607254 JL |
3066 | (build-system ant-build-system) |
3067 | (arguments | |
3068 | `(#:jar-name "maven-compiler-plugin.jar" | |
3069 | #:source-dir "src/main/java" | |
3070 | #:test-dir "src/test" | |
3071 | #:tests? #f; test depends on maven-plugin-test-harness | |
3072 | #:phases | |
3073 | (modify-phases %standard-phases | |
3074 | (add-before 'build 'generate-plugin.xml | |
3075 | (generate-plugin.xml "pom.xml" | |
3076 | "compiler" | |
3077 | "src/main/java/org/apache/maven/plugin/compiler" | |
3078 | (list | |
3079 | (list "AbstractCompilerMojo.java" "CompilerMojo.java") | |
3080 | (list "AbstractCompilerMojo.java" "TestCompilerMojo.java")))) | |
3081 | (add-after 'generate-plugin.xml 'fix-plugin.xml | |
3082 | (lambda _ | |
3083 | (substitute* "build/classes/META-INF/maven/plugin.xml" | |
3084 | ;; These are defined in AbstractCompilerMojo.java, but not | |
3085 | ;; parsed correctly in the previous phase | |
3086 | (("DEFAULT_TARGET") "1.6") | |
3087 | (("DEFAULT_SOURCE") "1.6")) | |
3088 | #t)) | |
3089 | (replace 'install | |
3090 | (install-from-pom "pom.xml"))))) | |
3091 | (propagated-inputs | |
3092 | `(("maven-plugin-api" ,maven-plugin-api) | |
3093 | ("maven-artifact" ,maven-artifact) | |
3094 | ("maven-core" ,maven-core) | |
3095 | ("maven-shared-utils" ,maven-shared-utils) | |
3096 | ("maven-shared-incremental" ,maven-shared-incremental) | |
3097 | ("java-plexus-java" ,java-plexus-java) | |
3098 | ("java-plexus-compiler-api" ,java-plexus-compiler-api) | |
3099 | ("java-plexus-compiler-manager" ,java-plexus-compiler-manager) | |
3100 | ("java-plexus-compiler-javac" ,java-plexus-compiler-javac) | |
3101 | ("maven-parent-pom" ,maven-parent-pom-33))) | |
3102 | (inputs | |
3103 | `(("maven-plugin-annotations" ,maven-plugin-annotations) | |
3104 | ("java-commons-io" ,java-commons-io))) | |
3105 | (home-page "https://maven.apache.org/plugins/maven-compiler-plugin") | |
3106 | (synopsis "Compiler plugin for Maven") | |
3107 | (description "The Compiler Plugin is used to compile the sources of your | |
3108 | project. Since 3.0, the default compiler is @code{javax.tools.JavaCompiler} | |
3109 | (if you are using java 1.6) and is used to compile Java sources. If you want | |
3110 | to force the plugin using javac, you must configure the plugin option | |
3111 | @code{forceJavacCompilerUse}. | |
3112 | ||
3113 | Also note that at present the default source setting is 1.6 and the default | |
3114 | target setting is 1.6, independently of the JDK you run Maven with. You are | |
3115 | highly encouraged to change these defaults by setting source and target as | |
3116 | described in Setting the -source and -target of the Java Compiler. | |
3117 | ||
3118 | Other compilers than javac can be used and work has already started on | |
3119 | AspectJ, .NET, and C#.") | |
3120 | (license license:asl2.0))) | |
2a08d8ff JL |
3121 | |
3122 | (define-public java-surefire-logger-api | |
3123 | (package | |
3124 | (name "java-surefire-logger-api") | |
3125 | (version "3.0.0-M4") | |
3126 | (source (origin | |
3127 | (method url-fetch) | |
3128 | (uri (string-append "mirror://apache/maven/surefire/" | |
3129 | "surefire-" version "-source-release.zip")) | |
3130 | (sha256 | |
3131 | (base32 | |
3132 | "1s6d4pzk3bjm9l38mj9sfgbgmk145rppdj1dmqwc4d5105mr9q9w")))) | |
3133 | (build-system ant-build-system) | |
3134 | (arguments | |
3135 | `(#:jar-name "java-surefire-logger-api.jar" | |
3136 | #:source-dir "surefire-logger-api/src/main/java" | |
3137 | #:tests? #f; require mockito 2 | |
3138 | #:phases | |
3139 | (modify-phases %standard-phases | |
3140 | (replace 'install | |
3141 | (install-from-pom "surefire-logger-api/pom.xml"))))) | |
3142 | (propagated-inputs | |
3143 | `(("java-surefire-parent-pom" ,java-surefire-parent-pom))) | |
3144 | (native-inputs | |
3145 | `(("unzip" ,unzip))) | |
3146 | (home-page "https://maven.apache.org/surefire/surefire-logger-api") | |
3147 | (synopsis "Interfaces and Utilities related only to internal SureFire Logger API") | |
3148 | (description "This package contains interfaces and utilities that are | |
3149 | internal to the SureFire Logger API. It is designed to have no dependency.") | |
3150 | (license license:asl2.0))) | |
3151 | ||
3152 | (define-public java-surefire-parent-pom | |
3153 | (package | |
3154 | (inherit java-surefire-logger-api) | |
3155 | (name "java-surefire-parent-pom") | |
3156 | (arguments | |
3157 | `(#:tests? #f | |
3158 | #:phases | |
3159 | (modify-phases %standard-phases | |
3160 | (delete 'configure) | |
3161 | (delete 'build) | |
3162 | (add-before 'install 'fix-pom-dependency-versions | |
3163 | (lambda _ | |
3164 | (substitute* "pom.xml" | |
3165 | (("1.11") ,(package-version java-commons-compress)) | |
3166 | (("1.13") ,(package-version java-commons-codec))) | |
3167 | (substitute* "pom.xml" | |
3168 | (("commonsLang3Version>.*") | |
3169 | (string-append | |
3170 | "commonsLang3Version>" | |
3171 | ,(package-version java-commons-lang3) | |
3172 | "</commonsLang3Version>\n")) | |
3173 | (("commonsCompress>.*") | |
3174 | (string-append | |
3175 | "commonsCompress>" | |
3176 | ,(package-version java-commons-compress) | |
3177 | "</commonsCompress>\n")) | |
3178 | (("commonsIoVersion>.*") | |
3179 | (string-append | |
3180 | "commonsIoVersion>" | |
3181 | ,(package-version java-commons-io) | |
3182 | "</commonsIoVersion>\n")) | |
3183 | (("0.11.0") ,(package-version maven-artifact-transfer)) | |
3184 | (("1.0.3") ,(package-version java-plexus-java))) | |
3185 | #t)) | |
3186 | (add-after 'install 'install-providers | |
3187 | (install-pom-file "surefire-providers/pom.xml")) | |
3188 | (replace 'install | |
3189 | (install-pom-file "pom.xml"))))) | |
3190 | (propagated-inputs | |
3191 | `(("maven-parent-pom" ,maven-parent-pom-33))))) | |
ac8179a0 JL |
3192 | |
3193 | (define-public java-surefire-api | |
3194 | (package | |
3195 | (inherit java-surefire-logger-api) | |
3196 | (name "java-surefire-api") | |
3197 | (arguments | |
3198 | `(#:tests? #f | |
3199 | #:jar-name "java-surefire-api.jar" | |
3200 | #:source-dir "surefire-api/src/main/java" | |
3201 | #:phases | |
3202 | (modify-phases %standard-phases | |
3203 | (add-before 'build 'copy-resources | |
3204 | (lambda _ | |
3205 | (mkdir-p "build/classes") | |
3206 | (copy-recursively "surefire-api/src/main/resources" "build/classes") | |
3207 | #t)) | |
3208 | (add-before 'build 'prepare-shade | |
3209 | (lambda* (#:key inputs #:allow-other-keys) | |
3210 | (mkdir-p "build/classes") | |
3211 | (with-directory-excursion "build/classes" | |
3212 | (for-each | |
3213 | (lambda (input) | |
3214 | (for-each | |
3215 | (lambda (jar-file) | |
3216 | (invoke "jar" "xf" jar-file) | |
3217 | (delete-file-recursively "META-INF")) | |
3218 | (find-files (assoc-ref inputs input) ".*.jar$"))) | |
3219 | '("maven-shared-utils" "java-commons-codec"))) | |
3220 | #t)) | |
3221 | (add-after 'build 'shade | |
3222 | (lambda* (#:key inputs #:allow-other-keys) | |
3223 | (let ((jarjar | |
3224 | (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$"))) | |
3225 | (injar "java-surefire-api.jar") | |
3226 | (outjar "java-surefire-api-shaded.jar")) | |
3227 | (with-directory-excursion "build/jar" | |
3228 | (with-output-to-file "rules" | |
3229 | (lambda _ | |
3230 | (format #t (string-append | |
3231 | "rule " | |
3232 | "org.apache.maven.shared.utils.** " | |
3233 | "org.apache.maven.surefire.shade.api." | |
3234 | "org.apache.maven.shared.utils.@1~%")) | |
3235 | (format #t (string-append | |
3236 | "rule " | |
3237 | "org.apache.commons.codec.** " | |
3238 | "org.apache.maven.surefire.shade.api." | |
3239 | "org.apache.commons.codec.@1~%")))) | |
3240 | (invoke "java" "-jar" jarjar "process" "rules" injar outjar) | |
3241 | (delete-file injar) | |
3242 | (rename-file outjar injar))) | |
3243 | #t)) | |
3244 | (replace 'install | |
3245 | (install-from-pom "surefire-api/pom.xml"))))) | |
3246 | (propagated-inputs | |
3247 | `(("java-surefire-logger-api" ,java-surefire-logger-api) | |
3248 | ("java-commons-codec" ,java-commons-codec) | |
3249 | ("java-surefire-parent-pom" ,java-surefire-parent-pom) | |
3250 | ("maven-shared-utils" ,maven-shared-utils-3.1))) | |
3251 | (inputs | |
3252 | `(("java-jsr305" ,java-jsr305))) | |
3253 | (native-inputs | |
3254 | `(("unzip" ,unzip) | |
3255 | ("java-jarjar" ,java-jarjar))) | |
3256 | (synopsis "Maven SureFire API") | |
3257 | (description "This package contains the API to use Maven SureFire."))) | |
bf2769c2 JL |
3258 | |
3259 | (define-public java-surefire-booter | |
3260 | (package | |
3261 | (inherit java-surefire-logger-api) | |
3262 | (name "java-surefire-booter") | |
3263 | (arguments | |
3264 | `(#:tests? #f; require mockito 2 | |
3265 | #:jar-name "java-surefire-booter.jar" | |
3266 | #:source-dir "surefire-booter/src/main/java" | |
3267 | #:phases | |
3268 | (modify-phases %standard-phases | |
3269 | (add-before 'build 'fix-/bin/sh | |
3270 | (lambda _ | |
3271 | (substitute* "surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java" | |
3272 | (("/bin/sh") (which "sh"))) | |
3273 | #t)) | |
3274 | (replace 'install | |
3275 | (install-from-pom "surefire-booter/pom.xml"))))) | |
3276 | (propagated-inputs | |
3277 | `(("java-surefire-api" ,java-surefire-api) | |
3278 | ("java-commons-lang3" ,java-commons-lang3) | |
3279 | ("java-commons-io" ,java-commons-io) | |
3280 | ("java-surefire-parent-pom" ,java-surefire-parent-pom))) | |
3281 | (inputs | |
3282 | `(("java-jsr305" ,java-jsr305))) | |
3283 | (synopsis "API and Facilities used by forked tests running in JVM sub-process") | |
3284 | (description "SureFire runs tests inside a forked JVM subprocess. This | |
3285 | package contains an API and facilities used inside that forked JVM."))) | |
15725d9a JL |
3286 | |
3287 | (define-public java-surefire-extensions-api | |
3288 | (package | |
3289 | (inherit java-surefire-logger-api) | |
3290 | (name "java-surefire-extensions-api") | |
3291 | (arguments | |
3292 | `(#:tests? #f; requires mockito 2 | |
3293 | #:jar-name "java-surefire-extensions-api.jar" | |
3294 | #:source-dir "surefire-extensions-api/src/main/java" | |
3295 | #:phases | |
3296 | (modify-phases %standard-phases | |
3297 | (replace 'install | |
3298 | (install-from-pom "surefire-extensions-api/pom.xml"))))) | |
3299 | (propagated-inputs | |
3300 | `(("java-surefire-api" ,java-surefire-api) | |
3301 | ("java-surefire-parent-pom" ,java-surefire-parent-pom))) | |
3302 | (inputs | |
3303 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations))) | |
3304 | (synopsis "Extension API for Maven SureFire") | |
3305 | (description "Surefire is a test framework project. This is the aggregator | |
3306 | POM in Apache Maven Surefire project."))) | |
fd090644 JL |
3307 | |
3308 | (define-public java-surefire-common-java5 | |
3309 | (package | |
3310 | (inherit java-surefire-logger-api) | |
3311 | (name "java-surefire-common-java5") | |
3312 | (arguments | |
3313 | `(#:jar-name "java-surefire-common-java5.jar" | |
3314 | #:source-dir "surefire-providers/common-java5/src/main/java" | |
3315 | #:test-dir "surefire-providers/common-java5/src/test" | |
3316 | #:test-exclude (list | |
3317 | ;; Abstract class | |
3318 | "**/PojoStackTraceWriterTest.java" | |
3319 | ;; Fails | |
3320 | "**/SmartStackTraceParserTest.java") | |
3321 | #:phases | |
3322 | (modify-phases %standard-phases | |
3323 | (add-before 'build 'prepare-shade | |
3324 | (lambda* (#:key inputs #:allow-other-keys) | |
3325 | (mkdir-p "build/classes") | |
3326 | (with-directory-excursion "build/classes" | |
3327 | (for-each | |
3328 | (lambda (jar-file) | |
3329 | (invoke "jar" "xf" jar-file) | |
3330 | (delete-file-recursively "META-INF")) | |
3331 | (find-files (assoc-ref inputs "maven-shared-utils") ".*.jar$"))) | |
3332 | #t)) | |
3333 | (add-after 'build 'shade | |
3334 | (lambda* (#:key inputs #:allow-other-keys) | |
3335 | (let ((jarjar | |
3336 | (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$"))) | |
3337 | (injar "java-surefire-common-java5.jar") | |
3338 | (outjar "java-surefire-common-java5-shaded.jar")) | |
3339 | (with-directory-excursion "build/jar" | |
3340 | (with-output-to-file "rules" | |
3341 | (lambda _ | |
3342 | (format #t (string-append | |
3343 | "rule " | |
3344 | "org.apache.maven.shared.utils.** " | |
3345 | "org.apache.maven.surefire.shade.common." | |
3346 | "org.apache.maven.shared.utils.@1~%")))) | |
3347 | (invoke "java" "-jar" jarjar "process" "rules" injar outjar) | |
3348 | (delete-file injar) | |
3349 | (rename-file outjar injar))) | |
3350 | #t)) | |
3351 | (replace 'install | |
3352 | (install-from-pom "surefire-providers/common-java5/pom.xml"))))) | |
3353 | (propagated-inputs | |
3354 | `(("maven-shared-utils" ,maven-shared-utils-3.1) | |
3355 | ("java-surefire-api" ,java-surefire-api) | |
3356 | ("java-surefire-parent-pom" ,java-surefire-parent-pom))) | |
3357 | (native-inputs | |
3358 | `(("unzip" ,unzip) | |
3359 | ("java-jarjar" ,java-jarjar) | |
3360 | ("java-junit" ,java-junit) | |
3361 | ("java-fest-assert" ,java-fest-assert))) | |
3362 | (synopsis "Common java5 facilities for Maven SureFire") | |
3363 | (description "This package contains shared Java 5 code for all providers."))) | |
72ce4878 JL |
3364 | |
3365 | (define-public java-surefire-common-junit3 | |
3366 | (package | |
3367 | (inherit java-surefire-logger-api) | |
3368 | (name "java-surefire-common-junit3") | |
3369 | (arguments | |
3370 | `(#:jar-name "java-surefire-common-junit3.jar" | |
3371 | #:source-dir "surefire-providers/common-junit3/src/main/java" | |
3372 | #:test-dir "surefire-providers/common-junit3/src/test" | |
3373 | #:phases | |
3374 | (modify-phases %standard-phases | |
3375 | (replace 'install | |
3376 | (install-from-pom "surefire-providers/common-junit3/pom.xml"))))) | |
3377 | (propagated-inputs | |
3378 | `(("java-junit" ,java-junit) | |
3379 | ("java-surefire-api" ,java-surefire-api) | |
3380 | ("java-surefire-parent-pom" ,java-surefire-parent-pom))) | |
3381 | (native-inputs | |
3382 | `(("unzip" ,unzip) | |
3383 | ("java-junit" ,java-junit) | |
3384 | ("java-fest-assert" ,java-fest-assert))) | |
3385 | (synopsis "Shared JUnit3 provider code for Maven SureFire") | |
3386 | (description "This package contains shared code for all JUnit providers."))) | |
586db0f9 JL |
3387 | |
3388 | (define-public java-surefire-common-junit4 | |
3389 | (package | |
3390 | (inherit java-surefire-logger-api) | |
3391 | (name "java-surefire-common-junit4") | |
3392 | (arguments | |
3393 | `(#:jar-name "java-surefire-common-junit4.jar" | |
3394 | #:source-dir "surefire-providers/common-junit4/src/main/java" | |
3395 | #:tests? #f; tests require junit 4.0 | |
3396 | #:phases | |
3397 | (modify-phases %standard-phases | |
3398 | (replace 'install | |
3399 | (install-from-pom "surefire-providers/common-junit4/pom.xml"))))) | |
3400 | (propagated-inputs | |
3401 | `(("java-junit" ,java-junit) | |
3402 | ("java-surefire-api" ,java-surefire-api) | |
3403 | ("java-surefire-common-java5" ,java-surefire-common-java5) | |
3404 | ("java-surefire-common-junit3" ,java-surefire-common-junit3) | |
3405 | ("maven-shared-utils" ,maven-shared-utils-3.1) | |
3406 | ("java-surefire-parent-pom" ,java-surefire-parent-pom))) | |
3407 | (synopsis "Shared JUnit4 provider code for Maven SureFire") | |
3408 | (description "This package contains shared code for all JUnit providers, | |
3409 | starting from JUnit 4."))) | |
e1ee5a75 JL |
3410 | |
3411 | (define-public java-surefire-junit4 | |
3412 | (package | |
3413 | (inherit java-surefire-logger-api) | |
3414 | (name "java-surefire-junit4") | |
3415 | (arguments | |
3416 | `(;#:tests? #f | |
3417 | #:jar-name "java-surefire-junit4.jar" | |
3418 | #:source-dir "surefire-providers/surefire-junit4/src/main/java" | |
3419 | #:test-dir "surefire-providers/surefire-junit4/src/test" | |
3420 | #:modules ((guix build ant-build-system) | |
3421 | (guix build utils) | |
3422 | (guix build java-utils) | |
3423 | (sxml simple)) | |
3424 | #:phases | |
3425 | (modify-phases %standard-phases | |
3426 | (add-before 'install 'regenerate-own-pom | |
3427 | (lambda _ | |
3428 | ;; Surefire struggles resolving artifacts because of this pom | |
3429 | ;; file, resulting in a NullPointerException when collecting | |
3430 | ;; Artifacts (and a "Failure detected." message from | |
3431 | ;; DefaultArtifactResolver). Replace the pom file with a much | |
3432 | ;; simpler one. Everything is shaded anyway (as used to be the | |
3433 | ;; case in 2.22), so there will not be missing dependencies. | |
3434 | (with-output-to-file "surefire-providers/surefire-junit4/pom.xml" | |
3435 | (lambda _ | |
3436 | (sxml->xml | |
3437 | `((project | |
3438 | (modelVersion "4.0.0") | |
3439 | (name "Surefire JUnit4") | |
3440 | (groupId "org.apache.maven.surefire") | |
3441 | (artifactId "surefire-junit4") | |
3442 | (version ,,(package-version java-surefire-common-java5))))))) | |
3443 | #t)) | |
3444 | (add-before 'build 'copy-resources | |
3445 | (lambda _ | |
3446 | (mkdir-p "build/classes") | |
3447 | (copy-recursively "surefire-providers/surefire-junit4/src/main/resources" | |
3448 | "build/classes") | |
3449 | #t)) | |
3450 | (add-before 'build 'prepare-shade | |
3451 | (lambda* (#:key inputs #:allow-other-keys) | |
3452 | (mkdir-p "build/classes") | |
3453 | (with-directory-excursion "build/classes" | |
3454 | (for-each | |
3455 | (lambda (input) | |
3456 | (for-each | |
3457 | (lambda (jar-file) | |
3458 | (invoke "jar" "xf" jar-file) | |
3459 | (delete-file-recursively "META-INF")) | |
3460 | (find-files (assoc-ref inputs input) ".*.jar$"))) | |
3461 | '("maven-shared-utils" "java-surefire-common-java5" | |
3462 | "java-surefire-common-junit3" "java-surefire-common-junit4" | |
3463 | "java-surefire-api"))) | |
3464 | #t)) | |
3465 | (add-after 'build 'shade | |
3466 | (lambda* (#:key inputs #:allow-other-keys) | |
3467 | (let ((jarjar | |
3468 | (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$"))) | |
3469 | (injar "java-surefire-junit4.jar") | |
3470 | (outjar "java-surefire-junit4-shaded.jar")) | |
3471 | (with-directory-excursion "build/jar" | |
3472 | (with-output-to-file "rules" | |
3473 | (lambda _ | |
3474 | (format #t (string-append | |
3475 | "rule " | |
3476 | "org.apache.maven.shared.utils.** " | |
3477 | "org.apache.maven.surefire.shade." | |
3478 | "org.apache.maven.shared.utils.@1~%")))) | |
3479 | (invoke "java" "-jar" jarjar "process" "rules" injar outjar) | |
3480 | (delete-file injar) | |
3481 | (rename-file outjar injar))) | |
3482 | #t)) | |
3483 | (replace 'install | |
3484 | (install-from-pom "surefire-providers/surefire-junit4/pom.xml"))))) | |
3485 | (propagated-inputs | |
3486 | `(("java-junit" ,java-junit) | |
3487 | ("java-surefire-parent-pom" ,java-surefire-parent-pom))) | |
3488 | (inputs | |
3489 | `(("java-surefire-common-junit4" ,java-surefire-common-junit4) | |
3490 | ("java-surefire-common-junit3" ,java-surefire-common-junit3) | |
3491 | ("java-surefire-common-java5" ,java-surefire-common-java5) | |
3492 | ("java-surefire-api" ,java-surefire-api))) | |
3493 | (native-inputs | |
3494 | `(("java-jarjar" ,java-jarjar) | |
3495 | ("unzip" ,unzip) | |
3496 | ("java-junit" ,java-junit) | |
3497 | ("java-hamcrest-all" ,java-hamcrest-all) | |
3498 | ("java-fest-assert" ,java-fest-assert))) | |
3499 | (synopsis "SureFire JUnit 4.0+ runner") | |
3500 | (description "This package contains the runner for tests run on a forked | |
3501 | JVM, using JUnit 4.0 or later."))) | |
b777e194 JL |
3502 | |
3503 | (define-public maven-surefire-common | |
3504 | (package | |
3505 | (inherit java-surefire-logger-api) | |
3506 | (name "maven-surefire-common") | |
3507 | (arguments | |
3508 | `(#:tests? #f; require mockito 2 | |
3509 | #:jar-name "maven-surefire-common.jar" | |
3510 | #:source-dir "maven-surefire-common/src/main/java" | |
3511 | #:phases | |
3512 | (modify-phases %standard-phases | |
3513 | (add-before 'build 'prepare-shade | |
3514 | (lambda* (#:key inputs #:allow-other-keys) | |
3515 | (mkdir-p "build/classes") | |
3516 | (with-directory-excursion "build/classes" | |
3517 | (for-each | |
3518 | (lambda (input) | |
3519 | (for-each | |
3520 | (lambda (jar-file) | |
3521 | (invoke "jar" "xf" jar-file) | |
3522 | (delete-file-recursively "META-INF")) | |
3523 | (find-files (assoc-ref inputs input) ".*.jar$"))) | |
3524 | '("maven-shared-utils" "java-commons-io" "java-commons-lang3" | |
3525 | "java-commons-compress" "maven-common-artifact-filters"))) | |
3526 | #t)) | |
3527 | (add-after 'build 'shade | |
3528 | (lambda* (#:key inputs #:allow-other-keys) | |
3529 | (let ((jarjar | |
3530 | (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$"))) | |
3531 | (injar "maven-surefire-common.jar") | |
3532 | (outjar "maven-surefire-common-shaded.jar")) | |
3533 | (with-directory-excursion "build/jar" | |
3534 | (with-output-to-file "rules" | |
3535 | (lambda _ | |
3536 | (format #t (string-append | |
3537 | "rule " | |
3538 | "org.apache.maven.shared.utils.** " | |
3539 | "org.apache.maven.surefire.shade.common." | |
3540 | "org.apache.maven.shared.utils.@1~%")) | |
3541 | (format #t (string-append | |
3542 | "rule " | |
3543 | "org.apache.commons.io.** " | |
3544 | "org.apache.maven.surefire.shade.common." | |
3545 | "org.apache.commons.io.@1~%")) | |
3546 | (format #t (string-append | |
3547 | "rule " | |
3548 | "org.apache.commons.lang3.** " | |
3549 | "org.apache.maven.surefire.shade.common." | |
3550 | "org.apache.commons.lang3.@1~%")) | |
3551 | (format #t (string-append | |
3552 | "rule " | |
3553 | "org.apache.commons.compress.** " | |
3554 | "org.apache.maven.surefire.shade.common." | |
3555 | "org.apache.commons.compress.@1~%")))) | |
3556 | (invoke "java" "-jar" jarjar "process" "rules" injar outjar) | |
3557 | (delete-file injar) | |
3558 | (rename-file outjar injar))) | |
3559 | #t)) | |
3560 | (add-before 'install 'fix-pom | |
3561 | (lambda _ | |
3562 | (substitute* "maven-surefire-common/pom.xml" | |
3563 | (("maven-toolchain") "maven-core")) | |
3564 | #t)) | |
3565 | (replace 'install | |
3566 | (install-from-pom "maven-surefire-common/pom.xml"))))) | |
3567 | (propagated-inputs | |
3568 | `(("java-surefire-api" ,java-surefire-api) | |
3569 | ("java-surefire-extensions-api" ,java-surefire-extensions-api) | |
3570 | ("java-surefire-booter" ,java-surefire-booter) | |
3571 | ("maven-core" ,maven-core) | |
3572 | ("maven-plugin-annotations" ,maven-plugin-annotations) | |
3573 | ("maven-common-artifact-filters" ,maven-common-artifact-filters) | |
3574 | ("maven-artifact-transfer" ,maven-artifact-transfer) | |
3575 | ("java-plexus-java" ,java-plexus-java) | |
3576 | ("java-jansi" ,java-jansi) | |
3577 | ("java-commons-io" ,java-commons-io) | |
3578 | ("java-commons-lang3" ,java-commons-lang3) | |
3579 | ("java-commons-compress" ,java-commons-compress) | |
3580 | ("maven-shared-utils" ,maven-shared-utils-3.1) | |
3581 | ("java-surefire-parent-pom" ,java-surefire-parent-pom))) | |
3582 | (inputs | |
3583 | `(("java-jsr305" ,java-jsr305))) | |
3584 | (native-inputs | |
3585 | `(("unzip" ,unzip) | |
3586 | ("java-jarjar" ,java-jarjar))) | |
3587 | (synopsis "API used in Surefire and Failsafe MOJO") | |
3588 | (description "This package contains an API used in SureFire and Failsafe | |
3589 | MOJO."))) | |
7c02294b JL |
3590 | |
3591 | (define-public maven-surefire-plugin | |
3592 | (package | |
3593 | (inherit java-surefire-logger-api) | |
3594 | (name "maven-surefire-plugin") | |
3595 | (arguments | |
3596 | `(#:jar-name "maven-surefire-plugin.jar" | |
3597 | #:source-dir "maven-surefire-plugin/src/main/java" | |
3598 | #:tests? #f; test depends on maven-plugin-test-harness | |
3599 | #:phases | |
3600 | (modify-phases %standard-phases | |
3601 | (add-before 'build 'generate-plugin.xml | |
3602 | (generate-plugin.xml "maven-surefire-plugin/pom.xml" | |
3603 | "surefire" | |
3604 | "." | |
3605 | (list | |
3606 | (list | |
3607 | "maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java" | |
3608 | "maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java")))) | |
3609 | (replace 'install | |
3610 | (install-from-pom "maven-surefire-plugin/pom.xml"))))) | |
3611 | (propagated-inputs | |
3612 | `(("maven-surefire-common" ,maven-surefire-common) | |
3613 | ("maven-core" ,maven-core))) | |
3614 | (native-inputs | |
3615 | `(("maven-plugin-annotations" ,maven-plugin-annotations) | |
3616 | ("unzip" ,unzip))) | |
3617 | (synopsis "SureFire Maven plugin that runs tests.") | |
3618 | (description "The Surefire Plugin is used during the test phase of the | |
3619 | build lifecycle to execute the unit tests of an application. It generates | |
3620 | reports in two different file formats, plain text and xml."))) | |
562408a8 JL |
3621 | |
3622 | (define-public maven-jar-plugin | |
3623 | (package | |
3624 | (name "maven-jar-plugin") | |
3625 | (version "3.2.0") | |
3626 | (source (origin | |
05cd8837 EF |
3627 | (method git-fetch) |
3628 | (uri (git-reference | |
3629 | (url "https://github.com/apache/maven-jar-plugin") | |
3630 | (commit (string-append "maven-jar-plugin-" version)))) | |
3631 | (file-name (git-file-name name version)) | |
562408a8 JL |
3632 | (sha256 |
3633 | (base32 | |
05cd8837 | 3634 | "04y2rlmcabmc55ljqlkgbb5xx94a59cz1dvrnpfj1vzz024pqkyg")))) |
562408a8 JL |
3635 | (build-system ant-build-system) |
3636 | (arguments | |
3637 | `(#:jar-name "maven-jar-plugin.jar" | |
3638 | #:source-dir "src/main/java" | |
3639 | #:tests? #f; test depends on maven-plugin-test-harness | |
3640 | #:phases | |
3641 | (modify-phases %standard-phases | |
3642 | (add-before 'build 'generate-plugin.xml | |
3643 | (generate-plugin.xml "pom.xml" | |
3644 | "jar" | |
3645 | "src/main/java/org/apache/maven/plugins/jar" | |
3646 | (list | |
3647 | (list "AbstractJarMojo.java" "JarMojo.java") | |
3648 | (list "AbstractJarMojo.java" "TestJarMojo.java")))) | |
3649 | (replace 'install | |
3650 | (install-from-pom "pom.xml"))))) | |
3651 | (propagated-inputs | |
3652 | `(("maven-archiver" ,maven-archiver) | |
3653 | ("maven-artifact" ,maven-3.0-artifact) | |
3654 | ("maven-core" ,maven-3.0-core) | |
3655 | ("maven-plugin-api" ,maven-3.0-plugin-api) | |
3656 | ("maven-file-management" ,maven-file-management) | |
3657 | ("maven-shared-utils" ,maven-shared-utils) | |
3658 | ("java-plexus-archiver" ,java-plexus-archiver) | |
3659 | ("java-plexus-utils" ,java-plexus-utils))) | |
3660 | (inputs | |
3661 | `(("maven-plugin-annotations" ,maven-plugin-annotations))) | |
3662 | (home-page "https://maven.apache.org/plugins/maven-jar-plugin") | |
3663 | (synopsis "Jar builder plugin for Maven") | |
3664 | (description "This plugin provides the capability to build jars. If you | |
3665 | would like to sign jars please use the Maven Jarsigner Plugin instead.") | |
3666 | (license license:asl2.0))) |