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