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