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