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