maven.scm
1 | ;;; GNU Guix --- Functional package management for GNU |
2 | ;;; Copyright © 2017, 2019 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 utils) |
26 | #:use-module (guix build-system ant) |
27 | #:use-module (guix build-system trivial) |
28 | #:use-module (gnu packages bash) |
29 | #:use-module (gnu packages compression) |
30 | #:use-module (gnu packages groovy) |
31 | #:use-module (gnu packages java) |
32 | #:use-module (gnu packages maven) |
33 | #:use-module (gnu packages web) |
34 | #:use-module (gnu packages version-control) |
35 | #:use-module (gnu packages xml) |
36 | #:use-module (more packages java)) |
37 | |
38 | (define-public maven-polyglot-common |
39 | (package |
40 | (name "maven-polyglot-common") |
41 | (version "0.3.0") |
42 | (source (origin |
43 | (method url-fetch) |
44 | (uri (string-append "https://github.com/takari/polyglot-maven/" |
45 | "archive/polyglot-" version ".tar.gz")) |
46 | (sha256 |
47 | (base32 |
48 | "0v8j2gj0s4vrddyk0ll38rbl69vm6rv2wnn0c8nlsz2824vhvzca")))) |
49 | (build-system ant-build-system) |
50 | (arguments |
51 | `(#:jar-name "maven-polyglot-common.jar" |
52 | #:source-dir "polyglot-common/src/main/java" |
53 | #:tests? #f; No test |
54 | #:phases |
55 | (modify-phases %standard-phases |
56 | (add-before 'build 'copy-resources |
57 | (lambda _ |
58 | (install-file "polyglot-common/src/main/resources-filtered/maven-polyglot.properties" |
59 | "build/classes") |
60 | #t)) |
61 | (add-after 'build 'generate-metadata |
62 | (lambda _ |
63 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
64 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
65 | "--source" "polyglot-common/src/main/java" |
66 | "--output" "build/classes/META-INF/plexus/components.xml" |
67 | "--classes" "build/classes" |
68 | "--descriptors" "build/classes/META-INF") |
69 | #t)) |
70 | (add-after 'generate-metadata 'rebuild |
71 | (lambda _ |
72 | (invoke "ant" "jar") |
73 | #t))))) |
74 | (inputs |
75 | `(("java-plexus-classworlds" ,java-plexus-classworlds) |
76 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
77 | ("java-plexus-container-default" ,java-plexus-container-default) |
78 | ("java-plexus-utils" ,java-plexus-utils) |
79 | ("maven-builder-support" ,maven-builder-support) |
80 | ("maven-core" ,maven-core) |
81 | ("maven-model" ,maven-model) |
82 | ("maven-model-builder" ,maven-model-builder) |
83 | ("maven-plugin-api" ,maven-plugin-api))) |
84 | (native-inputs |
85 | `(("java-plexus-component-metadata" ,java-plexus-component-metadata) |
86 | ("java-plexus-cli" ,java-plexus-cli) |
87 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
88 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
89 | ("java-commons-cli" ,java-commons-cli) |
90 | ("java-asm" ,java-asm) |
91 | ("java-guice" ,java-guice) |
92 | ("java-guava" ,java-guava) |
93 | ("java-cglib" ,java-cglib) |
94 | ("java-jdom2" ,java-jdom2) |
95 | ("java-qdox" ,java-qdox) |
96 | ("java-javax-inject" ,java-javax-inject))) |
97 | (home-page "https://github.com/takari/polyglot-maven") |
98 | (synopsis "") |
99 | (description "") |
100 | (license license:epl1.0))) |
101 | |
102 | (define-public maven-polyglot-java |
103 | (package |
104 | (inherit maven-polyglot-common) |
105 | (name "maven-polyglot-java") |
106 | (arguments |
107 | `(#:jar-name "maven-polyglot-java.jar" |
108 | #:source-dir "polyglot-java/src/main/java" |
109 | #:tests? #f; No test |
110 | #:phases |
111 | (modify-phases %standard-phases |
112 | (add-before 'build 'copy-resources |
113 | (lambda _ |
114 | (install-file "polyglot-java/src/main/resources/META-INF/maven/extension.xml" |
115 | "build/classes/META-INF/maven") |
116 | #t)) |
117 | (add-after 'build 'generate-metadata |
118 | (lambda _ |
119 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
120 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
121 | "--source" "polyglot-java/src/main/java" |
122 | "--output" "build/classes/META-INF/plexus/components.xml" |
123 | "--classes" "build/classes" |
124 | "--descriptors" "build/classes/META-INF") |
125 | #t)) |
126 | (add-after 'generate-metadata 'rebuild |
127 | (lambda _ |
128 | (invoke "ant" "jar") |
129 | #t))))) |
130 | (inputs |
131 | `(("maven-polyglot-common" ,maven-polyglot-common) |
132 | ("java-commons-beanutils" ,java-commons-beanutils) |
133 | ("java-commons-io" ,java-commons-io) |
134 | ("java-guava" ,java-guava) |
135 | ,@(package-inputs maven-polyglot-common))))) |
136 | |
137 | (define-public maven-polyglot-groovy |
138 | (package |
139 | (inherit maven-polyglot-common) |
140 | (name "maven-polyglot-groovy") |
141 | (arguments |
142 | `(#:jar-name "maven-polyglot-groovy.jar" |
143 | #:source-dir "polyglot-groovy/src/main/java:polyglot-groovy/src/main/groovy" |
144 | #:tests? #f; No test |
145 | #:phases |
146 | (modify-phases %standard-phases |
147 | (add-before 'build 'use-groovy |
148 | (lambda _ |
149 | (substitute* "build.xml" |
150 | ;; Change the compiler to groovyc |
151 | (("javac") "groovyc") |
152 | ;; Make it fork |
153 | (("includeantruntime=\"false\"") |
154 | "includeantruntime=\"false\" fork=\"yes\"") |
155 | ;; groovyc doesn't understand the --classpath argument (bug?) |
156 | (("classpath=\"@refidclasspath\"") |
157 | "classpathref=\"classpath\"") |
158 | ;; To enable joint compilation |
159 | (("classpathref=\"classpath\" />") |
160 | "classpathref=\"classpath\"><javac source=\"1.5\" target=\"1.5\" /></groovyc>") |
161 | ;; Actually create a definition of the groovyc task. |
162 | ;; FIXME: Can't we use groovy-ant for that? |
163 | (("<project basedir=\".\">") |
164 | "<project basedir=\".\"><taskdef name=\"groovyc\" |
165 | classname=\"org.codehaus.groovy.ant.Groovyc\" />")) |
166 | #t)) |
167 | (add-before 'build 'copy-resources |
168 | (lambda _ |
169 | (install-file "polyglot-groovy/src/main/resources/META-INF/maven/extension.xml" |
170 | "build/classes/META-INF/maven") |
171 | #t)) |
172 | (add-after 'build 'generate-metadata |
173 | (lambda _ |
174 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
175 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
176 | "--source" "polyglot-groovy/src/main/java" |
177 | "--output" "build/classes/META-INF/plexus/components.xml" |
178 | "--classes" "build/classes" |
179 | "--descriptors" "build/classes/META-INF") |
180 | #t)) |
181 | (add-after 'generate-metadata 'rebuild |
182 | (lambda _ |
183 | (invoke "ant" "jar") |
184 | #t))))) |
185 | (inputs |
186 | `(("maven-polyglot-common" ,maven-polyglot-common) |
187 | ("groovy" ,groovy) |
188 | ("java-slf4j-api" ,java-slf4j-api) |
189 | ,@(package-inputs maven-polyglot-common))))) |
190 | |
191 | (define-public maven-slf4j-provider |
192 | (package |
193 | (inherit maven-artifact) |
194 | (name "maven-slf4j-provider") |
195 | (arguments |
196 | `(#:jar-name "maven-slf4j-provider.jar" |
197 | #:source-dir "maven-slf4j-provider/src/main/java" |
198 | #:tests? #f)); no tests |
199 | (inputs |
200 | `(("maven-shared-utils" ,maven-shared-utils) |
201 | ("java-slf4j-api" ,java-slf4j-api) |
202 | ("java-slf4j-simple" ,java-slf4j-simple))) |
203 | (synopsis "") |
204 | (description "") |
205 | (license license:asl2.0))) |
206 | |
207 | (define-public maven-filtering |
208 | (package |
209 | (name "maven-filtering") |
210 | (version "3.1.1") |
211 | (source (origin |
212 | (method url-fetch) |
213 | (uri (string-append "https://archive.apache.org/dist/maven/" |
214 | "shared/maven-filtering-" version |
215 | "-source-release.zip")) |
216 | (sha256 |
217 | (base32 |
218 | "09wrdhchnszd2l6h4z30ra0bv1a19qyjgac9z8zf1pn0m4nw05yz")))) |
219 | (build-system ant-build-system) |
220 | (arguments |
221 | `(#:jar-name "maven-filtering.jar" |
222 | #:source-dir "src/main/java" |
223 | #:test-dir "src/test" |
224 | #:tests? #f; tests fail for now... |
225 | #:phases |
226 | (modify-phases %standard-phases |
227 | (add-before 'build 'remove-failing-test |
228 | (lambda _ |
229 | (delete-file "src/test/java/org/apache/maven/shared/filtering/IncrementalResourceFilteringTest.java") |
230 | (substitute* "src/test/java/org/apache/maven/shared/filtering/StubMavenSession.java" |
231 | (("org.sonatype.aether.RepositorySystemSession") |
232 | "org.eclipse.aether.RepositorySystemSession")) |
233 | #t))))) |
234 | (inputs |
235 | `(("java-jsr305" ,java-jsr305) |
236 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
237 | ("java-plexus-container-default" ,java-plexus-container-default) |
238 | ("java-plexus-interpolation" ,java-plexus-interpolation) |
239 | ("java-plexus-utils" ,java-plexus-utils) |
240 | ("java-sisu-build-api" ,java-sisu-build-api) |
241 | ("maven-core" ,maven-core) |
242 | ("maven-model" ,maven-model) |
243 | ("maven-settings" ,maven-settings) |
244 | ("maven-shared-utils" ,maven-shared-utils))) |
245 | (native-inputs |
246 | `(("java-assertj" ,java-assertj) |
247 | ("java-guava" ,java-guava) |
248 | ("java-hamcrest-core" ,java-hamcrest-core) |
249 | ("java-junit" ,java-junit) |
250 | ("java-mockito-1" ,java-mockito-1) |
251 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
252 | ("maven-resolver-api" ,maven-resolver-api) |
253 | ("unzip" ,unzip))) |
254 | (home-page "") |
255 | (synopsis "") |
256 | (description "") |
257 | (license license:asl2.0))) |
258 | |
259 | (define-public maven-plugin-testing |
260 | (package |
261 | (name "maven-plugin-testing") |
262 | (version "3.3.0") |
263 | (source (origin |
264 | (method url-fetch) |
265 | (uri (string-append "https://github.com/apache/maven-plugin-testing/" |
266 | "archive/maven-plugin-testing-" version ".tar.gz")) |
267 | (sha256 |
268 | (base32 |
269 | "010jp44vq75fk6260zvqz41ai3l1sqrjz56yyzv9pgshx27vpshy")))) |
270 | (build-system ant-build-system) |
271 | (arguments |
272 | `(#:jar-name "maven-plugin-testing.jar" |
273 | #:source-dir "maven-plugin-testing-harness/src/main/java" |
274 | #:test-dir "maven-plugin-testing-harness/src/test")) |
275 | (inputs |
276 | `(("java-commons-io" ,java-commons-io) |
277 | ("java-guice" ,java-guice) |
278 | ("java-junit" ,java-junit) |
279 | ("java-plexus-archiver" ,java-plexus-archiver) |
280 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
281 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
282 | ("java-plexus-container-default" ,java-plexus-container-default) |
283 | ("java-plexus-utils" ,java-plexus-utils) |
284 | ("maven-artifact" ,maven-artifact) |
285 | ("maven-compat" ,maven-compat) |
286 | ("maven-core" ,maven-core) |
287 | ("maven-model" ,maven-model) |
288 | ("maven-model-builder" ,maven-model-builder) |
289 | ("maven-plugin-api" ,maven-plugin-api) |
290 | ("maven-resolver-api" ,maven-resolver-api) |
291 | ("maven-resolver-provider" ,maven-resolver-provider) |
292 | ("maven-wagon-provider-api" ,maven-wagon-provider-api))) |
293 | (home-page "") |
294 | (synopsis "") |
295 | (description "") |
296 | (license license:asl2.0))) |
297 | |
298 | (define-public maven-doxia-logging-api |
299 | (package |
300 | (name "maven-doxia-logging-api") |
301 | (version "1.8") |
302 | (source (origin |
303 | (method url-fetch) |
304 | (uri (string-append "https://github.com/apache/maven-doxia/" |
305 | "archive/doxia-" version ".tar.gz")) |
306 | (sha256 |
307 | (base32 |
308 | "07qckb1fsycnz5b08xbm8b1hjz8295ri6xi47s47rlwxg53hvf4s")))) |
309 | (build-system ant-build-system) |
310 | (arguments |
311 | `(#:jar-name "maven-doxia-logging-api.jar" |
312 | #:source-dir "doxia-logging-api/src/main/java" |
313 | #:tests? #f)); No tests |
314 | (inputs |
315 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations) |
316 | ("java-plexus-container-default" ,java-plexus-container-default))) |
317 | (home-page "https://maven.apache.org/doxia") |
318 | (synopsis "Content generation framework") |
319 | (description "Doxia is a content generation framework for generating static |
320 | and dynamic content, that supports a variety of markup languages.") |
321 | (license license:asl2.0))) |
322 | |
323 | (define-public maven-doxia-sink-api |
324 | (package |
325 | (inherit maven-doxia-logging-api) |
326 | (name "maven-doxia-sink-api") |
327 | (arguments |
328 | `(#:jar-name "maven-doxia-sink-api.jar" |
329 | #:source-dir "doxia-sink-api/src/main/java" |
330 | #:tests? #f)); No tests |
331 | (inputs |
332 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations) |
333 | ("java-plexus-container-default" ,java-plexus-container-default) |
334 | ("maven-doxia-logging-api" ,maven-doxia-logging-api))))) |
335 | |
336 | (define-public maven-doxia-core |
337 | (package |
338 | (inherit maven-doxia-logging-api) |
339 | (name "maven-doxia-core") |
340 | (arguments |
341 | `(#:jar-name "maven-doxia-core.jar" |
342 | #:source-dir "doxia-core/src/main/java" |
343 | #:test-dir "doxia-core/src/test" |
344 | #:test-exclude |
345 | ;; test fails for unknown reason |
346 | (list "**/SnippetMacroTest.java" |
347 | ;; requires network |
348 | "**/XmlValidatorTest.java" |
349 | "**/Abstract*Test.java") |
350 | #:phases |
351 | (modify-phases %standard-phases |
352 | (add-before 'build 'copy-resources |
353 | (lambda _ |
354 | (copy-recursively "doxia-core/src/main/resources" |
355 | "build/classes") |
356 | #t)) |
357 | (add-before 'build 'generate-models |
358 | (lambda* (#:key inputs #:allow-other-keys) |
359 | (define (modello-single-mode file version mode) |
360 | (invoke "java" "org.codehaus.modello.ModelloCli" |
361 | file mode "doxia-core/src/main/java" version |
362 | "false" "true")) |
363 | (let ((file "doxia-core/src/main/mdo/document.mdo")) |
364 | (modello-single-mode file "4.0.0" "java") |
365 | (modello-single-mode file "4.0.0" "xpp3-reader") |
366 | (modello-single-mode file "4.0.0" "xpp3-writer") |
367 | (modello-single-mode file "4.0.0" "xsd")) |
368 | #t)) |
369 | (add-after 'build 'generate-metadata |
370 | (lambda _ |
371 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
372 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
373 | "--source" "doxia-core/src/main/java" |
374 | "--output" "build/classes/META-INF/plexus/components.xml" |
375 | "--classes" "build/classes" |
376 | "--descriptors" "build/classes/META-INF") |
377 | #t)) |
378 | (add-after 'generate-metadata 'rebuild |
379 | (lambda _ |
380 | (invoke "ant" "jar") |
381 | #t))))) |
382 | (inputs |
383 | `(("java-commons-lang3" ,java-commons-lang3) |
384 | ("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) |
385 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) |
386 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
387 | ("java-plexus-container-default" ,java-plexus-container-default) |
388 | ("maven-doxia-logging-api" ,maven-doxia-logging-api) |
389 | ("maven-doxia-sink-api" ,maven-doxia-sink-api))) |
390 | (native-inputs |
391 | `(("java-modello-core" ,java-modello-core) |
392 | ;; for modello: |
393 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
394 | ("java-plexus-utils" ,java-plexus-utils) |
395 | ("java-guice" ,java-guice) |
396 | ("java-cglib" ,java-cglib) |
397 | ("java-asm" ,java-asm) |
398 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
399 | ("java-javax-inject" ,java-javax-inject) |
400 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
401 | ("java-guava" ,java-guava) |
402 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
403 | ("java-sisu-build-api" ,java-sisu-build-api) |
404 | ;; modello plugins: |
405 | ("java-modello-plugins-java" ,java-modello-plugins-java) |
406 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) |
407 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) |
408 | ("java-modello-plugins-xsd" ,java-modello-plugins-xsd) |
409 | ;; for tests |
410 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) |
411 | ("java-hamcrest-core" ,java-hamcrest-core) |
412 | ("java-junit" ,java-junit) |
413 | ("java-xmlunit" ,java-xmlunit) |
414 | ("java-xmlunit-matchers" ,java-xmlunit-matchers) |
415 | ;; for generating metadata |
416 | ("java-commons-cli" ,java-commons-cli) |
417 | ("java-jdom2" ,java-jdom2) |
418 | ("java-plexus-cli" ,java-plexus-cli) |
419 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) |
420 | ("java-qdox" ,java-qdox) |
421 | ("maven-plugin-api" ,maven-plugin-api))))) |
422 | |
423 | (define-public maven-doxia-module-xhtml |
424 | (package |
425 | (inherit maven-doxia-logging-api) |
426 | (name "maven-doxia-module-xhtml") |
427 | (arguments |
428 | `(#:jar-name "maven-doxia-module-xhtml.jar" |
429 | #:source-dir "doxia-modules/doxia-module-xhtml/src/main/java" |
430 | #:test-dir "doxia-modules/doxia-module-xhtml/src/test" |
431 | #:test-exclude |
432 | ;; test fails for unknown reason |
433 | (list "**/SnippetMacroTest.java" |
434 | ;; requires network |
435 | "**/XmlValidatorTest.java" |
436 | "**/Abstract*Test.java") |
437 | #:phases |
438 | (modify-phases %standard-phases |
439 | (add-before 'build 'copy-test-classes |
440 | (lambda _ |
441 | (copy-recursively "doxia-core/src/test/java" "doxia-modules/doxia-module-xhtml/src/test/java") |
442 | (copy-file "doxia-core/src/test/java/org/apache/maven/doxia/module/AbstractIdentityTest.java" |
443 | "doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/module/AbstractIdentityTest.java") |
444 | (copy-file "doxia-core/src/test/java/org/apache/maven/doxia/AbstractModuleTest.java" |
445 | "doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/AbstractModuleTest.java") |
446 | (mkdir-p "doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/sink/impl") |
447 | (copy-file "doxia-core/src/test/java/org/apache/maven/doxia/sink/impl/SinkTestDocument.java" |
448 | "doxia-modules/doxia-module-xhtml/src/test/java/org/apache/maven/doxia/sink/impl/SinkTestDocument.java") |
449 | #t)) |
450 | (add-after 'build 'generate-metadata |
451 | (lambda _ |
452 | (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") |
453 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" |
454 | "--source" "doxia-modules/doxia-module-xhtml/src/main/java" |
455 | "--output" "build/classes/META-INF/plexus/components.xml" |
456 | "--classes" "build/classes" |
457 | "--descriptors" "build/classes/META-INF") |
458 | #t)) |
459 | (add-after 'generate-metadata 'rebuild |
460 | (lambda _ |
461 | (invoke "ant" "jar") |
462 | #t))))) |
463 | (inputs |
464 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations) |
465 | ("java-plexus-utils" ,java-plexus-utils) |
466 | ("maven-doxia-core" ,maven-doxia-core) |
467 | ("maven-doxia-logging-api" ,maven-doxia-logging-api) |
468 | ("maven-doxia-sink-api" ,maven-doxia-sink-api))) |
469 | (native-inputs |
470 | `(("java-commons-lang3" ,java-commons-lang3) |
471 | ("java-commons-logging-minimal" ,java-commons-logging-minimal) |
472 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
473 | ("java-guava" ,java-guava) |
474 | ("java-hamcrest-core" ,java-hamcrest-core) |
475 | ("java-httpcomponents-httpclient" ,java-httpcomponents-httpclient) |
476 | ("java-httpcomponents-httpcore" ,java-httpcomponents-httpcore) |
477 | ("java-junit" ,java-junit) |
478 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
479 | ("java-plexus-container-default" ,java-plexus-container-default) |
480 | ("java-xmlunit" ,java-xmlunit) |
481 | ("java-xmlunit-matchers" ,java-xmlunit-matchers) |
482 | ;; for generating metadata |
483 | ("java-asm" ,java-asm) |
484 | ("java-commons-cli" ,java-commons-cli) |
485 | ("java-jdom2" ,java-jdom2) |
486 | ("java-plexus-cli" ,java-plexus-cli) |
487 | ("java-plexus-component-metadata" ,java-plexus-component-metadata) |
488 | ("java-qdox" ,java-qdox) |
489 | ("maven-plugin-api" ,maven-plugin-api))))) |
490 | |
491 | (define-public maven-doxia-skin-model |
492 | (package |
493 | (name "maven-doxia-skin-model") |
494 | (version "1.8.1") |
495 | (source (origin |
496 | (method url-fetch) |
497 | (uri (string-append "https://github.com/apache/maven-doxia-sitetools/" |
498 | "archive/doxia-sitetools-" version ".tar.gz")) |
499 | (sha256 |
500 | (base32 |
501 | "02dgblm6n07jwr7r90wzc8ax9vz3ax7rh5w12wmvfyd5aybh691w")) |
502 | (patches |
503 | (search-patches "maven-doxia-sitetools-fix-plexus-utils.patch")))) |
504 | (build-system ant-build-system) |
505 | (arguments |
506 | `(#:jar-name "maven-doxia-skin-model.jar" |
507 | #:source-dir "doxia-skin-model/src/main/java" |
508 | #:tests? #f; no tests |
509 | #:phases |
510 | (modify-phases %standard-phases |
511 | (add-before 'build 'generate-models |
512 | (lambda* (#:key inputs #:allow-other-keys) |
513 | (define (modello-single-mode file version mode) |
514 | (invoke "java" "org.codehaus.modello.ModelloCli" |
515 | file mode "doxia-skin-model/src/main/java" version |
516 | "false" "true")) |
517 | (let ((file "doxia-skin-model/src/main/mdo/skin.mdo")) |
518 | (modello-single-mode file "4.0.0" "java") |
519 | (modello-single-mode file "4.0.0" "xpp3-reader") |
520 | (modello-single-mode file "4.0.0" "xsd")) |
521 | #t))))) |
522 | (inputs |
523 | `(("maven-doxia-sink-api" ,maven-doxia-sink-api))) |
524 | (native-inputs |
525 | `(("unzip" ,unzip) |
526 | ("java-modello-core" ,java-modello-core) |
527 | ;; for modello: |
528 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
529 | ("java-plexus-utils" ,java-plexus-utils) |
530 | ("java-guice" ,java-guice) |
531 | ("java-cglib" ,java-cglib) |
532 | ("java-asm" ,java-asm) |
533 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
534 | ("java-javax-inject" ,java-javax-inject) |
535 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
536 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
537 | ("java-guava" ,java-guava) |
538 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
539 | ("java-sisu-build-api" ,java-sisu-build-api) |
540 | ;; modello plugins: |
541 | ("java-modello-plugins-java" ,java-modello-plugins-java) |
542 | ("java-modello-plugins-xml" ,java-modello-plugins-xml) |
543 | ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) |
544 | ("java-modello-plugins-xsd" ,java-modello-plugins-xsd))) |
545 | (home-page "") |
546 | (synopsis "") |
547 | (description "") |
548 | (license license:asl2.0))) |
549 | |
550 | (define-public maven-doxia-decoration-model |
551 | (package |
552 | (inherit maven-doxia-skin-model) |
553 | (name "maven-doxia-decoration-model") |
554 | (arguments |
555 | `(#:jar-name "maven-doxia-decoration-model.jar" |
556 | #:source-dir "doxia-decoration-model/src/main/java" |
557 | #:test-dir "doxia-decoration-model/src/test" |
558 | #:phases |
559 | (modify-phases %standard-phases |
560 | (add-before 'build 'generate-models |
561 | (lambda* (#:key inputs #:allow-other-keys) |
562 | (define (modello-single-mode file version mode) |
563 | (invoke "java" "org.codehaus.modello.ModelloCli" |
564 | file mode "doxia-decoration-model/src/main/java" version |
565 | "false" "true")) |
566 | (let ((file "doxia-decoration-model/src/main/mdo/decoration.mdo")) |
567 | (modello-single-mode file "4.0.0" "xpp3-writer") |
568 | (modello-single-mode file "4.0.0" "java") |
569 | (modello-single-mode file "4.0.0" "xpp3-reader") |
570 | (modello-single-mode file "4.0.0" "xsd")) |
571 | #t))))) |
572 | (native-inputs |
573 | `(("java-junit" ,java-junit) |
574 | ,@(package-native-inputs maven-doxia-skin-model))) |
575 | (description ""))) |
576 | |
577 | (define-public maven-doxia-site-renderer |
578 | (package |
579 | (inherit maven-doxia-skin-model) |
580 | (name "maven-doxia-site-renderer") |
581 | (arguments |
582 | `(#:jar-name "maven-doxia-site-renderer.jar" |
583 | #:source-dir "doxia-site-renderer/src/main/java" |
584 | #:test-dir "doxia-site-renderer/src/test" |
585 | #:tests? #f; require gargoylesoftware-htmlunit |
586 | #:phases |
587 | (modify-phases %standard-phases |
588 | (add-before 'build 'copy-resources |
589 | (lambda _ |
590 | (copy-recursively "doxia-site-renderer/src/main/resources" |
591 | "build/classes") |
592 | #t))))) |
593 | (inputs |
594 | `(("java-commons-lang3" ,java-commons-lang3) |
595 | ("java-plexus-container-default" ,java-plexus-container-default) |
596 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
597 | ("java-plexus-i18n" ,java-plexus-i18n) |
598 | ("java-plexus-utils" ,java-plexus-utils) |
599 | ("java-plexus-velocity-component" ,java-plexus-velocity-component) |
600 | ("java-velocity" ,java-velocity) |
601 | ("java-velocity-tools" ,java-velocity-tools) |
602 | ("maven-artifact" ,maven-artifact) |
603 | ("maven-doxia-core" ,maven-doxia-core) |
604 | ("maven-doxia-decoration-model" ,maven-doxia-decoration-model) |
605 | ("maven-doxia-logging-api" ,maven-doxia-logging-api) |
606 | ("maven-doxia-module-xhtml" ,maven-doxia-module-xhtml) |
607 | ("maven-doxia-skin-model" ,maven-doxia-skin-model) |
608 | ("maven-doxia-sink-api" ,maven-doxia-sink-api))) |
609 | (native-inputs |
610 | `(("java-junit" ,java-junit))) |
611 | (description ""))) |
612 | |
613 | (define-public maven-reporting-api |
614 | (package |
615 | (name "maven-reporting-api") |
616 | (version "3.0") |
617 | (source (origin |
618 | (method url-fetch) |
619 | (uri (string-append "https://github.com/apache/maven-reporting-api/" |
620 | "archive/maven-reporting-api-" version ".tar.gz")) |
621 | (sha256 |
622 | (base32 |
623 | "1dc94n7czax7vrniv4xyqlza2mjqdlzzvq6wh6cmcqnnmgggya91")))) |
624 | (build-system ant-build-system) |
625 | (arguments |
626 | `(#:jar-name "maven-reporting-api.jar" |
627 | #:source-dir "src/main/java" |
628 | #:tests? #f)); no tests |
629 | (inputs |
630 | `(("maven-doxia-sink-api" ,maven-doxia-sink-api))) |
631 | (native-inputs |
632 | `(("unzip" ,unzip))) |
633 | (home-page "") |
634 | (synopsis "") |
635 | (description "") |
636 | (license license:asl2.0))) |
637 | |
638 | (define-public maven-reporting-impl |
639 | (package |
640 | (name "maven-reporting-impl") |
641 | (version "3.0") |
642 | (source (origin |
643 | (method git-fetch) |
644 | (uri (git-reference |
645 | (url "https://github.com/apache/maven-reporting-impl.git") |
646 | (commit "ff10bba47b9ecf728a0f16e096fb410b74711a5d"))) |
647 | (file-name (git-file-name name version)) |
648 | (sha256 |
649 | (base32 |
650 | "02da8pqa17lmkwjhqyq39ygf4lfa483bbdvhbvjginmpw3ydkbw5")))) |
651 | (build-system ant-build-system) |
652 | (arguments |
653 | `(#:jar-name "maven-reporting-impl.jar" |
654 | #:source-dir "src/main/java" |
655 | #:test-dir "src/test" |
656 | ;; Require junitx.util.PrivateAccessor (?) |
657 | #:tests? #f)) |
658 | (inputs |
659 | `(("java-plexus-utils" ,java-plexus-utils) |
660 | ("maven-core" ,maven-core) |
661 | ("maven-doxia-core" ,maven-doxia-core) |
662 | ("maven-doxia-decoration-model" ,maven-doxia-decoration-model) |
663 | ("maven-doxia-logging-api" ,maven-doxia-logging-api) |
664 | ("maven-doxia-module-xhtml" ,maven-doxia-module-xhtml) |
665 | ("maven-doxia-sink-api" ,maven-doxia-sink-api) |
666 | ("maven-doxia-site-renderer" ,maven-doxia-site-renderer) |
667 | ("maven-plugin-annotations" ,maven-plugin-annotations) |
668 | ("maven-plugin-api" ,maven-plugin-api) |
669 | ("maven-reporting-api" ,maven-reporting-api) |
670 | ("maven-shared-utils" ,maven-shared-utils))) |
671 | (native-inputs |
672 | `(("java-junit" ,java-junit))) |
673 | (home-page "") |
674 | (synopsis "") |
675 | (description "") |
676 | (license license:asl2.0))) |
677 | |
678 | (define-public maven-plugin-tools-api |
679 | (package |
680 | (name "maven-plugin-tools-api") |
681 | (version "3.6.0") |
682 | (source (origin |
683 | (method url-fetch) |
684 | (uri (string-append "https://github.com/apache/maven-plugin-tools/" |
685 | "archive/maven-plugin-tools-" version ".tar.gz")) |
686 | (sha256 |
687 | (base32 |
688 | "1miq87ywh48v0hwl3a4q95rxbgg58zpk59v6z34bl715hcawbv80")))) |
689 | (build-system ant-build-system) |
690 | (arguments |
691 | `(#:jar-name "maven-plugin-tools-api.jar" |
692 | #:source-dir "maven-plugin-tools-api/src/main/java" |
693 | #:test-dir "maven-plugin-tools-api/src/test" |
694 | #:tests? #f)); disabled for now. Require maven-plugin-testing that doesn't build yet |
695 | (inputs |
696 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations) |
697 | ("java-plexus-container-default" ,java-plexus-container-default) |
698 | ("java-plexus-utils" ,java-plexus-utils) |
699 | ("maven-artifact" ,maven-artifact) |
700 | ("maven-model" ,maven-model) |
701 | ("maven-core" ,maven-core) |
702 | ("maven-plugin-api" ,maven-plugin-api))) |
703 | (native-inputs |
704 | `(("java-junit" ,java-junit))) |
705 | (home-page "") |
706 | (synopsis "") |
707 | (description "") |
708 | (license license:asl2.0))) |
709 | |
710 | (define-public maven-plugin-annotations |
711 | (package |
712 | (inherit maven-plugin-tools-api) |
713 | (name "maven-plugin-annotations") |
714 | (arguments |
715 | `(#:jar-name "maven-plugin-annotations.jar" |
716 | #:tests? #f; no tests |
717 | #:source-dir "maven-plugin-annotations/src/main/java")) |
718 | (inputs |
719 | `(("maven-artifact" ,maven-artifact))) |
720 | (description ""))) |
721 | |
722 | (define-public maven-plugin-tools-generators |
723 | (package |
724 | (inherit maven-plugin-tools-api) |
725 | (name "maven-plugin-tools-generators") |
726 | (arguments |
727 | `(#:jar-name "maven-plugin-tools-generators.jar" |
728 | #:source-dir "maven-plugin-tools-generators/src/main/java" |
729 | #:test-dir "maven-plugin-tools-generators/src/test" |
730 | #:tests? #f; require maven-plugin-testing |
731 | #:phases |
732 | (modify-phases %standard-phases |
733 | (add-before 'build 'fix-exception |
734 | (lambda _ |
735 | (substitute* "maven-plugin-tools-generators/src/main/java/org/apache/maven/tools/plugin/generator/PluginHelpGenerator.java" |
736 | (("Properties properties = PropertyUtils.*") |
737 | "Properties properties; |
738 | try { |
739 | properties = PropertyUtils.loadProperties( tmpPropertiesFile ); |
740 | } catch(IOException e) { |
741 | e.printStackTrace(); |
742 | return; |
743 | } |
744 | ")) |
745 | #t))))) |
746 | (inputs |
747 | `(("java-asm" ,java-asm) |
748 | ("java-jtidy" ,java-jtidy) |
749 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
750 | ("java-plexus-container-default" ,java-plexus-container-default) |
751 | ("java-plexus-utils" ,java-plexus-utils) |
752 | ("java-plexus-velocity-component" ,java-plexus-velocity-component) |
753 | ("java-velocity" ,java-velocity) |
754 | ("maven-compat" ,maven-compat) |
755 | ("maven-core" ,maven-core) |
756 | ("maven-model" ,maven-model) |
757 | ("maven-plugin-api" ,maven-plugin-api) |
758 | ("maven-plugin-tools-api" ,maven-plugin-tools-api) |
759 | ("maven-reporting-api" ,maven-reporting-api))) |
760 | (description ""))) |
761 | |
762 | (define-public maven-plugin-plugin |
763 | (package |
764 | (inherit maven-plugin-tools-api) |
765 | (name "maven-plugin-plugin") |
766 | (arguments |
767 | `(#:jar-name "maven-plugin-plugin.jar" |
768 | #:source-dir "maven-plugin-plugin/src/main/java" |
769 | #:test-dir "maven-plugin-plugin/src/test" |
770 | #:tests? #f; no tests |
771 | #:phases |
772 | (modify-phases %standard-phases |
773 | (add-before 'build 'copy-resources |
774 | (lambda _ |
775 | (copy-recursively "maven-plugin-plugin/src/main/resources" |
776 | "build/classes") |
777 | (copy-recursively "maven-plugin-plugin/src/main/filtered-resources" |
778 | "build/classes") |
779 | #t)) |
780 | (add-before 'build 'generate-models |
781 | (lambda* (#:key inputs #:allow-other-keys) |
782 | (define (modello-single-mode file version mode) |
783 | (invoke "java" "org.codehaus.modello.ModelloCli" |
784 | file mode "maven-plugin-plugin/src/main/java" version |
785 | "false" "true")) |
786 | (modello-single-mode "maven-plugin-plugin/src/main/mdo/pluginRequirements.mdo" |
787 | "1.0.0" "java")))))) |
788 | (inputs |
789 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations) |
790 | ("java-plexus-container-default" ,java-plexus-container-default) |
791 | ("java-plexus-utils" ,java-plexus-utils) |
792 | ("java-plexus-velocity-component" ,java-plexus-velocity-component) |
793 | ("java-velocity" ,java-velocity) |
794 | ("maven-artifact" ,maven-artifact) |
795 | ("maven-compat" ,maven-compat) |
796 | ("maven-core" ,maven-core) |
797 | ("maven-doxia-sink-api" ,maven-doxia-sink-api) |
798 | ("maven-doxia-site-renderer" ,maven-doxia-site-renderer) |
799 | ("maven-doxia-core" ,maven-doxia-core) |
800 | ("maven-doxia-logging-api" ,maven-doxia-logging-api) |
801 | ("maven-model" ,maven-model) |
802 | ("maven-plugin-annotations" ,maven-plugin-annotations) |
803 | ("maven-plugin-api" ,maven-plugin-api) |
804 | ("maven-plugin-tools-api" ,maven-plugin-tools-api) |
805 | ("maven-plugin-tools-generators" ,maven-plugin-tools-generators) |
806 | ("maven-reporting-api" ,maven-reporting-api) |
807 | ("maven-reporting-impl" ,maven-reporting-impl) |
808 | ("maven-repository-metadata" ,maven-repository-metadata))) |
809 | (native-inputs |
810 | `(("java-modello-core" ,java-modello-core) |
811 | ;; for modello: |
812 | ("java-asm" ,java-asm) |
813 | ("java-cglib" ,java-cglib) |
814 | ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject) |
815 | ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) |
816 | ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) |
817 | ("java-guava" ,java-guava) |
818 | ("java-guice" ,java-guice) |
819 | ("java-javax-inject" ,java-javax-inject) |
820 | ("java-plexus-classworlds" ,java-plexus-classworlds) |
821 | ("java-plexus-component-annotations" ,java-plexus-component-annotations) |
822 | ("java-sisu-build-api" ,java-sisu-build-api) |
823 | ;; modello plugins: |
824 | ("java-modello-plugins-java" ,java-modello-plugins-java))) |
825 | (description ""))) |
826 | |
827 | (define-public maven-resources-plugin |
828 | (package |
829 | (name "maven-resources-plugin") |
830 | (version "3.1.0") |
831 | (source (origin |
832 | (method url-fetch) |
833 | (uri (string-append "https://github.com/apache/" |
834 | "maven-resources-plugin/archive/" |
835 | "maven-resources-plugin-" version ".tar.gz")) |
836 | (sha256 |
837 | (base32 |
838 | "1f5gnjg2xmqfxml6k0ydyd1sxxwzgnb24qn6avcc4mijwd8a84pl")))) |
839 | (build-system ant-build-system) |
840 | (arguments |
841 | `(#:jar-name "maven-resources-plugin.jar" |
842 | #:source-dir "src/main/java" |
843 | #:test-dir "src/test" |
844 | #:tests? #f; test depends on maven-plugin-test-harness |
845 | ;; Need maven-plugin-tools and a corresponding phase |
846 | #:phases |
847 | (modify-phases %standard-phases |
848 | (add-before 'build 'copy-pom |
849 | (lambda _ |
850 | (mkdir-p "build/classes/META-INF/maven") |
851 | (copy-file "pom.xml" "build/classes/META-INF/pom.xml"))) |
852 | (add-after 'install 'install-pom |
853 | (lambda* (#:key outputs #:allow-other-keys) |
854 | (install-file "pom.xml" (string-append (assoc-ref outputs "out") |
855 | "/share/pom.xml"))))))) |
856 | (inputs |
857 | `(("java-plexus-component-annotations" ,java-plexus-component-annotations) |
858 | ("java-plexus-container-default" ,java-plexus-container-default) |
859 | ("java-plexus-utils" ,java-plexus-utils) |
860 | ("maven-core" ,maven-core) |
861 | ("maven-filtering" ,maven-filtering) |
862 | ("maven-model" ,maven-model) |
863 | ("maven-plugin-annotations" ,maven-plugin-annotations) |
864 | ("maven-plugin-api" ,maven-plugin-api))) |
865 | (native-inputs |
866 | `(("java-junit" ,java-junit))) |
867 | (home-page "") |
868 | (synopsis "") |
869 | (description "") |
870 | (license license:asl2.0))) |
871 |