maven.scm
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2017 Julien Lepiller <julien@lepiller.eu> |
3 | ;;; |
4 | ;;; This file is part of GNU Guix. |
5 | ;;; |
6 | ;;; GNU Guix is free software; you can redistribute it and/or modify it |
7 | ;;; under the terms of the GNU General Public License as published by |
8 | ;;; the Free Software Foundation; either version 3 of the License, or (at |
9 | ;;; your option) any later version. |
10 | ;;; |
11 | ;;; GNU Guix is distributed in the hope that it will be useful, but |
12 | ;;; WITHOUT ANY WARRANTY; without even the implied warranty of |
13 | ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
14 | ;;; GNU General Public License for more details. |
15 | ;;; |
16 | ;;; You should have received a copy of the GNU General Public License |
17 | ;;; along with GNU Guix. If not, see <http://www.gnu.org/licenses/>. |
18 | |
19 | (define-module (more packages maven) |
20 | #:use-module ((guix licenses) #:prefix license:) |
21 | #:use-module (gnu packages) |
22 | #:use-module (guix packages) |
23 | #:use-module (guix download) |
24 | #:use-module (guix git-download) |
25 | #:use-module (guix svn-download) |
26 | #:use-module (guix cvs-download) |
27 | #:use-module (guix utils) |
28 | #:use-module (guix build-system ant) |
29 | #:use-module (guix build-system gnu) |
30 | #:use-module (guix build-system trivial) |
31 | #:use-module (gnu packages autotools) |
32 | #:use-module (gnu packages base) |
33 | #:use-module (gnu packages compression) |
34 | #:use-module (gnu packages docbook) |
35 | #:use-module (gnu packages java) |
36 | #:use-module (gnu packages maven) |
37 | #:use-module (gnu packages perl) |
38 | #:use-module (gnu packages web) |
39 | #:use-module (gnu packages xml) |
40 | #:use-module (more packages groovy) |
41 | #:use-module (more packages java)) |
42 | |
43 | (define-public java-plexus-component-metadata |
44 | (package |
45 | (inherit java-plexus-container-default) |
46 | (name "java-plexus-component-metadata") |
47 | (arguments |
48 | `(#:jar-name "plexus-component-metadata.jar" |
49 | #:source-dir "src/main/java" |
50 | #:test-dir "src/test" |
51 | #:jdk ,icedtea-8 |
52 | #:phases |
53 | (modify-phases %standard-phases |
54 | (add-before 'configure 'chdir |
55 | (lambda _ |
56 | (chdir "plexus-component-metadata"))) |
57 | (add-before 'build 'copy-resources |
58 | (lambda _ |
59 | (copy-recursively "src/main/resources" |
60 | "build/classes/") |
61 | #t))))) |
62 | (inputs |
63 | `(("java-plexus-container-default" ,java-plexus-container-default) |
64 | ("java-plexu-component-annotations" ,java-plexus-component-annotations) |
65 | ("java-plexus-utils" ,java-plexus-utils) |
66 | ("java-plexus-cli" ,java-plexus-cli) |
67 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
68 | ("maven-plugin-api" ,maven-plugin-api) |
69 | ("maven-plugin-annotations" ,maven-plugin-annotations) |
70 | ("maven-core-boot" ,maven-core-boot) |
71 | ("maven-model" ,maven-model) |
72 | ("java-commons-cli" ,java-commons-cli) |
73 | ("java-qdox" ,java-qdox) |
74 | ("java-jdom2" ,java-jdom2) |
75 | ("java-asm" ,java-asm))) |
76 | (native-inputs |
77 | `(("java-junit" ,java-junit) |
78 | ("java-guava" ,java-guava) |
79 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect))))) |
80 | |
81 | ;; Needs maven-core |
82 | (define-public maven-plugin-testing-harness |
83 | (package |
84 | (name "maven-plugin-testing-harness") |
85 | (version "3.3.0") |
86 | (source (origin |
87 | (method url-fetch) |
88 | (uri (string-append "https://archive.apache.org/dist/maven/plugin-" |
89 | "testing/maven-plugin-testing-" version |
90 | "-source-release.zip")) |
91 | (sha256 |
92 | (base32 |
93 | "15vgjar275nkz47c05mpqb4g2rha0abc752xhxcxc34z2z47z6p5")))) |
94 | (build-system ant-build-system) |
95 | (arguments |
96 | `(#:jar-name "maven-plugin-testing-harness.jar" |
97 | #:source-dir "maven-plugin-testing-harness/src/main/java" |
98 | #:jdk ,icedtea-8)) |
99 | (inputs |
100 | `(("maven-artifact" ,maven-artifact))) |
101 | (native-inputs |
102 | `(("unzip" ,unzip))) |
103 | (home-page "") |
104 | (synopsis "") |
105 | (description "") |
106 | (license license:asl2.0))) |
107 | |
108 | (define-public maven-shared-utils |
109 | (package |
110 | (name "maven-shared-utils") |
111 | ; latest is 3.2.0, but is not supported by maven-embedder |
112 | (version "3.1.0") |
113 | (source (origin |
114 | (method url-fetch) |
115 | (uri (string-append "https://archive.apache.org/dist/maven/shared/" |
116 | "maven-shared-utils-" version "-source-release.zip")) |
117 | (sha256 |
118 | (base32 |
119 | "0vfaas4g09ch0agrd1dcxcmhdd3w971ssvfr9mx9gi2lp5nv8w66")))) |
120 | (build-system ant-build-system) |
121 | (arguments |
122 | `(#:jar-name "maven-shared-utils.jar" |
123 | #:source-dir "src/main/java" |
124 | #:jdk ,icedtea-8 |
125 | #:phases |
126 | (modify-phases %standard-phases |
127 | (add-before 'check 'remove-cyclic-dep |
128 | (lambda _ |
129 | (delete-file "src/test/java/org/apache/maven/shared/utils/introspection/ReflectionValueExtractorTest.java") |
130 | #t))))) |
131 | (inputs |
132 | `(("java-jansi" ,java-jansi) |
133 | ("java-commons-io" ,java-commons-io) |
134 | ("java-jsr305" ,java-jsr305) |
135 | ("java-plexus-container-default" ,java-plexus-container-default))) |
136 | (native-inputs |
137 | `(("unzip" ,unzip) |
138 | ("java-junit" ,java-junit) |
139 | ("java-hamcrest-core" ,java-hamcrest-core) |
140 | ("java-commons-lang3" ,java-commons-lang3))) |
141 | (home-page "") |
142 | (synopsis "") |
143 | (description "") |
144 | (license license:asl2.0))) |
145 | |
146 | (define-public maven |
147 | (package |
148 | (name "maven") |
149 | (version "3.5.0") |
150 | (source (origin |
151 | (method url-fetch) |
152 | (uri (string-append "https://archive.apache.org/dist/maven/" |
153 | "maven-3/" version "/source/" |
154 | "apache-maven-" version "-src.tar.gz")) |
155 | (sha256 (base32 "1xw0g85w1rnxrjia3d7knpnwh8jg5052qsnqjl6nyly2k8320qrg")) |
156 | (patches |
157 | (search-patches "maven-generate-component-xml.patch" |
158 | "maven-generate-javax-inject-named.patch")))) |
159 | (build-system ant-build-system) |
160 | (arguments |
161 | `(#:phases |
162 | (modify-phases %standard-phases |
163 | (replace 'build |
164 | (lambda _ |
165 | (substitute* "apache-maven/src/bin/mvn" |
166 | (("cygwin=false;") |
167 | (string-append |
168 | "CLASSPATH=" (getenv "CLASSPATH") "\n" |
169 | "cygwin=false;")) |
170 | (("-classpath.*") "-classpath ${CLASSPATH} \\\n")))) |
171 | (delete 'check) |
172 | (replace 'install |
173 | (lambda* (#:key outputs #:allow-other-keys) |
174 | (let ((bin (string-append (assoc-ref outputs "out") "/bin/")) |
175 | (conf (string-append (assoc-ref outputs "out") "/conf/"))) |
176 | (mkdir-p (string-append (assoc-ref outputs "out") "/lib")) |
177 | (for-each (lambda (file) |
178 | (install-file (string-append "apache-maven/src/bin/" file) |
179 | bin) |
180 | (chmod (string-append bin file) #o755)) |
181 | '("mvn" "mvnDebug" "mvnyjp")) |
182 | (install-file "apache-maven/src/bin/m2.conf" bin) |
183 | (copy-recursively "apache-maven/src/conf" conf))))))) |
184 | (inputs |
185 | `(("java-plexus-classworlds" ,java-plexus-classworlds) |
186 | ("maven-artifact" ,maven-artifact) |
187 | ("maven-embedder" ,maven-embedder) |
188 | ("maven-core" ,maven-core) |
189 | ("maven-compat" ,maven-compat) |
190 | ("maven-builder-support" ,maven-builder-support) |
191 | ("maven-model" ,maven-model) |
192 | ("maven-model-builder" ,maven-model-builder) |
193 | ("maven-settings" ,maven-settings) |
194 | ("maven-settings-builder" ,maven-settings-builder) |
195 | ("maven-plugin-api" ,maven-plugin-api) |
196 | ("maven-repository-metadata", maven-repository-metadata) |
197 | ("maven-shared-utils" ,maven-shared-utils) |
198 | ("maven-resolver-api" ,maven-resolver-api) |
199 | ("maven-resolver-spi" ,maven-resolver-spi) |
200 | ("maven-resolver-util" ,maven-resolver-util) |
201 | ("maven-resolver-impl" ,maven-resolver-impl) |
202 | ("maven-resolver-connector-basic" ,maven-resolver-connector-basic) |
203 | ("maven-resolver-provider" ,maven-resolver-provider) |
204 | ("maven-resolver-transport-wagon" ,maven-resolver-transport-wagon) |
205 | ("maven-wagon-provider-api" ,maven-wagon-provider-api) |
206 | ("maven-wagon-file" ,maven-wagon-file) |
207 | ("maven-wagon-http" ,maven-wagon-http) |
208 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) |
209 | ("java-httpcomponents-client" ,java-httpcomponents-client) |
210 | ("java-httpcomponents-core" ,java-httpcomponents-core) |
211 | ("maven-wagon-http-shared" ,maven-wagon-http-shared) |
212 | ("maven-wagon-tck-http" ,maven-wagon-tck-http) |
213 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
214 | ("java-guice" ,java-guice) |
215 | ("java-aopalliance" ,java-aopalliance) |
216 | ("java-cglib" ,java-cglib) |
217 | ("java-asm" ,java-asm) |
218 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
219 | ("java-javax-inject" ,java-javax-inject) |
220 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
221 | ("java-plexus-utils" ,java-plexus-utils) |
222 | ("java-plexus-interpolation" ,java-plexus-interpolation) |
223 | ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) |
224 | ("java-plexus-cipher" ,java-plexus-cipher) |
225 | ("java-guava" ,java-guava) |
226 | ("java-jansi" ,java-jansi) |
227 | ("java-jsr250" ,java-jsr250) |
228 | ("java-cdi-api" ,java-cdi-api) |
229 | ("java-commons-cli" ,java-commons-cli) |
230 | ("java-commons-io" ,java-commons-io) |
231 | ("java-commons-lang3" ,java-commons-lang3) |
232 | ("java-slf4j-api" ,java-slf4j-api) |
233 | ;; TODO: replace with maven-slf4j-provider |
234 | ("java-slf4j-simple" ,java-slf4j-simple))) |
235 | (home-page "") |
236 | (synopsis "") |
237 | (description "") |
238 | (license license:asl2.0))) |
239 | |
240 | (define-public maven-artifact |
241 | (package |
242 | (inherit maven) |
243 | (name "maven-artifact") |
244 | (arguments |
245 | `(#:jar-name "maven-artifact.jar" |
246 | #:source-dir "maven-artifact/src/main/java" |
247 | #:test-dir "maven-artifact/src/test" |
248 | #:main-class "org.apache.maven.artifact.versioning.ComparableVersion")) |
249 | (inputs |
250 | `(("java-plexus-utils" ,java-plexus-utils) |
251 | ("java-commons-lang3" ,java-commons-lang3))) |
252 | (native-inputs |
253 | `(("java-junit" ,java-junit))))) |
254 | |
255 | (define-public maven-model |
256 | (package |
257 | (inherit maven) |
258 | (name "maven-model") |
259 | (arguments |
260 | `(#:jar-name "maven-model.jar" |
261 | #:source-dir "maven-model/src/main/java" |
262 | #:test-dir "maven-model/src/test" |
263 | #:jdk ,icedtea-8 |
264 | #:phases |
265 | (modify-phases %standard-phases |
266 | (add-before 'build 'generate-models |
267 | (lambda* (#:key inputs #:allow-other-keys) |
268 | (define (modello-single-mode file version mode) |
269 | (zero? (system* "java" |
270 | "org.codehaus.modello.ModelloCli" |
271 | file mode "maven-model/src/main/java" version |
272 | "false" "true"))) |
273 | (let ((file "maven-model/src/main/mdo/maven.mdo")) |
274 | (and |
275 | (modello-single-mode file "4.0.0" "java") |
276 | (modello-single-mode file "4.0.0" "xpp3-reader") |
277 | (modello-single-mode file "4.0.0" "xpp3-writer") |
278 | (modello-single-mode file "4.0.0" "xpp3-extended-reader")))))))) |
279 | (inputs |
280 | `(("java-commons-lang3" ,java-commons-lang3) |
281 | ("java-plexus-utils" ,java-plexus-utils))) |
282 | (native-inputs |
283 | `(("java-modello-core" ,java-modello-core) |
284 | ;; for modello: |
285 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
286 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
287 | ("java-guice" ,java-guice) |
288 | ("java-cglib" ,java-cglib) |
289 | ("java-asm" ,java-asm) |
290 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
291 | ("java-javax-inject" ,java-javax-inject) |
292 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
293 | ("java-guava" ,java-guava) |
294 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
295 | ("java-sisu-build-api" ,java-sisu-build-api) |
296 | ;; modello plugins: |
297 | ("java-modello-plugins-java" ,java-modello-plugins-java) |
298 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) |
299 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) |
300 | ;; for tests |
301 | ("java-junit" ,java-junit))))) |
302 | |
303 | (define-public maven-settings |
304 | (package |
305 | (inherit maven) |
306 | (name "maven-settings") |
307 | (arguments |
308 | `(#:jar-name "maven-settings.jar" |
309 | #:source-dir "maven-settings/src/main/java" |
310 | #:jdk ,icedtea-8 |
311 | #:tests? #f; no tests |
312 | #:phases |
313 | (modify-phases %standard-phases |
314 | (add-before 'build 'generate-models |
315 | (lambda* (#:key inputs #:allow-other-keys) |
316 | (define (modello-single-mode file version mode) |
317 | (zero? (system* "java" |
318 | "org.codehaus.modello.ModelloCli" |
319 | file mode "maven-settings/src/main/java" version |
320 | "false" "true"))) |
321 | (let ((file "maven-settings/src/main/mdo/settings.mdo")) |
322 | (and |
323 | (modello-single-mode file "1.1.0" "java") |
324 | (modello-single-mode file "1.1.0" "xpp3-reader") |
325 | (modello-single-mode file "1.1.0" "xpp3-writer")))))))) |
326 | (inputs '()) |
327 | (native-inputs |
328 | `(("java-modello-core" ,java-modello-core) |
329 | ;; for modello: |
330 | ;("container" ,java-plexus-container-default) |
331 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
332 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
333 | ("java-guice" ,java-guice) |
334 | ("java-cglib" ,java-cglib) |
335 | ("java-asm" ,java-asm) |
336 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
337 | ("java-javax-inject" ,java-javax-inject) |
338 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
339 | ("java-plexus-utils" ,java-plexus-utils) |
340 | ("java-guava" ,java-guava) |
341 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
342 | ("java-sisu-build-api" ,java-sisu-build-api) |
343 | ;; modello plugins: |
344 | ("java-modello-plugins-java" ,java-modello-plugins-java) |
345 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) |
346 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3))))) |
347 | |
348 | (define-public maven-builder-support |
349 | (package |
350 | (inherit maven) |
351 | (name "maven-builder-support") |
352 | (arguments |
353 | `(#:jar-name "maven-builder-support.jar" |
354 | #:source-dir "maven-builder-support/src/main/java" |
355 | #:jdk ,icedtea-8 |
356 | #:test-dir "maven-builder-support/src/test" |
357 | #:phases |
358 | (modify-phases %standard-phases |
359 | (add-before 'check 'fix-paths |
360 | (lambda _ |
361 | (substitute* '("maven-builder-support/src/test/java/org/apache/maven/building/FileSourceTest.java" |
362 | "maven-builder-support/src/test/java/org/apache/maven/building/UrlSourceTest.java") |
363 | (("target/test-classes") "maven-builder-support/src/test/resources")) |
364 | #t))))) |
365 | (inputs |
366 | `(("java-plexus-utils" ,java-plexus-utils) |
367 | ("java-commons-lang3" ,java-commons-lang3))) |
368 | (native-inputs |
369 | `(("java-junit" ,java-junit) |
370 | ("java-hamcrest-core" ,java-hamcrest-core))))) |
371 | |
372 | (define-public maven-settings-builder |
373 | (package |
374 | (inherit maven) |
375 | (name "maven-settings-builder") |
376 | (arguments |
377 | `(#:jar-name "maven-settings-builder.jar" |
378 | #:source-dir "maven-settings-builder/src/main/java" |
379 | #:jdk ,icedtea-8 |
380 | #:test-dir "maven-settings-builder/src/test" |
381 | #:phases |
382 | (modify-phases %standard-phases |
383 | (add-before 'build 'generate-components.xml |
384 | (lambda _ |
385 | (mkdir-p "build/classes/META-INF/plexus") |
386 | (chmod "components.sh" #o755) |
387 | (zero? (system* "./components.sh" "maven-settings-builder/src/main/java" |
388 | "build/classes/META-INF/plexus/components.xml"))))))) |
389 | (inputs |
390 | `(("java-plexus-utils" ,java-plexus-utils) |
391 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
392 | ("java-plexus-interpolation" ,java-plexus-interpolation) |
393 | ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) |
394 | ("maven-builder-support" ,maven-builder-support) |
395 | ("maven-settings" ,maven-settings) |
396 | ("java-commons-lang3" ,java-commons-lang3))) |
397 | (native-inputs |
398 | `(("java-junit" ,java-junit))))) |
399 | |
400 | (define-public maven-plugin-api |
401 | (package |
402 | (inherit maven) |
403 | (name "maven-plugin-api") |
404 | (arguments |
405 | `(#:jar-name "maven-plugin-api.jar" |
406 | #:source-dir "maven-plugin-api/src/main/java" |
407 | #:jdk ,icedtea-8 |
408 | #:test-dir "maven-plugin-api/src/test" |
409 | #:phases |
410 | (modify-phases %standard-phases |
411 | (add-before 'build 'generate-models |
412 | (lambda* (#:key inputs #:allow-other-keys) |
413 | (define (modello-single-mode file version mode) |
414 | (zero? (system* "java" |
415 | "org.codehaus.modello.ModelloCli" |
416 | file mode "maven-plugin-api/src/main/java" version |
417 | "false" "true"))) |
418 | (let ((file "maven-plugin-api/src/main/mdo/lifecycle.mdo")) |
419 | (and |
420 | (modello-single-mode file "1.0.0" "java") |
421 | (modello-single-mode file "1.0.0" "xpp3-reader") |
422 | (modello-single-mode file "1.0.0" "xpp3-writer")))))))) |
423 | (inputs |
424 | `(("maven-artifact" ,maven-artifact) |
425 | ("maven-model" ,maven-model) |
426 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
427 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
428 | ("guice" ,java-guice) |
429 | ("java-cglib" ,java-cglib) |
430 | ("java-asm" ,java-asm) |
431 | ("sisu-inject" ,java-eclipse-sisu-inject) |
432 | ("javax-inject" ,java-javax-inject) |
433 | ("utils" ,java-plexus-utils))) |
434 | (native-inputs |
435 | `(("modello" ,java-modello-core) |
436 | ;; for modello: |
437 | ("classworlds" ,java-plexus-classworlds) |
438 | ("guava" ,java-guava) |
439 | ("xbean" ,java-geronimo-xbean-reflect) |
440 | ("build-api" ,java-sisu-build-api) |
441 | ;; modello plugins: |
442 | ("java" ,java-modello-plugins-java) |
443 | ("xml" ,java-modello-plugins-xml) |
444 | ("xpp3" ,java-modello-plugins-xpp3) |
445 | ;; for tests |
446 | ("java-junit" ,java-junit))))) |
447 | |
448 | (define-public maven-model-builder |
449 | (package |
450 | (inherit maven) |
451 | (name "maven-model-builder") |
452 | (arguments |
453 | `(#:jar-name "maven-model-builder.jar" |
454 | #:source-dir "maven-model-builder/src/main/java" |
455 | #:jdk ,icedtea-8 |
456 | #:test-dir "maven-model-builder/src/test" |
457 | #:phases |
458 | (modify-phases %standard-phases |
459 | (add-before 'build 'copy-resources |
460 | (lambda _ |
461 | (copy-recursively "maven-model-builder/src/main/resources" |
462 | "build/classes"))) |
463 | (add-before 'build 'generate-components.xml |
464 | (lambda _ |
465 | (mkdir-p "build/classes/META-INF/plexus") |
466 | (chmod "components.sh" #o755) |
467 | (zero? (system* "./components.sh" "maven-model-builder/src/main/java" |
468 | "build/classes/META-INF/plexus/components.xml")))) |
469 | (add-before 'check 'fix-paths |
470 | (lambda _ |
471 | (substitute* (find-files "maven-model-builder/src/test/java" ".*.java") |
472 | (("src/test") "maven-model-builder/src/test")) |
473 | #t))))) |
474 | (inputs |
475 | `(("model" ,maven-model) |
476 | ("artifact" ,maven-artifact) |
477 | ("support" ,maven-builder-support) |
478 | ("annotations" ,java-plexus-component-annotations) |
479 | ("utils" ,java-plexus-utils) |
480 | ("interpolation" ,java-plexus-interpolation) |
481 | ("lang3" ,java-commons-lang3) |
482 | ("guava" ,java-guava))) |
483 | (native-inputs |
484 | `(("java-junit" ,java-junit) |
485 | ("java-hamcrest-core" ,java-hamcrest-core) |
486 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
487 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
488 | ("guice" ,java-guice) |
489 | ("java-cglib" ,java-cglib) |
490 | ("java-asm" ,java-asm) |
491 | ("sisu-inject" ,java-eclipse-sisu-inject) |
492 | ("javax-inject" ,java-javax-inject) |
493 | ("xmlunit" ,java-xmlunit) |
494 | ("xmlunit" ,java-xmlunit-legacy) |
495 | ("xbean" ,java-geronimo-xbean-reflect) |
496 | ("classworlds" ,java-plexus-classworlds))))) |
497 | |
498 | (define-public maven-repository-metadata |
499 | (package |
500 | (inherit maven) |
501 | (name "maven-repository-metadata") |
502 | (arguments |
503 | `(#:jar-name "maven-repository-metadata.jar" |
504 | #:source-dir "maven-repository-metadata/src/main/java" |
505 | #:jdk ,icedtea-8 |
506 | #:tests? #f; no tests |
507 | #:phases |
508 | (modify-phases %standard-phases |
509 | (add-before 'build 'generate-models |
510 | (lambda* (#:key inputs #:allow-other-keys) |
511 | (define (modello-single-mode file version mode) |
512 | (zero? (system* "java" |
513 | "org.codehaus.modello.ModelloCli" |
514 | file mode "maven-repository-metadata/src/main/java" version |
515 | "false" "true"))) |
516 | (let ((file "maven-repository-metadata/src/main/mdo/metadata.mdo")) |
517 | (and |
518 | (modello-single-mode file "1.1.0" "java") |
519 | (modello-single-mode file "1.1.0" "xpp3-reader") |
520 | (modello-single-mode file "1.1.0" "xpp3-writer")))))))) |
521 | (inputs '()) |
522 | (native-inputs |
523 | `(("modello" ,java-modello-core) |
524 | ;; for modello: |
525 | ;("container" ,java-plexus-container-default) |
526 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
527 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
528 | ("java-guice" ,java-guice) |
529 | ("java-cglib" ,java-cglib) |
530 | ("java-asm" ,java-asm) |
531 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
532 | ("java-javax-inject" ,java-javax-inject) |
533 | ("java-plexus-utils" ,java-plexus-utils) |
534 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
535 | ("java-guava" ,java-guava) |
536 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
537 | ("java-sisu-build-api" ,java-sisu-build-api) |
538 | ;; modello plugins: |
539 | ("java-modello-plugins-java" ,java-modello-plugins-java) |
540 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) |
541 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) |
542 | ;; for tests |
543 | ("java-junit" ,java-junit))))) |
544 | |
545 | (define-public maven-resolver-provider |
546 | (package |
547 | (inherit maven) |
548 | (name "maven-resolver-provider") |
549 | (arguments |
550 | `(#:jar-name "maven-resolver-provider.jar" |
551 | #:source-dir "maven-resolver-provider/src/main/java" |
552 | #:test-dir "maven-resolver-provider/src/test" |
553 | #:jdk ,icedtea-8 |
554 | #:tests? #f; dependency loop on maven-core (@Component RepositorySystem) |
555 | #:phases |
556 | (modify-phases %standard-phases |
557 | (add-before 'build 'generate-components.xml |
558 | (lambda _ |
559 | (mkdir-p "build/classes/META-INF/plexus") |
560 | (chmod "components.sh" #o755) |
561 | (zero? (system* "./components.sh" "maven-resolver-provider/src/main/java" |
562 | "build/classes/META-INF/plexus/components.xml"))))))) |
563 | (inputs |
564 | `(("maven-resolver-spi" ,maven-resolver-spi) |
565 | ("maven-resolver-api" ,maven-resolver-api) |
566 | ("maven-resolver-impl" ,maven-resolver-impl) |
567 | ("maven-resolver-util" ,maven-resolver-util) |
568 | ("maven-model" ,maven-model) |
569 | ("maven-model-builder" ,maven-model-builder) |
570 | ("maven-builder-support" ,maven-builder-support) |
571 | ("maven-repository-metadata" ,maven-repository-metadata) |
572 | ("java-plexus-utils" ,java-plexus-utils) |
573 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
574 | ("java-commons-lang3" ,java-commons-lang3) |
575 | ("java-guice" ,java-guice) |
576 | ("java-guava" ,java-guava) |
577 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
578 | ("java-javax-inject" ,java-javax-inject))))) |
579 | |
580 | ;(define-public maven-resolver-provider |
581 | ; (package |
582 | ; (inherit maven-resolver-provider-boot) |
583 | ; (arguments |
584 | ; `(#:jar-name "maven-resolver-provider.jar" |
585 | ; #:source-dir "src/main/java" |
586 | ; #:jdk ,icedtea-8 |
587 | ; #:test-exclude (list "**/DefaultArtifactDescriptorReaderTest.java") |
588 | ; #:phases |
589 | ; (modify-phases %standard-phases |
590 | ; (add-before 'configure 'chdir |
591 | ; (lambda _ |
592 | ; ;; Tests assume we're in this directory |
593 | ; (chdir "maven-resolver-provider"))) |
594 | ; (add-before 'build 'generate-components.xml |
595 | ; (lambda _ |
596 | ; (mkdir-p "build/classes/META-INF/plexus") |
597 | ; (chmod "../components.sh" #o755) |
598 | ; (zero? (system* "../components.sh" "src/main/java" |
599 | ; "build/classes/META-INF/plexus/components.xml")))) |
600 | ; (add-before 'check 'fix-assumptions |
601 | ; (lambda _ |
602 | ; ;; Errors about the version of some files |
603 | ; (substitute* "src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java" |
604 | ; (("20130404.090532-2") "SNAPSHOT"))))))) |
605 | ; ;(add-before 'check 'copy-test-classes |
606 | ; ; (lambda _ |
607 | ; ; (system* "ant" "compile-tests") |
608 | ; ; (mkdir-p "target/test-classes") |
609 | ; ; (copy-recursively "build/test-classes" "target/test-classes") |
610 | ; ; ;(copy-recursively "src/test/resources/repo" "target/test-classes/repo") |
611 | ; ; #t))))) |
612 | ; (native-inputs |
613 | ; `(;; For building tests: |
614 | ; ("maven-core" ,maven-core-boot) |
615 | ; ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
616 | ; ("java-junit" ,java-junit) |
617 | ; ("java-mockito-1" ,java-mockito-1) |
618 | ; ;; For running tests: |
619 | ; ("java-hamcrest-core" ,java-hamcrest-core) |
620 | ; ("aop" ,java-aopalliance) |
621 | ; ("classworlds" ,java-plexus-classworlds) |
622 | ; ("plugin" ,maven-plugin-api) |
623 | ; ("java-cglib" ,java-cglib) |
624 | ; ("java-asm" ,java-asm) |
625 | ; ("interpolation" ,java-plexus-interpolation) |
626 | ; ("artifact" ,maven-artifact) |
627 | ; ("java-objenesis" ,java-objenesis) |
628 | ; ("transport-wagon" ,maven-resolver-transport-wagon) |
629 | ; ("wagon-file" ,maven-wagon-file) |
630 | ; ("wagon-api" ,maven-wagon-provider-api) |
631 | ; ("connector-basic" ,maven-resolver-connector-basic))))) |
632 | |
633 | (define maven-core-boot |
634 | (package |
635 | (inherit maven) |
636 | (name "maven-core-boot") |
637 | (arguments |
638 | `(#:jar-name "maven-core.jar" |
639 | #:source-dir "src/main/java" |
640 | #:jdk ,icedtea-8 |
641 | ;; Tests fail with |
642 | ;; org.codehaus.plexus.component.repository.exception.ComponentLookupException: java.util.NoSuchElementException |
643 | ;; role: org.apache.maven.repository.RepositorySystem |
644 | ;; It seems they need maven-compat, which requires maven-core |
645 | #:tests? #f |
646 | ;#:fake-maven? #t |
647 | ;#:version ,(package-version maven) |
648 | ;#:pom-file "pom.xml" |
649 | ;#:group-id "org.apache.maven" |
650 | ;#:artifact-id "maven-core" |
651 | #:phases |
652 | (modify-phases %standard-phases |
653 | (add-before 'configure 'chdir |
654 | (lambda _ |
655 | ;; Required for generating components.xml in maven-core |
656 | (chdir "maven-core"))) |
657 | (add-before 'build 'copy-resources |
658 | (lambda _ |
659 | (mkdir-p "build/classes/") |
660 | (copy-recursively "src/main/resources" "build/classes"))) |
661 | (add-before 'build 'generate-sisu-named |
662 | (lambda _ |
663 | (mkdir-p "build/classes/META-INF/sisu") |
664 | (chmod "../sisu.sh" #o755) |
665 | (zero? (system* "../sisu.sh" "src/main/java" |
666 | "build/classes/META-INF/sisu/javax.inject.Named")))) |
667 | (add-before 'build 'generate-models |
668 | (lambda* (#:key inputs #:allow-other-keys) |
669 | (define (modello-single-mode file version mode) |
670 | (zero? (system* "java" |
671 | "org.codehaus.modello.ModelloCli" |
672 | file mode "src/main/java" version |
673 | "false" "true"))) |
674 | (let ((file "src/main/mdo/toolchains.mdo")) |
675 | (and |
676 | (modello-single-mode file "1.1.0" "java") |
677 | (modello-single-mode file "1.1.0" "xpp3-reader") |
678 | (modello-single-mode file "1.1.0" "xpp3-writer")))))))) |
679 | (inputs |
680 | `(("maven-artifact" ,maven-artifact) |
681 | ("maven-resolver-provider" ,maven-resolver-provider) |
682 | ("maven-builder-support" ,maven-builder-support) |
683 | ("maven-model" ,maven-model) |
684 | ("maven-model-builder" ,maven-model-builder) |
685 | ("maven-settings" ,maven-settings) |
686 | ("maven-settings-builder" ,maven-settings-builder) |
687 | ("maven-plugin-api" ,maven-plugin-api) |
688 | ("maven-repository-metadata" ,maven-repository-metadata) |
689 | ("maven-shared-utils" ,maven-shared-utils) |
690 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
691 | ("java-plexus-utils" ,java-plexus-utils) |
692 | ("java-commons-lang3" ,java-commons-lang3) |
693 | ("java-guava" ,java-guava) |
694 | ("java-guice" ,java-guice) |
695 | ("maven-resolver-api" ,maven-resolver-api) |
696 | ("maven-resolver-spi" ,maven-resolver-spi) |
697 | ("maven-resolver-util" ,maven-resolver-util) |
698 | ("maven-resolver-impl" ,maven-resolver-impl) |
699 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
700 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
701 | ("java-javax-inject" ,java-javax-inject) |
702 | ("java-plexus-classworld" ,java-plexus-classworlds))) |
703 | (native-inputs |
704 | `(("java-modello-core" ,java-modello-core) |
705 | ("java-cglib" ,java-cglib) |
706 | ("java-asm" ,java-asm) |
707 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
708 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
709 | ("java-sisu-build-api" ,java-sisu-build-api) |
710 | ("java-modello-plugins-java" ,java-modello-plugins-java) |
711 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) |
712 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) |
713 | ;; tests |
714 | ("java-junit" ,java-junit) |
715 | ("java-mockito-1" ,java-mockito-1) |
716 | ("java-commons-jxpath" ,java-commons-jxpath))))) |
717 | |
718 | (define-public maven-core |
719 | (package |
720 | (inherit maven-core-boot) |
721 | (name "maven-core") |
722 | (arguments |
723 | (substitute-keyword-arguments (package-arguments maven-core-boot) |
724 | ((#:phases phases) |
725 | `(modify-phases ,phases |
726 | (add-after 'build 'generate-metadata |
727 | (lambda _ |
728 | (delete-file "build/classes/META-INF/plexus/components.xml") |
729 | (and (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
730 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
731 | "--source" "build/classes/META-INF/plexus" |
732 | "--output" "build/classes/META-INF/plexus/components.t.xml" |
733 | ;; I don't know what these two options do, but if |
734 | ;; not present, it ends with a NullPointerException. |
735 | "--classes" "build/classes" |
736 | "--descriptors" "build/classes")) |
737 | ;; Now we merge all other components from hand-written xml |
738 | ;; FIXME: This should be taken care of by plexus-component-metadata directly |
739 | (zero? (system* "sh" "-c" |
740 | (string-append "(cat build/classes/META-INF/plexus/components.t.xml |" |
741 | "sed -e 's|</component-set>||' -e 's|</components>||' ; " |
742 | "cat src/main/resources/META-INF/plexus/artifact-handlers.xml |" |
743 | " sed -e 's|<?xml.*||' -e 's|<component-set>||' -e 's|<components>||'" |
744 | " -e 's|</component-set>||' -e 's|</components>||'; " |
745 | "cat src/main/resources/META-INF/plexus/components.xml |" |
746 | " sed -e 's|<?xml.*||' -e 's|<component-set>||' -e 's|<components>||'" |
747 | " -e 's|</component-set>||' -e 's|</components>||'; " |
748 | "cat src/main/resources/META-INF/plexus/default-bindings.xml |" |
749 | " sed -e 's|<?xml.*||' -e 's|<component-set>||' -e 's|<components>||' )>" |
750 | "build/classes/META-INF/plexus/components.xml")))))) |
751 | (add-after 'generate-metadata 'rebuild |
752 | (lambda _ |
753 | (zero? (system* "ant" "jar")))))))) |
754 | (native-inputs |
755 | `(("java-plexus-component-metadata" ,java-plexus-component-metadata) |
756 | ("java-commons-cli" ,java-commons-cli) |
757 | ("java-plexus-cli" ,java-plexus-cli) |
758 | ("java-jdom2" ,java-jdom2) |
759 | ("java-qdox" ,java-qdox) |
760 | ("maven-core-boot" ,maven-core-boot) |
761 | ,@(package-native-inputs maven-core-boot))))) |
762 | |
763 | (define-public maven-wagon-provider-api |
764 | (package |
765 | (name "maven-wagon-provider-api") |
766 | (version "3.0.0") |
767 | (source (origin |
768 | (method url-fetch) |
769 | (uri (string-append "https://archive.apache.org/dist/maven/wagon/" |
770 | "wagon-" version "-source-release.zip")) |
771 | (sha256 (base32 "1qb0q4m7vmf290xp3fnfdi3pwl3hkskia5g3z2v82q1ch3y2knqv")))) |
772 | (build-system ant-build-system) |
773 | (arguments |
774 | `(#:jar-name "maven-wagon-provider-api.jar" |
775 | #:source-dir "wagon-provider-api/src/main/java" |
776 | #:test-dir "wagon-provider-api/src/test")) |
777 | (inputs |
778 | `(("java-plexus-utils" ,java-plexus-utils))) |
779 | (native-inputs |
780 | `(("unzip" ,unzip) |
781 | ("java-junit" ,java-junit) |
782 | ("java-easymock" ,java-easymock))) |
783 | (home-page "") |
784 | (synopsis "") |
785 | (description "") |
786 | (license license:asl2.0))) |
787 | |
788 | (define-public maven-wagon-provider-test |
789 | (package |
790 | (inherit maven-wagon-provider-api) |
791 | (name "maven-wagon-provider-test") |
792 | (arguments |
793 | `(#:jar-name "maven-wagon-provider-test.jar" |
794 | #:source-dir "wagon-provider-test/src/main/java" |
795 | #:tests? #f; no tests |
796 | #:jdk ,icedtea-8)) |
797 | (inputs |
798 | `(("java-plexus-utils" ,java-plexus-utils) |
799 | ("java-plexus-container-default" ,java-plexus-container-default) |
800 | ("java-eclipse-jetty-util-9.2" ,java-eclipse-jetty-util-9.2) |
801 | ("java-eclipse-jetty-security-9.2" ,java-eclipse-jetty-security-9.2) |
802 | ("java-eclipse-jetty-server-9.2" ,java-eclipse-jetty-server-9.2) |
803 | ("java-eclipse-jetty-servlet-9.2" ,java-eclipse-jetty-servlet-9.2) |
804 | ("java-slf4j-api" ,java-slf4j-api) |
805 | ("java-tomcat" ,java-tomcat) |
806 | ("maven-wagon-provider-api" ,maven-wagon-provider-api))))) |
807 | |
808 | (define-public maven-wagon-file |
809 | (package |
810 | (inherit maven-wagon-provider-api) |
811 | (name "maven-wagon-file") |
812 | (arguments |
813 | `(#:jar-name "maven-wagon-file.jar" |
814 | #:source-dir "wagon-providers/wagon-file/src/main/java" |
815 | #:test-dir "wagon-providers/wagon-file/src/test" |
816 | #:jdk ,icedtea-8 |
817 | #:phases |
818 | (modify-phases %standard-phases |
819 | (add-before 'check 'fix-paths |
820 | (lambda _ |
821 | (substitute* "wagon-providers/wagon-file/src/test/java/org/apache/maven/wagon/providers/file/FileWagonTest.java" |
822 | (("target") "build")))) |
823 | (add-after 'build 'generate-metadata |
824 | (lambda _ |
825 | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
826 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
827 | "--source" "wagon-providers/wagon-file/src/main/java" |
828 | "--output" "build/classes/META-INF/plexus/components.xml" |
829 | ;; I don't know what these two options do, but if |
830 | ;; not present, it ends with a NullPointerException. |
831 | "--classes" "build/classes" |
832 | "--descriptors" "build/classes/META-INF")))) |
833 | (add-after 'generate-metadata 'rebuild |
834 | (lambda _ |
835 | (zero? (system* "ant" "jar"))))))) |
836 | (inputs |
837 | `(("java-plexus-utils" ,java-plexus-utils) |
838 | ("maven-wagon-provider-api" ,maven-wagon-provider-api))) |
839 | (native-inputs |
840 | `(("maven-wagon-provider-test" ,maven-wagon-provider-test) |
841 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) |
842 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
843 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
844 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
845 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
846 | ("java-guava" ,java-guava) |
847 | ("java-guice" ,java-guice) |
848 | ("java-javax-inject" ,java-javax-inject) |
849 | ("java-cglib" ,java-cglib) |
850 | ("java-slf4j-api" ,java-slf4j-api) |
851 | ("java-plexus-utils" ,java-plexus-utils) |
852 | ("java-plexus-cli" ,java-plexus-cli) |
853 | ("maven-plugin-api" ,maven-plugin-api) |
854 | ("maven-plugin-annotations" ,maven-plugin-annotations) |
855 | ("maven-core" ,maven-core) |
856 | ("maven-model" ,maven-model) |
857 | ("java-commons-cli" ,java-commons-cli) |
858 | ("java-qdox" ,java-qdox) |
859 | ("java-jdom2" ,java-jdom2) |
860 | ("java-asm" ,java-asm) |
861 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
862 | ,@(package-native-inputs maven-wagon-provider-api))))) |
863 | |
864 | (define-public maven-wagon-http-shared |
865 | (package |
866 | (inherit maven-wagon-provider-api) |
867 | (name "maven-wagon-http-shared") |
868 | (arguments |
869 | `(#:jar-name "maven-wagon-http-shared.jar" |
870 | #:source-dir "wagon-providers/wagon-http-shared/src/main/java" |
871 | #:test-dir "wagon-providers/wagon-http-shared/src/test" |
872 | #:jdk ,icedtea-8 |
873 | #:phases |
874 | (modify-phases %standard-phases |
875 | (add-after 'build 'generate-metadata |
876 | (lambda _ |
877 | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
878 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
879 | "--source" "wagon-providers/wagon-http-shared/src/main/java" |
880 | "--output" "build/classes/META-INF/plexus/components.xml" |
881 | ;; I don't know what these two options do, but if |
882 | ;; not present, it ends with a NullPointerException. |
883 | "--classes" "build/classes" |
884 | "--descriptors" "build/classes/META-INF")))) |
885 | (add-after 'generate-metadata 'rebuild |
886 | (lambda _ |
887 | (zero? (system* "ant" "jar"))))))) |
888 | (inputs |
889 | `(("java-plexus-utils" ,java-plexus-utils) |
890 | ("java-httpcomponents-client" ,java-httpcomponents-client) |
891 | ("java-httpcomponents-core" ,java-httpcomponents-core) |
892 | ("java-commons-io" ,java-commons-io) |
893 | ("java-jsoup" ,java-jsoup) |
894 | ("maven-wagon-provider-api" ,maven-wagon-provider-api))) |
895 | (native-inputs |
896 | `(("maven-wagon-provider-test" ,maven-wagon-provider-test) |
897 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) |
898 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
899 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
900 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
901 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
902 | ("java-guava" ,java-guava) |
903 | ("java-guice" ,java-guice) |
904 | ("java-javax-inject" ,java-javax-inject) |
905 | ("java-cglib" ,java-cglib) |
906 | ("java-slf4j-api" ,java-slf4j-api) |
907 | ("java-plexus-utils" ,java-plexus-utils) |
908 | ("java-plexus-cli" ,java-plexus-cli) |
909 | ("maven-plugin-api" ,maven-plugin-api) |
910 | ("maven-plugin-annotations" ,maven-plugin-annotations) |
911 | ("maven-core" ,maven-core) |
912 | ("maven-model" ,maven-model) |
913 | ("java-commons-cli" ,java-commons-cli) |
914 | ("java-qdox" ,java-qdox) |
915 | ("java-jdom2" ,java-jdom2) |
916 | ("java-asm" ,java-asm) |
917 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
918 | ,@(package-native-inputs maven-wagon-provider-api))))) |
919 | |
920 | (define-public maven-wagon-tck-http |
921 | (package |
922 | (inherit maven-wagon-provider-api) |
923 | (name "maven-wagon-tck-http") |
924 | (arguments |
925 | `(#:jar-name "maven-wagon-tck-http.jar" |
926 | #:source-dir "wagon-tcks/wagon-tck-http/src/main/java" |
927 | #:tests? #f; no tests |
928 | #:jdk ,icedtea-8)) |
929 | (inputs |
930 | `(("java-plexus-util" ,java-plexus-utils) |
931 | ("maven-wagon-provider-api" ,maven-wagon-provider-api) |
932 | ("java-tomcat" ,java-tomcat) |
933 | ("java-slf4j-api" ,java-slf4j-api) |
934 | ("java-commons-codec" ,java-commons-codec) |
935 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
936 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
937 | ("java-eclipse-jetty-util-9.2" ,java-eclipse-jetty-util-9.2) |
938 | ("java-eclipse-jetty-webapp-9.2" ,java-eclipse-jetty-webapp-9.2) |
939 | ("java-eclipse-jetty-security-9.2" ,java-eclipse-jetty-security-9.2) |
940 | ("java-eclipse-jetty-server-9.2" ,java-eclipse-jetty-server-9.2) |
941 | ("java-eclipse-jetty-servlet-9.2" ,java-eclipse-jetty-servlet-9.2))))) |
942 | |
943 | (define-public maven-wagon-http-lightweight |
944 | (package |
945 | (inherit maven-wagon-provider-api) |
946 | (name "maven-wagon-http-lightweight") |
947 | (arguments |
948 | `(#:jar-name "maven-wagon-http-lightweight.jar" |
949 | #:source-dir "wagon-providers/wagon-http-lightweight/src/main/java" |
950 | #:test-dir "wagon-providers/wagon-http-lightweight/src/test" |
951 | #:jdk ,icedtea-8 |
952 | #:phases |
953 | (modify-phases %standard-phases |
954 | (add-after 'build 'generate-metadata |
955 | (lambda _ |
956 | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
957 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
958 | "--source" "wagon-providers/wagon-http-lightweight/src/main/java" |
959 | "--output" "build/classes/META-INF/plexus/components.xml" |
960 | ;; I don't know what these two options do, but if |
961 | ;; not present, it ends with a NullPointerException. |
962 | "--classes" "build/classes" |
963 | "--descriptors" "build/classes/META-INF")))) |
964 | (add-after 'generate-metadata 'rebuild |
965 | (lambda _ |
966 | (zero? (system* "ant" "jar")))) |
967 | (add-before 'check 'fix-resource-path |
968 | (lambda _ |
969 | (substitute* "wagon-providers/wagon-http-lightweight/src/test/java/org/apache/maven/wagon/providers/http/LightweightHttpsWagonTest.java" |
970 | (("src/test") "wagon-providers/wagon-http-lightweight/src/test")) |
971 | #t))))) |
972 | (inputs |
973 | `(("java-plexus-utils" ,java-plexus-utils) |
974 | ("java-httpcomponents-client" ,java-httpcomponents-client) |
975 | ("java-httpcomponents-core" ,java-httpcomponents-core) |
976 | ("maven-wagon-http-shared" ,maven-wagon-http-shared) |
977 | ("maven-wagon-tck-http" ,maven-wagon-tck-http) |
978 | ("maven-wagon-provider-api" ,maven-wagon-provider-api) |
979 | ("java-commons-io" ,java-commons-io))) |
980 | (native-inputs |
981 | `(("maven-wagon-provider-test" ,maven-wagon-provider-test) |
982 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) |
983 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
984 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
985 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
986 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
987 | ("java-guava" ,java-guava) |
988 | ("java-guice" ,java-guice) |
989 | ("java-javax-inject" ,java-javax-inject) |
990 | ("java-cglib" ,java-cglib) |
991 | ("java-slf4j-api" ,java-slf4j-api) |
992 | ("java-plexus-utils" ,java-plexus-utils) |
993 | ("java-plexus-cli" ,java-plexus-cli) |
994 | ("maven-plugin-api" ,maven-plugin-api) |
995 | ("maven-plugin-annotations" ,maven-plugin-annotations) |
996 | ("maven-core" ,maven-core) |
997 | ("maven-model" ,maven-model) |
998 | ("java-commons-cli" ,java-commons-cli) |
999 | ("java-qdox" ,java-qdox) |
1000 | ("java-jdom2" ,java-jdom2) |
1001 | ("java-asm" ,java-asm) |
1002 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
1003 | ("java-tomcat" ,java-tomcat) |
1004 | ("java-eclispe-jetty-util-9.2" ,java-eclipse-jetty-util-9.2) |
1005 | ("java-eclispe-jetty-io-9.2" ,java-eclipse-jetty-io-9.2) |
1006 | ("java-eclispe-jetty-http-9.2" ,java-eclipse-jetty-http-9.2) |
1007 | ("java-eclispe-jetty-server-9.2" ,java-eclipse-jetty-server-9.2) |
1008 | ("java-eclispe-jetty-servlet-9.2" ,java-eclipse-jetty-servlet-9.2) |
1009 | ("java-eclispe-jetty-security-9.2" ,java-eclipse-jetty-security-9.2) |
1010 | ("java-jsoup" ,java-jsoup) |
1011 | ("java-hamcrest-core" ,java-hamcrest-core) |
1012 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) |
1013 | ("java-slf4j-simple" ,java-slf4j-simple) |
1014 | ,@(package-native-inputs maven-wagon-provider-api))))) |
1015 | |
1016 | (define-public maven-wagon-http |
1017 | (package |
1018 | (inherit maven-wagon-provider-api) |
1019 | (name "maven-wagon-http") |
1020 | (arguments |
1021 | `(#:jar-name "maven-wagon-http.jar" |
1022 | #:source-dir "wagon-providers/wagon-http/src/main/java" |
1023 | #:test-dir "wagon-providers/wagon-http/src/test" |
1024 | #:test-exclude (list |
1025 | "**/Abstract*.java" |
1026 | ;; FIXME: javax.net.ssl.SSLHandshakeException: |
1027 | ;; sun.security.validator.ValidatorException: |
1028 | ;; PKIX path building failed: |
1029 | ;; sun.security.provider.certpath.SunCertPathBuilderException: |
1030 | ;; unable to find valid certification path to requested target |
1031 | "**/HttpsWagonPreemptiveTest.java" |
1032 | "**/HttpsWagonTest.java" |
1033 | ;; Injection errors |
1034 | "**/TckTest.java") |
1035 | #:jdk ,icedtea-8 |
1036 | #:phases |
1037 | (modify-phases %standard-phases |
1038 | (add-before 'build 'copy-resources |
1039 | (lambda _ |
1040 | (install-file "wagon-providers/wagon-http/src/main/resources/META-INF/plexus/components.xml" |
1041 | "build/classes/META-INF/plexus") |
1042 | #t)) |
1043 | (add-before 'check 'fix-resource-path |
1044 | (lambda _ |
1045 | (substitute* '("wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpsWagonPreemptiveTest.java" |
1046 | "wagon-providers/wagon-http/src/test/java/org/apache/maven/wagon/providers/http/HttpsWagonTest.java") |
1047 | (("src/test") "wagon-providers/wagon-http/src/test")) |
1048 | #t))))) |
1049 | (inputs |
1050 | `(("java-plexus-utils" ,java-plexus-utils) |
1051 | ("java-httpcomponents-client" ,java-httpcomponents-client) |
1052 | ("java-httpcomponents-core" ,java-httpcomponents-core) |
1053 | ("maven-wagon-http-shared" ,maven-wagon-http-shared) |
1054 | ("maven-wagon-tck-http" ,maven-wagon-tck-http) |
1055 | ("maven-wagon-provider-api" ,maven-wagon-provider-api))) |
1056 | (native-inputs |
1057 | `(("maven-wagon-provider-test" ,maven-wagon-provider-test) |
1058 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) |
1059 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
1060 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
1061 | ("java-plexus-container-default" ,java-plexus-container-default) |
1062 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
1063 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
1064 | ("java-guava" ,java-guava) |
1065 | ("java-guice" ,java-guice) |
1066 | ("java-inject" ,java-javax-inject) |
1067 | ("java-cglib" ,java-cglib) |
1068 | ("java-slf4j-api" ,java-slf4j-api) |
1069 | ("java-plexus-utils" ,java-plexus-utils) |
1070 | ("java-plexus-cli" ,java-plexus-cli) |
1071 | ("maven-plugin-api" ,maven-plugin-api) |
1072 | ("maven-plugin-annotations" ,maven-plugin-annotations) |
1073 | ("maven-core" ,maven-core) |
1074 | ("maven-model" ,maven-model) |
1075 | ("java-commons-cli" ,java-commons-cli) |
1076 | ("java-qdox" ,java-qdox) |
1077 | ("java-jdom2" ,java-jdom2) |
1078 | ("java-asm" ,java-asm) |
1079 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
1080 | ("java-tomcat" ,java-tomcat) |
1081 | ("java-eclipse-jetty-util-9.2" ,java-eclipse-jetty-util-9.2) |
1082 | ("java-eclipse-jetty-io-9.2" ,java-eclipse-jetty-io-9.2) |
1083 | ("java-eclipse-jetty-http-9.2" ,java-eclipse-jetty-http-9.2) |
1084 | ("java-eclipse-jetty-server-9.2" ,java-eclipse-jetty-server-9.2) |
1085 | ("java-eclipse-jetty-servlet-9.2" ,java-eclipse-jetty-servlet-9.2) |
1086 | ("java-eclipse-jetty-security-9.2" ,java-eclipse-jetty-security-9.2) |
1087 | ("java-hamcrest-core" ,java-hamcrest-core) |
1088 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) |
1089 | ("java-commons-codec" ,java-commons-codec) |
1090 | ("java-commons-io" ,java-commons-io) |
1091 | ("java-jsoup" ,java-jsoup) |
1092 | ("java-slf4j-simple" ,java-slf4j-simple) |
1093 | ,@(package-native-inputs maven-wagon-provider-api))))) |
1094 | |
1095 | (define-public maven-embedder |
1096 | (package |
1097 | (inherit maven) |
1098 | (name "maven-embedder") |
1099 | (arguments |
1100 | `(#:jar-name "maven-embedder.jar" |
1101 | #:source-dir "maven-embedder/src/main/java" |
1102 | #:test-dir "maven-embedder/src/test" |
1103 | #:test-exclude (list "**/MavenCliTest.java") |
1104 | #:jdk ,icedtea-8 |
1105 | #:phases |
1106 | (modify-phases %standard-phases |
1107 | (add-before 'build 'generate-sisu-named |
1108 | (lambda _ |
1109 | (mkdir-p "build/classes/META-INF/sisu") |
1110 | (chmod "sisu.sh" #o755) |
1111 | (zero? (system* "./sisu.sh" "maven-embedder/src/main/java" |
1112 | "build/classes/META-INF/sisu/javax.inject.Named")))) |
1113 | (add-before 'build 'generate-models |
1114 | (lambda* (#:key inputs #:allow-other-keys) |
1115 | (define (modello-single-mode file version mode) |
1116 | (zero? (system* "java" |
1117 | "org.codehaus.modello.ModelloCli" |
1118 | file mode "maven-embedder/src/main/java" version |
1119 | "false" "true"))) |
1120 | (let ((file "maven-embedder/src/main/mdo/core-extensions.mdo")) |
1121 | (and |
1122 | (modello-single-mode file "1.0.0" "java") |
1123 | (modello-single-mode file "1.0.0" "xpp3-reader") |
1124 | (modello-single-mode file "1.0.0" "xpp3-writer"))))) |
1125 | (add-before 'check 'fix-test-paths |
1126 | (lambda _ |
1127 | (substitute* "maven-embedder/src/test/java/org/apache/maven/cli/CLIManagerDocumentationTest.java" |
1128 | (("target/test-classes") "build/test-classes")))) |
1129 | (add-before 'check 'fix-compilation |
1130 | (lambda _ |
1131 | ;; Tests are in the java/ subdir. Other subdirectories contain |
1132 | ;; additional test plugins, with duplicate classes, so we can't |
1133 | ;; compile them. Also, they are meant to be built with maven, to |
1134 | ;; test its build process. |
1135 | (substitute* "build.xml" |
1136 | (("srcdir=\"maven-embedder/src/test\"") |
1137 | "srcdir=\"maven-embedder/src/test/java\""))))))) |
1138 | (inputs |
1139 | `(("maven-core" ,maven-core) |
1140 | ("maven-artifact" ,maven-artifact) |
1141 | ("maven-plugin-api" ,maven-plugin-api) |
1142 | ("maven-builder-support" ,maven-builder-support) |
1143 | ("maven-model" ,maven-model) |
1144 | ("maven-model-builder" ,maven-model-builder) |
1145 | ("maven-settings" ,maven-settings) |
1146 | ("maven-settings-builder" ,maven-settings-builder) |
1147 | ("maven-shared-utils" ,maven-shared-utils) |
1148 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
1149 | ("java-plexus-util" ,java-plexus-utils) |
1150 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
1151 | ("java-plexus-cipher" ,java-plexus-cipher) |
1152 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
1153 | ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) |
1154 | ("maven-resolevr-util" ,maven-resolver-util) |
1155 | ("maven-resolevr-api" ,maven-resolver-api) |
1156 | ("java-logback-core" ,java-logback-core) |
1157 | ("java-logback-classic" ,java-logback-classic) |
1158 | ("java-commons-cli" ,java-commons-cli) |
1159 | ("java-commons-io" ,java-commons-io) |
1160 | ("java-commons-lang3" ,java-commons-lang3) |
1161 | ("java-guava" ,java-guava) |
1162 | ("java-guice" ,java-guice) |
1163 | ("java-javax-inject" ,java-javax-inject) |
1164 | ("java-slf4j-api" ,java-slf4j-api) |
1165 | ("java-slf4j-simple" ,java-slf4j-simple))) |
1166 | (native-inputs |
1167 | `(("java-modello-core" ,java-modello-core) |
1168 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
1169 | ("java-sisu-build-api" ,java-sisu-build-api) |
1170 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
1171 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
1172 | ("java-cglib" ,java-cglib) |
1173 | ("java-asm" ,java-asm) |
1174 | ("java-modello-plugins-java" ,java-modello-plugins-java) |
1175 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) |
1176 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) |
1177 | ;; tests |
1178 | ("java-junit" ,java-junit) |
1179 | ("java-hamcrest-core" ,java-hamcrest-core))))) |
1180 | |
1181 | (define-public maven-resolver-impl |
1182 | (package |
1183 | (inherit maven-resolver-api) |
1184 | (name "maven-resolver-impl") |
1185 | (arguments |
1186 | `(#:jar-name "maven-resolver-impl.jar" |
1187 | #:source-dir "maven-resolver-impl/src/main/java" |
1188 | #:test-dir "maven-resolver-impl/src/test" |
1189 | #:jdk ,icedtea-8 |
1190 | #:phases |
1191 | (modify-phases %standard-phases |
1192 | (add-before 'build 'generate-sisu |
1193 | (lambda _ |
1194 | (mkdir-p "build/classes/META-INF/sisu") |
1195 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" |
1196 | (lambda _ |
1197 | (display |
1198 | (string-append |
1199 | "org.eclipse.aether.internal.impl.DefaultArtifactResolver\n" |
1200 | "org.eclipse.aether.internal.impl.DefaultTransporterProvider\n" |
1201 | "org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer\n" |
1202 | "org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory\n" |
1203 | "org.eclipse.aether.internal.impl.DefaultRepositorySystem\n" |
1204 | "org.eclipse.aether.internal.impl.LoggerFactoryProvider\n" |
1205 | "org.eclipse.aether.internal.impl.DefaultFileProcessor\n" |
1206 | "org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider\n" |
1207 | "org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory\n" |
1208 | "org.eclipse.aether.internal.impl.DefaultDeployer\n" |
1209 | "org.eclipse.aether.internal.impl.DefaultMetadataResolver\n" |
1210 | "org.eclipse.aether.internal.impl.DefaultInstaller\n" |
1211 | "org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory\n" |
1212 | "org.eclipse.aether.internal.impl.DefaultSyncContextFactory\n" |
1213 | "org.eclipse.aether.internal.impl.DefaultOfflineController\n" |
1214 | "org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManagerFactory\n" |
1215 | "org.eclipse.aether.internal.impl.DefaultRepositoryLayoutProvider\n" |
1216 | "org.eclipse.aether.internal.impl.DefaultRemoteRepositoryManager\n" |
1217 | "org.eclipse.aether.internal.impl.DefaultRepositoryEventDispatcher\n" |
1218 | "org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider\n" |
1219 | "org.eclipse.aether.internal.impl.DefaultUpdateCheckManager\n" |
1220 | "org.eclipse.aether.internal.impl.DefaultChecksumPolicyProvider\n" |
1221 | "org.eclipse.aether.internal.impl.DefaultDependencyCollector\n"))))))))) |
1222 | (inputs |
1223 | `(("maven-resolver-api" ,maven-resolver-api) |
1224 | ("maven-resolver-spi" ,maven-resolver-spi) |
1225 | ("maven-resolver-util" ,maven-resolver-util) |
1226 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
1227 | ("java-javax-inject" ,java-javax-inject) |
1228 | ("java-guice" ,java-guice) |
1229 | ("java-guava" ,java-guava) |
1230 | ("java-cglib" ,java-cglib) |
1231 | ("java-asm" ,java-asm) |
1232 | ("jajva-aopalliance" ,java-aopalliance) |
1233 | ("java-slf4j-api" ,java-slf4j-api))) |
1234 | (native-inputs |
1235 | `(("java-junit" ,java-junit) |
1236 | ("java-hamcrest-core" ,java-hamcrest-core) |
1237 | ("maven-resolver-test-util" ,maven-resolver-test-util))))) |
1238 | |
1239 | (define-public maven-resolver-transport-wagon |
1240 | (package |
1241 | (inherit maven-resolver-api) |
1242 | (name "maven-resolver-transport-wagon") |
1243 | (arguments |
1244 | `(#:jar-name "maven-resolver-transport-wagon.jar" |
1245 | #:source-dir "maven-resolver-transport-wagon/src/main/java" |
1246 | #:test-dir "maven-resolver-transport-wagon/src/test" |
1247 | #:jdk ,icedtea-8 |
1248 | #:phases |
1249 | (modify-phases %standard-phases |
1250 | (add-before 'build 'generate-sisu |
1251 | (lambda _ |
1252 | (mkdir-p "build/classes/META-INF/sisu") |
1253 | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" |
1254 | (lambda _ |
1255 | (display "org.eclipse.aether.transport.wagon.WagonTransporterFactory\n"))) |
1256 | #t)) |
1257 | (add-before 'build 'generate-components.xml |
1258 | (lambda _ |
1259 | (mkdir-p "build/classes/META-INF/plexus") |
1260 | (with-output-to-file "build/classes/META-INF/plexus/components.xml" |
1261 | (lambda _ |
1262 | (display |
1263 | (string-append |
1264 | "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" |
1265 | "<component-set>\n" |
1266 | " <components>\n" |
1267 | " <component>\n" |
1268 | " <role>org.eclipse.aether.transport.wagon.WagonConfigurator</role>\n" |
1269 | " <role-hint>plexus</role-hint>\n" |
1270 | " <implementation>org.eclipse.aether.internal.transport.wagon.PlexusWagonConfigurator</implementation>\n" |
1271 | " <description />\n" |
1272 | " <isolated-realm>false</isolated-realm>\n" |
1273 | " <requirements>\n" |
1274 | " <requirement>\n" |
1275 | " <role>org.codehaus.plexus.PlexusContainer</role>\n" |
1276 | " <role-hint />\n" |
1277 | " <field-name>container</field-name>\n" |
1278 | " </requirement>\n" |
1279 | " </requirements>\n" |
1280 | " </component>\n" |
1281 | " <component>\n" |
1282 | " <role>org.eclipse.aether.transport.wagon.WagonProvider</role>\n" |
1283 | " <role-hint>plexus</role-hint>\n" |
1284 | " <implementation>org.eclipse.aether.internal.transport.wagon.PlexusWagonProvider</implementation>\n" |
1285 | " <description />\n" |
1286 | " <isolated-realm>false</isolated-realm>\n" |
1287 | " <requirements>\n" |
1288 | " <requirement>\n" |
1289 | " <role>org.codehaus.plexus.PlexusContainer</role>\n" |
1290 | " <role-hint />\n" |
1291 | " <field-name>container</field-name>\n" |
1292 | " </requirement>\n" |
1293 | " </requirements>\n" |
1294 | " </component>\n" |
1295 | " </components>\n" |
1296 | "</component-set>\n")))) |
1297 | #t))))) |
1298 | (inputs |
1299 | `(("maven-resolver-api" ,maven-resolver-api) |
1300 | ("maven-resolver-spi" ,maven-resolver-spi) |
1301 | ("maven-resolver-util" ,maven-resolver-util) |
1302 | ("java-javax-inject" ,java-javax-inject) |
1303 | ("mavne-wagon-provider-api" ,maven-wagon-provider-api) |
1304 | ("java-plexus-component-annotation" ,java-plexus-component-annotations) |
1305 | ("java-plexus-classworld" ,java-plexus-classworlds) |
1306 | ("java-plexus-plexus-util" ,java-plexus-utils) |
1307 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
1308 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus))) |
1309 | (native-inputs |
1310 | `(("java-junit" ,java-junit) |
1311 | ("java-hamcrest-core" ,java-hamcrest-core) |
1312 | ("maven-resolver-test-util" ,maven-resolver-test-util) |
1313 | ("java-guava" ,java-guava) |
1314 | ("java-cglib" ,java-cglib) |
1315 | ("java-asm" ,java-asm) |
1316 | ("java-aopalliance" ,java-aopalliance) |
1317 | ("java-guice" ,java-guice))))) |
1318 | |
1319 | (define-public maven-slf4j-provider |
1320 | (package |
1321 | (inherit maven) |
1322 | (name "maven-slf4j-provider") |
1323 | (arguments |
1324 | `(#:jar-name "maven-slf4j-provider" |
1325 | #:source-dir "maven-slf4j-provider/src/main/java" |
1326 | #:jdk ,icedtea-8 |
1327 | #:tests? #f; no tests |
1328 | #:phases |
1329 | (modify-phases %standard-phases |
1330 | (add-before 'build 'generate-simple-sources |
1331 | (lambda* (#:key inputs #:allow-other-keys) |
1332 | (mkdir-p "maven-slf4j-provider/target/generated-sources") |
1333 | (with-directory-excursion "maven-slf4j-provider/target/generated-sources" |
1334 | (system* "tar" "xf" (assoc-ref inputs "java-slf4j-simple"))) |
1335 | (with-directory-excursion "maven-slf4j-provider/" |
1336 | (zero? (system* "groovy" |
1337 | "src/main/script/patch-slf4j-simple.groovy")))))))) |
1338 | (inputs |
1339 | `(("java-slf4j-api" ,java-slf4j-api) |
1340 | ("java-slf4j-simple" ,(package-source java-slf4j-simple)) |
1341 | ("maven-shared-utils" ,maven-shared-utils))) |
1342 | (native-inputs |
1343 | `(("groovy" ,groovy))))) |
1344 | |
1345 | (define-public maven-compat |
1346 | (package |
1347 | (inherit maven) |
1348 | (name "maven-compat") |
1349 | (arguments |
1350 | `(#:jar-name "maven-compat.jar" |
1351 | #:source-dir "src/main/java" |
1352 | #:jdk ,icedtea-8 |
1353 | #:test-dir "src/test" |
1354 | #:phases |
1355 | (modify-phases %standard-phases |
1356 | ;; Tests assume we're in this directory |
1357 | (add-before 'configure 'chdir |
1358 | (lambda _ |
1359 | (chdir "maven-compat"))) |
1360 | (add-before 'build 'generate-models |
1361 | (lambda* (#:key inputs #:allow-other-keys) |
1362 | (define (modello-single-mode file version mode) |
1363 | (zero? (system* "java" |
1364 | "org.codehaus.modello.ModelloCli" |
1365 | file mode "src/main/java" version |
1366 | "false" "true"))) |
1367 | (let ((file "src/main/mdo/profiles.mdo")) |
1368 | (and |
1369 | (modello-single-mode file "1.0.0" "java") |
1370 | (modello-single-mode file "1.0.0" "xpp3-reader") |
1371 | (modello-single-mode file "1.0.0" "xpp3-writer"))) |
1372 | (let ((file "src/main/mdo/paramdoc.mdo")) |
1373 | (and |
1374 | (modello-single-mode file "1.0.0" "java") |
1375 | (modello-single-mode file "1.0.0" "xpp3-reader") |
1376 | (modello-single-mode file "1.0.0" "xpp3-writer"))))) |
1377 | (add-after 'build 'generate-metadata |
1378 | (lambda _ |
1379 | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
1380 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
1381 | "--source" "src/main/java" |
1382 | "--output" "build/classes/META-INF/plexus/components.xml" |
1383 | ;; I don't know what these two options do, but if |
1384 | ;; not present, it ends with a NullPointerException. |
1385 | "--classes" "build/classes" |
1386 | "--descriptors" "build/classes/META-INF")))) |
1387 | (add-before 'check 'build-tests |
1388 | (lambda _ |
1389 | (zero? (system* "ant" "compile-tests")))) |
1390 | (add-after 'build-tests 'generate-test-metadata |
1391 | (lambda _ |
1392 | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") |
1393 | ":build/classes" |
1394 | ":build/test-classes") |
1395 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
1396 | "--source" "src/test/java" |
1397 | "--output" "build/test-classes/META-INF/plexus/components.xml" |
1398 | ;; I don't know what these two options do, but if |
1399 | ;; not present, it ends with a NullPointerException. |
1400 | "--classes" "build/test-classes" |
1401 | "--descriptors" "build/test-classes/META-INF")))) |
1402 | (add-after 'generate-metadata 'rebuild |
1403 | (lambda _ |
1404 | (zero? (system* "ant" "jar"))))))) |
1405 | (inputs |
1406 | `(("maven-artifact" ,maven-artifact) |
1407 | ("maven-repository-metadata" ,maven-repository-metadata) |
1408 | ("maven-builder-support" ,maven-builder-support) |
1409 | ("maven-model" ,maven-model) |
1410 | ("maven-model-builder" ,maven-model-builder) |
1411 | ("maven-settings" ,maven-settings) |
1412 | ("maven-settings-builder" ,maven-settings-builder) |
1413 | ("maven-core" ,maven-core) |
1414 | ("maven-wagon-provider-api" ,maven-wagon-provider-api) |
1415 | ("maven-wagon-file" ,maven-wagon-file) |
1416 | ("maven-resolver-api" ,maven-resolver-api) |
1417 | ("maven-resolver-util" ,maven-resolver-util) |
1418 | ("maven-resolver-spi" ,maven-resolver-spi) |
1419 | ("java-plexus-interpolation" ,java-plexus-interpolation))) |
1420 | (native-inputs |
1421 | `(("java-modello-core" ,java-modello-core) |
1422 | ("java-plexus-utils" ,java-plexus-utils) |
1423 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
1424 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
1425 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
1426 | ("java-sisu-build-api" ,java-sisu-build-api) |
1427 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
1428 | ("java-exclispe-sisu-inject" ,java-eclipse-sisu-inject) |
1429 | ("java-javax-inject" ,java-javax-inject) |
1430 | ("java-guice" ,java-guice) |
1431 | ("java-guava" ,java-guava) |
1432 | ("java-cglib" ,java-cglib) |
1433 | ("java-asm" ,java-asm) |
1434 | ("java-modello-plugins-java" ,java-modello-plugins-java) |
1435 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) |
1436 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) |
1437 | ;; metadata |
1438 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) |
1439 | ("java-commons-cli" ,java-commons-cli) |
1440 | ("java-plexus-cli" ,java-plexus-cli) |
1441 | ("java-jdom2" ,java-jdom2) |
1442 | ("maven-plugin-api" ,maven-plugin-api) |
1443 | ("java-qdox" ,java-qdox) |
1444 | ;; tests |
1445 | ("java-plexus-cipher" ,java-plexus-cipher) |
1446 | ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) |
1447 | ("java-jsr250", java-jsr250) |
1448 | ("java-cdi-api" ,java-cdi-api) |
1449 | ("java-junit" ,java-junit) |
1450 | ("maven-resolver-impl" ,maven-resolver-impl) |
1451 | ("maven-resolver-connector-basic" ,maven-resolver-connector-basic) |
1452 | ("maven-resolver-transport-wagon" ,maven-resolver-transport-wagon) |
1453 | ("java-commons-lang3" ,java-commons-lang3) |
1454 | ("java-aop" ,java-aopalliance) |
1455 | ("maven-resolver-provider" ,maven-resolver-provider) |
1456 | ("java-slf4j-api" ,java-slf4j-api) |
1457 | ("java-slf4j-simple" ,java-slf4j-simple) |
1458 | ,@(package-inputs java-slf4j-api))))) |
1459 | |
1460 | (define-public maven-plugin-annotations |
1461 | (package |
1462 | (name "maven-plugin-annotations") |
1463 | (version "3.5") |
1464 | (source (origin |
1465 | (method url-fetch) |
1466 | (uri (string-append "https://archive.apache.org/dist/maven/" |
1467 | "plugin-tools/maven-plugin-tools-" version |
1468 | "-source-release.zip")) |
1469 | (sha256 (base32 "1ryqhs62j5pas93brhf5dsnvp99hxbvssf681yj5rk3r9h24hqm2")))) |
1470 | (build-system ant-build-system) |
1471 | (arguments |
1472 | `(#:jar-name "maven-plugin-annotations.jar" |
1473 | #:source-dir "maven-plugin-annotations/src/main/java" |
1474 | #:tests? #f)) |
1475 | (inputs |
1476 | `(("maven-artifact" ,maven-artifact))) |
1477 | (native-inputs |
1478 | `(("unzip" ,unzip))) |
1479 | (home-page "") |
1480 | (synopsis "") |
1481 | (description "") |
1482 | (license license:asl2.0))) |
1483 | |
1484 | (define-public kotlin |
1485 | (package |
1486 | (name "kotlin") |
1487 | (version "1.1.61") |
1488 | (source (origin |
1489 | (method url-fetch) |
1490 | (uri (string-append "https://github.com/JetBrains/kotlin/archive/v" |
1491 | version ".tar.gz")) |
1492 | (file-name (string-append name "-" version ".tar.gz")) |
1493 | (sha256 |
1494 | (base32 |
1495 | "0pj7x0b93r85cc3wj1lj1ydf48rikdbv0hq6wfxs059z140icq0a")))) |
1496 | (build-system ant-build-system) |
1497 | (home-page "https://kotlinlang.org/") |
1498 | (synopsis "Statically typed programming language") |
1499 | (description "") |
1500 | ;; described in license/README.md |
1501 | ;; Kotlin is under asl2.0, third-party libraries have different licenses |
1502 | (license license:asl2.0))) |
1503 |