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