maven: finally build all runtime deps
maven-generate-component-xml.patch
17 | 17 | index 0000000..c6748bd | |
18 | 18 | --- /dev/null | |
19 | 19 | +++ b/components.sh | |
20 | - | @@ -0,0 +1,132 @@ | |
20 | + | @@ -0,0 +1,148 @@ | |
21 | 21 | +## This script generates a rough plexus/components.xml file. It is meant to | |
22 | 22 | +## replace plexus-component-metadata as it eventually has a recursive dependency | |
23 | 23 | +## on itself. | |
… | |||
29 | 29 | + role=$1 | |
30 | 30 | + # Find role | |
31 | 31 | + case $role in | |
32 | + | + "SettingsWriter" | "SettingsReader") | |
33 | + | + role=org.apache.maven.settings.io.$role | |
34 | + | + ;; | |
35 | + | + "SecDispatcher") | |
36 | + | + role=org.sonatype.plexus.components.sec.dispatcher.$role | |
37 | + | + ;; | |
38 | + | + "SettingsDecrypter") | |
39 | + | + role=org.apache.maven.settings.crypto.$role | |
40 | + | + ;; | |
41 | + | + "SettingsBuilder") | |
42 | + | + role=org.apache.maven.settings.building.$role | |
43 | + | + ;; | |
44 | + | + "SettingsValidator") | |
45 | + | + role=org.apache.maven.settings.validation.$role | |
46 | + | + ;; | |
32 | 47 | + "LoggerFactory") | |
33 | 48 | + role=org.eclipse.aether.spi.log.$role | |
34 | 49 | + ;; | |
35 | 50 | + "RemoteRepositoryManager" | "VersionResolver" | "VersionRangeResolver" \ | |
36 | 51 | + | "ArtifactResolver" | "RepositoryEventDispatcher" | "MetadataResolver" \ | |
37 | - | + | "SyncContextFactory" | "MetadataGeneratorFactory" | "MetadatResolver") | |
52 | + | + | "SyncContextFactory" | "MetadataGeneratorFactory" | "MetadatResolver" \ | |
53 | + | + | "ArtifactDescriptorReader") | |
38 | 54 | + role=org.eclipse.aether.impl.$role | |
39 | 55 | + ;; | |
40 | 56 | + "ModelBuilder" | "ModelProcessor") |
more/packages/java.scm
5612 | 5612 | ; (string-append (getenv "CLASSPATH") ":build/classes") | |
5613 | 5613 | ; "org.codehaus.groovy.tools.FileSystemCompiler" | |
5614 | 5614 | ; (find-files "src/test" ".*\\.(groovy|java)$"))))) | |
5615 | + | (add-after 'install 'install-sh | |
5616 | + | (lambda* (#:key outputs #:allow-other-keys) | |
5617 | + | (substitute* "src/bin/startGroovy" | |
5618 | + | ((" -classpath .*") | |
5619 | + | (string-append " -classpath " (getenv "CLASSPATH") ":" | |
5620 | + | (assoc-ref outputs "out") "/share/java/groovy.jar \\"))) | |
5621 | + | (let ((bin (string-append (assoc-ref outputs "out") "/bin"))) | |
5622 | + | (for-each (lambda (script) | |
5623 | + | (install-file (string-append "src/bin/" script) bin) | |
5624 | + | (chmod (string-append bin "/" script) #o755)) | |
5625 | + | '("grape" "groovy" "groovyc" "groovyConsole" "groovydoc" | |
5626 | + | "groovysh" "java2groovy" "startGroovy"))) | |
5627 | + | (install-file "src/conf/groovy-starter.conf" | |
5628 | + | (string-append (assoc-ref outputs "out") "/conf")) | |
5629 | + | #t)) | |
5615 | 5630 | (add-before 'check 'add-groovy-classes | |
5616 | 5631 | (lambda _ | |
5617 | 5632 | (substitute* "build.xml" | |
… | |||
6418 | 6433 | "")) | |
6419 | 6434 | (build-system ant-build-system) | |
6420 | 6435 | (arguments | |
6421 | - | `(#:jar-name "container-default.jar" | |
6436 | + | `(#:jar-name "plexus-archiver.jar" | |
6422 | 6437 | #:source-dir "src/main/java" | |
6423 | 6438 | #:jdk ,icedtea-8 | |
6424 | 6439 | #:test-dir "src/test" | |
… | |||
6920 | 6935 | (modify-phases %standard-phases | |
6921 | 6936 | (add-before 'build 'copy-resources | |
6922 | 6937 | (lambda _ | |
6923 | - | (copy-recursively "src/main/resources" "build/classes")))))) | |
6938 | + | (copy-recursively "src/main/resources" "build/classes") | |
6939 | + | (mkdir-p "build/classes/META-INF/sisu") | |
6940 | + | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
6941 | + | (lambda _ | |
6942 | + | (display "org.sonatype.plexus.components.cipher.DefaultPlexusCipher\n"))) | |
6943 | + | #t))))) | |
6924 | 6944 | (inputs | |
6925 | 6945 | `(("cdi-api" ,java-cdi-api) | |
6926 | 6946 | ("inject" ,java-javax-inject))) | |
… | |||
6961 | 6981 | (modello-single-mode file "1.0.0" "java") | |
6962 | 6982 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
6963 | 6983 | (modello-single-mode file "1.0.0" "xpp3-writer"))))) | |
6984 | + | (add-before 'build 'generate-components.xml | |
6985 | + | (lambda _ | |
6986 | + | (mkdir-p "build/classes/META-INF/plexus") | |
6987 | + | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
6988 | + | (lambda _ | |
6989 | + | (display | |
6990 | + | (string-append | |
6991 | + | "<component-set>\n" | |
6992 | + | " <components>\n" | |
6993 | + | " <component>\n" | |
6994 | + | " <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n" | |
6995 | + | " <role-hint>default</role-hint>\n" | |
6996 | + | " <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n" | |
6997 | + | " <description></description>\n" | |
6998 | + | " <requirements>\n" | |
6999 | + | " <requirement>\n" | |
7000 | + | " <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n" | |
7001 | + | " <field-name>_cipher</field-name>\n" | |
7002 | + | " </requirement>\n" | |
7003 | + | " <requirement>\n" | |
7004 | + | " <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n" | |
7005 | + | " <field-name>_decryptors</field-name>\n" | |
7006 | + | " </requirement>\n" | |
7007 | + | " </requirements>\n" | |
7008 | + | " <configuration>\n" | |
7009 | + | " <_configuration-file>~/.settings-security.xml</_configuration-file>\n" | |
7010 | + | " </configuration>\n" | |
7011 | + | " </component>\n" | |
7012 | + | " </components>\n" | |
7013 | + | "</component-set>\n")))))) | |
6964 | 7014 | (add-before 'check 'fix-paths | |
6965 | 7015 | (lambda _ | |
6966 | 7016 | (mkdir-p "target") | |
… | |||
7507 | 7557 | `(("io" ,java-eclipse-jetty-io-9.2) | |
7508 | 7558 | ,@(package-native-inputs java-eclipse-jetty-util-9.2))))) | |
7509 | 7559 | ||
7510 | - | (define-public java-eclipse-aether-api | |
7511 | - | (package | |
7512 | - | (name "java-eclipse-aether-api") | |
7513 | - | (version "1.0.2") | |
7514 | - | (source (origin | |
7515 | - | (method url-fetch) | |
7516 | - | (uri (string-append "https://github.com/eclipse/aether-core/" | |
7517 | - | "archive/aether-1.0.2.v20150114.tar.gz")) | |
7518 | - | (sha256 | |
7519 | - | (base32 | |
7520 | - | "192x32hlyxs4p6xzaz1r1jrsqqr56akcl0lncq3av1zpbil6kqhh")))) | |
7521 | - | (build-system ant-build-system) | |
7522 | - | (arguments | |
7523 | - | `(#:jar-name "eclipse-aether-api.jar" | |
7524 | - | #:source-dir "aether-api/src/main/java" | |
7525 | - | #:test-dir "aether-api/src/test")) | |
7526 | - | (native-inputs | |
7527 | - | `(("junit" ,java-junit) | |
7528 | - | ("hamcrest" ,java-hamcrest-core))) | |
7529 | - | (home-page "https://projects.eclipse.org/projects/technology.aether") | |
7530 | - | (synopsis "") | |
7531 | - | (description "") | |
7532 | - | (license license:epl1.0))) | |
7533 | - | ||
7534 | - | (define-public java-eclipse-aether-spi | |
7535 | - | (package | |
7536 | - | (inherit java-eclipse-aether-api) | |
7537 | - | (name "java-eclipse-aether-spi") | |
7538 | - | (arguments | |
7539 | - | `(#:jar-name "eclipse-aether-spi.jar" | |
7540 | - | #:source-dir "aether-spi/src/main/java" | |
7541 | - | #:test-dir "aether-spi/src/test")) | |
7542 | - | (inputs | |
7543 | - | `(("api" ,java-eclipse-aether-api))))) | |
7544 | - | ||
7545 | - | (define-public java-eclipse-aether-test-util | |
7546 | - | (package | |
7547 | - | (inherit java-eclipse-aether-api) | |
7548 | - | (name "java-eclipse-aether-test-util") | |
7549 | - | (arguments | |
7550 | - | `(#:jar-name "eclipse-aether-test-util.jar" | |
7551 | - | #:source-dir "aether-test-util/src/main/java" | |
7552 | - | #:test-dir "aether-test-util/src/test")) | |
7553 | - | (inputs | |
7554 | - | `(("api" ,java-eclipse-aether-api) | |
7555 | - | ("spi" ,java-eclipse-aether-spi))))) | |
7556 | - | ||
7557 | - | (define-public java-eclipse-aether-util | |
7558 | - | (package | |
7559 | - | (inherit java-eclipse-aether-api) | |
7560 | - | (name "java-eclipse-aether-util") | |
7561 | - | (arguments | |
7562 | - | `(#:jar-name "eclipse-aether-util.jar" | |
7563 | - | #:source-dir "aether-util/src/main/java" | |
7564 | - | #:test-dir "aether-util/src/test")) | |
7565 | - | (inputs | |
7566 | - | `(("api" ,java-eclipse-aether-api))) | |
7567 | - | (native-inputs | |
7568 | - | `(("junit" ,java-junit) | |
7569 | - | ("hamcrest" ,java-hamcrest-core) | |
7570 | - | ("test-util" ,java-eclipse-aether-test-util))))) | |
7571 | - | ||
7572 | - | (define-public java-eclipse-aether-impl | |
7573 | - | (package | |
7574 | - | (inherit java-eclipse-aether-api) | |
7575 | - | (name "java-eclipse-aether-impl") | |
7576 | - | (arguments | |
7577 | - | `(#:jar-name "eclipse-aether-impl.jar" | |
7578 | - | #:jdk ,icedtea-8 | |
7579 | - | #:source-dir "aether-impl/src/main/java" | |
7580 | - | #:test-dir "aether-impl/src/test" | |
7581 | - | #:phases | |
7582 | - | (modify-phases %standard-phases | |
7583 | - | (add-before 'build 'generate-sisu | |
7584 | - | (lambda _ | |
7585 | - | (mkdir-p "build/classes/META-INF/sisu") | |
7586 | - | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
7587 | - | (lambda _ | |
7588 | - | (display | |
7589 | - | (string-append | |
7590 | - | "org.eclipse.aether.internal.impl.DefaultRemoteRepositoryManager\n" | |
7591 | - | "org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory\n" | |
7592 | - | "org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider\n" | |
7593 | - | "org.eclipse.aether.internal.impl.DefaultOfflineController\n" | |
7594 | - | "org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory\n" | |
7595 | - | "org.eclipse.aether.internal.impl.DefaultRepositoryLayoutProvider\n" | |
7596 | - | "org.eclipse.aether.internal.impl.DefaultFileProcessor\n" | |
7597 | - | "org.eclipse.aether.internal.impl.LoggerFactoryProvider\n" | |
7598 | - | "org.eclipse.aether.internal.impl.DefaultTransporterProvider\n" | |
7599 | - | "org.eclipse.aether.internal.impl.DefaultSyncContextFactory\n" | |
7600 | - | "org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManagerFactory\n" | |
7601 | - | "org.eclipse.aether.internal.impl.DefaultArtifactResolver\n" | |
7602 | - | "org.eclipse.aether.internal.impl.DefaultRepositoryEventDispatcher\n" | |
7603 | - | "org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer\n" | |
7604 | - | "org.eclipse.aether.internal.impl.DefaultInstaller\n" | |
7605 | - | "org.eclipse.aether.internal.impl.DefaultMetadataResolver\n" | |
7606 | - | "org.eclipse.aether.internal.impl.DefaultRepositorySystem\n" | |
7607 | - | "org.eclipse.aether.internal.impl.DefaultChecksumPolicyProvider\n" | |
7608 | - | "org.eclipse.aether.internal.impl.DefaultDeployer\n" | |
7609 | - | "org.eclipse.aether.internal.impl.DefaultDependencyCollector\n" | |
7610 | - | "org.eclipse.aether.internal.impl.DefaultUpdateCheckManager\n" | |
7611 | - | "org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory\n" | |
7612 | - | "org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider"))))))))) | |
7613 | - | (inputs | |
7614 | - | `(("api" ,java-eclipse-aether-api) | |
7615 | - | ("spi" ,java-eclipse-aether-spi) | |
7616 | - | ("util" ,java-eclipse-aether-util) | |
7617 | - | ("javax-inject" ,java-javax-inject) | |
7618 | - | ("sisu-inject" ,java-eclipse-sisu-inject) | |
7619 | - | ("guice" ,java-guice) | |
7620 | - | ("slf4j" ,java-slf4j-api))) | |
7621 | - | (native-inputs | |
7622 | - | `(("junit" ,java-junit) | |
7623 | - | ("hamcrest" ,java-hamcrest-core) | |
7624 | - | ("guava" ,java-guava) | |
7625 | - | ("cglib" ,java-cglib) | |
7626 | - | ("asm" ,java-asm) | |
7627 | - | ("aopalliance" ,java-aopalliance) | |
7628 | - | ("test-util" ,java-eclipse-aether-test-util))))) | |
7560 | + | ;(define-public java-eclipse-aether-api | |
7561 | + | ; (package | |
7562 | + | ; (name "java-eclipse-aether-api") | |
7563 | + | ; (version "1.0.2") | |
7564 | + | ; (source (origin | |
7565 | + | ; (method url-fetch) | |
7566 | + | ; (uri (string-append "https://github.com/eclipse/aether-core/" | |
7567 | + | ; "archive/aether-1.0.2.v20150114.tar.gz")) | |
7568 | + | ; (sha256 | |
7569 | + | ; (base32 | |
7570 | + | ; "192x32hlyxs4p6xzaz1r1jrsqqr56akcl0lncq3av1zpbil6kqhh")))) | |
7571 | + | ; (build-system ant-build-system) | |
7572 | + | ; (arguments | |
7573 | + | ; `(#:jar-name "eclipse-aether-api.jar" | |
7574 | + | ; #:source-dir "aether-api/src/main/java" | |
7575 | + | ; #:test-dir "aether-api/src/test")) | |
7576 | + | ; (native-inputs | |
7577 | + | ; `(("junit" ,java-junit) | |
7578 | + | ; ("hamcrest" ,java-hamcrest-core))) | |
7579 | + | ; (home-page "https://projects.eclipse.org/projects/technology.aether") | |
7580 | + | ; (synopsis "") | |
7581 | + | ; (description "") | |
7582 | + | ; (license license:epl1.0))) | |
7583 | + | ; | |
7584 | + | ;(define-public java-eclipse-aether-spi | |
7585 | + | ; (package | |
7586 | + | ; (inherit java-eclipse-aether-api) | |
7587 | + | ; (name "java-eclipse-aether-spi") | |
7588 | + | ; (arguments | |
7589 | + | ; `(#:jar-name "eclipse-aether-spi.jar" | |
7590 | + | ; #:source-dir "aether-spi/src/main/java" | |
7591 | + | ; #:test-dir "aether-spi/src/test")) | |
7592 | + | ; (inputs | |
7593 | + | ; `(("api" ,java-eclipse-aether-api))))) | |
7594 | + | ; | |
7595 | + | ;(define-public java-eclipse-aether-test-util | |
7596 | + | ; (package | |
7597 | + | ; (inherit java-eclipse-aether-api) | |
7598 | + | ; (name "java-eclipse-aether-test-util") | |
7599 | + | ; (arguments | |
7600 | + | ; `(#:jar-name "eclipse-aether-test-util.jar" | |
7601 | + | ; #:source-dir "aether-test-util/src/main/java" | |
7602 | + | ; #:test-dir "aether-test-util/src/test")) | |
7603 | + | ; (inputs | |
7604 | + | ; `(("api" ,java-eclipse-aether-api) | |
7605 | + | ; ("spi" ,java-eclipse-aether-spi))))) | |
7606 | + | ; | |
7607 | + | ;(define-public java-eclipse-aether-util | |
7608 | + | ; (package | |
7609 | + | ; (inherit java-eclipse-aether-api) | |
7610 | + | ; (name "java-eclipse-aether-util") | |
7611 | + | ; (arguments | |
7612 | + | ; `(#:jar-name "eclipse-aether-util.jar" | |
7613 | + | ; #:source-dir "aether-util/src/main/java" | |
7614 | + | ; #:test-dir "aether-util/src/test")) | |
7615 | + | ; (inputs | |
7616 | + | ; `(("api" ,java-eclipse-aether-api))) | |
7617 | + | ; (native-inputs | |
7618 | + | ; `(("junit" ,java-junit) | |
7619 | + | ; ("hamcrest" ,java-hamcrest-core) | |
7620 | + | ; ("test-util" ,java-eclipse-aether-test-util))))) | |
7621 | + | ; | |
7622 | + | ;(define-public java-eclipse-aether-impl | |
7623 | + | ; (package | |
7624 | + | ; (inherit java-eclipse-aether-api) | |
7625 | + | ; (name "java-eclipse-aether-impl") | |
7626 | + | ; (arguments | |
7627 | + | ; `(#:jar-name "eclipse-aether-impl.jar" | |
7628 | + | ; #:jdk ,icedtea-8 | |
7629 | + | ; #:source-dir "aether-impl/src/main/java" | |
7630 | + | ; #:test-dir "aether-impl/src/test" | |
7631 | + | ; #:phases | |
7632 | + | ; (modify-phases %standard-phases | |
7633 | + | ; (add-before 'build 'generate-sisu | |
7634 | + | ; (lambda _ | |
7635 | + | ; (mkdir-p "build/classes/META-INF/sisu") | |
7636 | + | ; (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
7637 | + | ; (lambda _ | |
7638 | + | ; (display | |
7639 | + | ; (string-append | |
7640 | + | ; "org.eclipse.aether.internal.impl.DefaultRemoteRepositoryManager\n" | |
7641 | + | ; "org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory\n" | |
7642 | + | ; "org.eclipse.aether.internal.impl.DefaultLocalRepositoryProvider\n" | |
7643 | + | ; "org.eclipse.aether.internal.impl.DefaultOfflineController\n" | |
7644 | + | ; "org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory\n" | |
7645 | + | ; "org.eclipse.aether.internal.impl.DefaultRepositoryLayoutProvider\n" | |
7646 | + | ; "org.eclipse.aether.internal.impl.DefaultFileProcessor\n" | |
7647 | + | ; "org.eclipse.aether.internal.impl.LoggerFactoryProvider\n" | |
7648 | + | ; "org.eclipse.aether.internal.impl.DefaultTransporterProvider\n" | |
7649 | + | ; "org.eclipse.aether.internal.impl.DefaultSyncContextFactory\n" | |
7650 | + | ; "org.eclipse.aether.internal.impl.EnhancedLocalRepositoryManagerFactory\n" | |
7651 | + | ; "org.eclipse.aether.internal.impl.DefaultArtifactResolver\n" | |
7652 | + | ; "org.eclipse.aether.internal.impl.DefaultRepositoryEventDispatcher\n" | |
7653 | + | ; "org.eclipse.aether.internal.impl.DefaultUpdatePolicyAnalyzer\n" | |
7654 | + | ; "org.eclipse.aether.internal.impl.DefaultInstaller\n" | |
7655 | + | ; "org.eclipse.aether.internal.impl.DefaultMetadataResolver\n" | |
7656 | + | ; "org.eclipse.aether.internal.impl.DefaultRepositorySystem\n" | |
7657 | + | ; "org.eclipse.aether.internal.impl.DefaultChecksumPolicyProvider\n" | |
7658 | + | ; "org.eclipse.aether.internal.impl.DefaultDeployer\n" | |
7659 | + | ; "org.eclipse.aether.internal.impl.DefaultDependencyCollector\n" | |
7660 | + | ; "org.eclipse.aether.internal.impl.DefaultUpdateCheckManager\n" | |
7661 | + | ; "org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory\n" | |
7662 | + | ; "org.eclipse.aether.internal.impl.DefaultRepositoryConnectorProvider"))))))))) | |
7663 | + | ; (inputs | |
7664 | + | ; `(("api" ,java-eclipse-aether-api) | |
7665 | + | ; ("spi" ,java-eclipse-aether-spi) | |
7666 | + | ; ("util" ,java-eclipse-aether-util) | |
7667 | + | ; ("javax-inject" ,java-javax-inject) | |
7668 | + | ; ("sisu-inject" ,java-eclipse-sisu-inject) | |
7669 | + | ; ("guice" ,java-guice) | |
7670 | + | ; ("slf4j" ,java-slf4j-api))) | |
7671 | + | ; (native-inputs | |
7672 | + | ; `(("junit" ,java-junit) | |
7673 | + | ; ("hamcrest" ,java-hamcrest-core) | |
7674 | + | ; ("guava" ,java-guava) | |
7675 | + | ; ("cglib" ,java-cglib) | |
7676 | + | ; ("asm" ,java-asm) | |
7677 | + | ; ("aopalliance" ,java-aopalliance) | |
7678 | + | ; ("test-util" ,java-eclipse-aether-test-util))))) | |
7629 | 7679 | ||
7630 | 7680 | (define-public java-commons-compiler | |
7631 | 7681 | (package | |
… | |||
7833 | 7883 | (define-public maven-shared-utils | |
7834 | 7884 | (package | |
7835 | 7885 | (name "maven-shared-utils") | |
7836 | - | (version "3.2.0") | |
7886 | + | ; latest is 3.2.0, but is not supported by maven-embedder | |
7887 | + | (version "3.1.0") | |
7837 | 7888 | (source (origin | |
7838 | 7889 | (method url-fetch) | |
7839 | 7890 | (uri (string-append "https://archive.apache.org/dist/maven/shared/" | |
7840 | 7891 | "maven-shared-utils-" version "-source-release.zip")) | |
7841 | 7892 | (sha256 | |
7842 | 7893 | (base32 | |
7843 | - | "05gkhmdq4b0xgnpxq27c9kpmn2gicmcmyb4sririafk5py7y1yj6")))) | |
7894 | + | "0vfaas4g09ch0agrd1dcxcmhdd3w971ssvfr9mx9gi2lp5nv8w66")))) | |
7844 | 7895 | (build-system ant-build-system) | |
7845 | 7896 | (arguments | |
7846 | 7897 | `(#:jar-name "maven-shared-utils.jar" | |
… | |||
7891 | 7942 | (string-append | |
7892 | 7943 | "CLASSPATH=" (getenv "CLASSPATH") "\n" | |
7893 | 7944 | "cygwin=false;")) | |
7894 | - | (("-classpath.*") "")))) | |
7945 | + | (("-classpath.*") "-classpath ${CLASSPATH} \\\n")))) | |
7895 | 7946 | (delete 'check) | |
7896 | 7947 | (replace 'install | |
7897 | 7948 | (lambda* (#:key outputs #:allow-other-keys) | |
7898 | - | (let ((bin (string-append (assoc-ref outputs "out") "/bin/"))) | |
7949 | + | (let ((bin (string-append (assoc-ref outputs "out") "/bin/")) | |
7950 | + | (conf (string-append (assoc-ref outputs "out") "/conf/"))) | |
7951 | + | (mkdir-p (string-append (assoc-ref outputs "out") "/lib")) | |
7899 | 7952 | (for-each (lambda (file) | |
7900 | 7953 | (install-file (string-append "apache-maven/src/bin/" file) | |
7901 | - | (string-append bin)) | |
7954 | + | bin) | |
7902 | 7955 | (chmod (string-append bin file) #o755)) | |
7903 | - | '("mvn" "mvnDebug" "mvnyjp")))))))) | |
7956 | + | '("mvn" "mvnDebug" "mvnyjp")) | |
7957 | + | (install-file "apache-maven/src/bin/m2.conf" bin) | |
7958 | + | (copy-recursively "apache-maven/src/conf" conf))))))) | |
7904 | 7959 | (inputs | |
7905 | 7960 | `(("classworlds" ,java-plexus-classworlds) | |
7906 | - | ("core" ,maven-core))) | |
7961 | + | ("artifact" ,maven-artifact) | |
7962 | + | ("embedder" ,maven-embedder) | |
7963 | + | ("core" ,maven-core) | |
7964 | + | ("compat" ,maven-compat) | |
7965 | + | ("builder" ,maven-builder-support) | |
7966 | + | ("model" ,maven-model) | |
7967 | + | ("model-builder" ,maven-model-builder) | |
7968 | + | ("settings" ,maven-settings) | |
7969 | + | ("settings-builder" ,maven-settings-builder) | |
7970 | + | ("plugin-api" ,maven-plugin-api) | |
7971 | + | ("metadata", maven-repository-metadata) | |
7972 | + | ("shared-utils" ,maven-shared-utils) | |
7973 | + | ("api" ,maven-resolver-api) | |
7974 | + | ("spi" ,maven-resolver-spi) | |
7975 | + | ("util" ,maven-resolver-util) | |
7976 | + | ("impl" ,maven-resolver-impl) | |
7977 | + | ("resolver-connector-basic" ,maven-resolver-connector-basic) | |
7978 | + | ("resolver-provider" ,maven-resolver-provider) | |
7979 | + | ("transport-wagon" ,maven-resolver-transport-wagon) | |
7980 | + | ("wagon" ,maven-wagon-provider-api) | |
7981 | + | ("wagon-file" ,maven-wagon-file) | |
7982 | + | ("container" ,java-eclipse-sisu-plexus) | |
7983 | + | ("guice" ,java-guice) | |
7984 | + | ("aop" ,java-aopalliance) | |
7985 | + | ("cglib" ,java-cglib) | |
7986 | + | ("asm" ,java-asm) | |
7987 | + | ("sisu-inject" ,java-eclipse-sisu-inject) | |
7988 | + | ("javax-inject" ,java-javax-inject) | |
7989 | + | ("annots" ,java-plexus-component-annotations) | |
7990 | + | ("plexus-utils" ,java-plexus-utils) | |
7991 | + | ("interpolation" ,java-plexus-interpolation) | |
7992 | + | ("sec-dispatcher" ,java-plexus-sec-dispatcher) | |
7993 | + | ("cipher" ,java-plexus-cipher) | |
7994 | + | ("guava" ,java-guava) | |
7995 | + | ("jansi" ,java-jansi) | |
7996 | + | ("jsr250" ,java-jsr250) | |
7997 | + | ("cdi" ,java-cdi-api) | |
7998 | + | ("cli" ,java-commons-cli) | |
7999 | + | ("io" ,java-commons-io) | |
8000 | + | ("lang3" ,java-commons-lang3) | |
8001 | + | ("slf4j" ,java-slf4j-api) | |
8002 | + | ;; TODO: replace with maven-slf4j-provider | |
8003 | + | ("simple" ,java-slf4j-simple))) | |
7907 | 8004 | (home-page "") | |
7908 | 8005 | (synopsis "") | |
7909 | 8006 | (description "") | |
… | |||
7954 | 8051 | (native-inputs | |
7955 | 8052 | `(("modello" ,java-modello-core) | |
7956 | 8053 | ;; for modello: | |
7957 | - | ("container" ,java-plexus-container-default) | |
8054 | + | ;("container" ,java-plexus-container-default) | |
8055 | + | ("container" ,java-eclipse-sisu-plexus) | |
8056 | + | ("annots" ,java-plexus-component-annotations) | |
8057 | + | ("guice" ,java-guice) | |
8058 | + | ("cglib" ,java-cglib) | |
8059 | + | ("asm" ,java-asm) | |
8060 | + | ("sisu-inject" ,java-eclipse-sisu-inject) | |
8061 | + | ("javax-inject" ,java-javax-inject) | |
7958 | 8062 | ("classworlds" ,java-plexus-classworlds) | |
7959 | 8063 | ("guava" ,java-guava) | |
7960 | 8064 | ("xbean" ,java-geronimo-xbean-reflect) | |
… | |||
7993 | 8097 | (native-inputs | |
7994 | 8098 | `(("modello" ,java-modello-core) | |
7995 | 8099 | ;; for modello: | |
7996 | - | ("container" ,java-plexus-container-default) | |
8100 | + | ;("container" ,java-plexus-container-default) | |
8101 | + | ("container" ,java-eclipse-sisu-plexus) | |
8102 | + | ("annots" ,java-plexus-component-annotations) | |
8103 | + | ("guice" ,java-guice) | |
8104 | + | ("cglib" ,java-cglib) | |
8105 | + | ("asm" ,java-asm) | |
8106 | + | ("sisu-inject" ,java-eclipse-sisu-inject) | |
8107 | + | ("javax-inject" ,java-javax-inject) | |
7997 | 8108 | ("classworlds" ,java-plexus-classworlds) | |
7998 | 8109 | ("utils" ,java-plexus-utils) | |
7999 | 8110 | ("guava" ,java-guava) | |
… | |||
8036 | 8147 | `(#:jar-name "maven-settings-builder.jar" | |
8037 | 8148 | #:source-dir "maven-settings-builder/src/main/java" | |
8038 | 8149 | #:jdk ,icedtea-8 | |
8039 | - | #:test-dir "maven-settings-builder/src/test")) | |
8150 | + | #:test-dir "maven-settings-builder/src/test" | |
8151 | + | #:phases | |
8152 | + | (modify-phases %standard-phases | |
8153 | + | (add-before 'build 'generate-components.xml | |
8154 | + | (lambda _ | |
8155 | + | (mkdir-p "build/classes/META-INF/plexus") | |
8156 | + | (chmod "components.sh" #o755) | |
8157 | + | (zero? (system* "./components.sh" "maven-settings-builder/src/main/java" | |
8158 | + | "build/classes/META-INF/plexus/components.xml"))))))) | |
8040 | 8159 | (inputs | |
8041 | 8160 | `(("utils" ,java-plexus-utils) | |
8042 | 8161 | ("annotations" ,java-plexus-component-annotations) | |
… | |||
8074 | 8193 | (inputs | |
8075 | 8194 | `(("artifact" ,maven-artifact) | |
8076 | 8195 | ("model" ,maven-model) | |
8077 | - | ("container" ,java-plexus-container-default) | |
8196 | + | ;("container" ,java-plexus-container-default) | |
8197 | + | ("container" ,java-eclipse-sisu-plexus) | |
8198 | + | ("annots" ,java-plexus-component-annotations) | |
8199 | + | ("guice" ,java-guice) | |
8200 | + | ("cglib" ,java-cglib) | |
8201 | + | ("asm" ,java-asm) | |
8202 | + | ("sisu-inject" ,java-eclipse-sisu-inject) | |
8203 | + | ("javax-inject" ,java-javax-inject) | |
8078 | 8204 | ("utils" ,java-plexus-utils))) | |
8079 | 8205 | (native-inputs | |
8080 | 8206 | `(("modello" ,java-modello-core) | |
… | |||
8128 | 8254 | (native-inputs | |
8129 | 8255 | `(("junit" ,java-junit) | |
8130 | 8256 | ("hamcrest" ,java-hamcrest-core) | |
8131 | - | ("container" ,java-plexus-container-default) | |
8257 | + | ("container" ,java-eclipse-sisu-plexus) | |
8258 | + | ("annots" ,java-plexus-component-annotations) | |
8259 | + | ("guice" ,java-guice) | |
8260 | + | ("cglib" ,java-cglib) | |
8261 | + | ("asm" ,java-asm) | |
8262 | + | ("sisu-inject" ,java-eclipse-sisu-inject) | |
8263 | + | ("javax-inject" ,java-javax-inject) | |
8132 | 8264 | ("xmlunit" ,java-xmlunit) | |
8133 | 8265 | ("xmlunit" ,java-xmlunit-legacy) | |
8134 | 8266 | ("xbean" ,java-geronimo-xbean-reflect) | |
… | |||
8161 | 8293 | (native-inputs | |
8162 | 8294 | `(("modello" ,java-modello-core) | |
8163 | 8295 | ;; for modello: | |
8164 | - | ("container" ,java-plexus-container-default) | |
8296 | + | ;("container" ,java-plexus-container-default) | |
8297 | + | ("container" ,java-eclipse-sisu-plexus) | |
8298 | + | ("annots" ,java-plexus-component-annotations) | |
8299 | + | ("guice" ,java-guice) | |
8300 | + | ("cglib" ,java-cglib) | |
8301 | + | ("asm" ,java-asm) | |
8302 | + | ("sisu-inject" ,java-eclipse-sisu-inject) | |
8303 | + | ("javax-inject" ,java-javax-inject) | |
8165 | 8304 | ("utils" ,java-plexus-utils) | |
8166 | 8305 | ("classworlds" ,java-plexus-classworlds) | |
8167 | 8306 | ("guava" ,java-guava) | |
… | |||
8186 | 8325 | #:tests? #f; dependency loop on maven-core (@Component RepositorySystem) | |
8187 | 8326 | #:phases | |
8188 | 8327 | (modify-phases %standard-phases | |
8189 | - | (add-before 'build 'generate-sisu-named | |
8190 | - | (lambda _ | |
8191 | - | (mkdir-p "build/classes/META-INF/sisu") | |
8192 | - | (chmod "sisu.sh" #o755) | |
8193 | - | (zero? (system* "./sisu.sh" "maven-resolver-provider/src/main/java" | |
8194 | - | "build/classes/META-INF/sisu/javax.inject.Named")))) | |
8195 | 8328 | (add-before 'build 'generate-components.xml | |
8196 | 8329 | (lambda _ | |
8197 | 8330 | (mkdir-p "build/classes/META-INF/plexus") | |
… | |||
8207 | 8340 | ("model-builder" ,maven-model-builder) | |
8208 | 8341 | ("support" ,maven-builder-support) | |
8209 | 8342 | ("repository" ,maven-repository-metadata) | |
8343 | + | ("utils" ,java-plexus-utils) | |
8210 | 8344 | ("annotations" ,java-plexus-component-annotations) | |
8211 | 8345 | ("lang3" ,java-commons-lang3) | |
8212 | 8346 | ("guice" ,java-guice) | |
8213 | - | ("sisu-inject" ,java-eclipse-sisu-inject) | |
8214 | - | ("javax-inject" ,java-javax-inject))) | |
8215 | - | (native-inputs | |
8216 | - | `(("modello" ,java-modello-core) | |
8217 | - | ;; for modello: | |
8218 | - | ("container" ,java-eclipse-sisu-plexus) | |
8219 | - | ("utils" ,java-plexus-utils) | |
8220 | - | ("classworlds" ,java-plexus-classworlds) | |
8221 | 8347 | ("guava" ,java-guava) | |
8222 | - | ("xbean" ,java-geronimo-xbean-reflect) | |
8223 | - | ("build-api" ,java-sisu-build-api) | |
8224 | - | ;; modello plugins: | |
8225 | - | ("java" ,java-modello-plugins-java) | |
8226 | - | ("xml" ,java-modello-plugins-xml) | |
8227 | - | ("xpp3" ,java-modello-plugins-xpp3) | |
8228 | - | ;; for tests | |
8229 | - | ("cglib" ,java-cglib) | |
8230 | - | ("asm" ,java-asm) | |
8231 | - | ("junit" ,java-junit) | |
8232 | - | ("mockito" ,java-mockito-1))))) | |
8348 | + | ("sisu-inject" ,java-eclipse-sisu-inject) | |
8349 | + | ("javax-inject" ,java-javax-inject))))) | |
8350 | + | ||
8351 | + | ;(define-public maven-resolver-provider | |
8352 | + | ; (package | |
8353 | + | ; (inherit maven-resolver-provider-boot) | |
8354 | + | ; (arguments | |
8355 | + | ; `(#:jar-name "maven-resolver-provider.jar" | |
8356 | + | ; #:source-dir "src/main/java" | |
8357 | + | ; #:jdk ,icedtea-8 | |
8358 | + | ; #:test-exclude (list "**/DefaultArtifactDescriptorReaderTest.java") | |
8359 | + | ; #:phases | |
8360 | + | ; (modify-phases %standard-phases | |
8361 | + | ; (add-before 'configure 'chdir | |
8362 | + | ; (lambda _ | |
8363 | + | ; ;; Tests assume we're in this directory | |
8364 | + | ; (chdir "maven-resolver-provider"))) | |
8365 | + | ; (add-before 'build 'generate-components.xml | |
8366 | + | ; (lambda _ | |
8367 | + | ; (mkdir-p "build/classes/META-INF/plexus") | |
8368 | + | ; (chmod "../components.sh" #o755) | |
8369 | + | ; (zero? (system* "../components.sh" "src/main/java" | |
8370 | + | ; "build/classes/META-INF/plexus/components.xml")))) | |
8371 | + | ; (add-before 'check 'fix-assumptions | |
8372 | + | ; (lambda _ | |
8373 | + | ; ;; Errors about the version of some files | |
8374 | + | ; (substitute* "src/test/java/org/apache/maven/repository/internal/DefaultArtifactDescriptorReaderTest.java" | |
8375 | + | ; (("20130404.090532-2") "SNAPSHOT"))))))) | |
8376 | + | ; ;(add-before 'check 'copy-test-classes | |
8377 | + | ; ; (lambda _ | |
8378 | + | ; ; (system* "ant" "compile-tests") | |
8379 | + | ; ; (mkdir-p "target/test-classes") | |
8380 | + | ; ; (copy-recursively "build/test-classes" "target/test-classes") | |
8381 | + | ; ; ;(copy-recursively "src/test/resources/repo" "target/test-classes/repo") | |
8382 | + | ; ; #t))))) | |
8383 | + | ; (native-inputs | |
8384 | + | ; `(;; For building tests: | |
8385 | + | ; ("maven-core" ,maven-core-boot) | |
8386 | + | ; ("container" ,java-eclipse-sisu-plexus) | |
8387 | + | ; ("junit" ,java-junit) | |
8388 | + | ; ("mockito" ,java-mockito-1) | |
8389 | + | ; ;; For running tests: | |
8390 | + | ; ("hamcrest" ,java-hamcrest-core) | |
8391 | + | ; ("aop" ,java-aopalliance) | |
8392 | + | ; ("classworlds" ,java-plexus-classworlds) | |
8393 | + | ; ("plugin" ,maven-plugin-api) | |
8394 | + | ; ("cglib" ,java-cglib) | |
8395 | + | ; ("asm" ,java-asm) | |
8396 | + | ; ("interpolation" ,java-plexus-interpolation) | |
8397 | + | ; ("artifact" ,maven-artifact) | |
8398 | + | ; ("objenesis" ,java-objenesis) | |
8399 | + | ; ("transport-wagon" ,maven-resolver-transport-wagon) | |
8400 | + | ; ("wagon-file" ,maven-wagon-file) | |
8401 | + | ; ("wagon-api" ,maven-wagon-provider-api) | |
8402 | + | ; ("connector-basic" ,maven-resolver-connector-basic))))) | |
8233 | 8403 | ||
8234 | 8404 | (define maven-core-boot | |
8235 | 8405 | (package | |
… | |||
8285 | 8455 | ("lang3" ,java-commons-lang3) | |
8286 | 8456 | ("guava" ,java-guava) | |
8287 | 8457 | ("guice" ,java-guice) | |
8288 | - | ("aether-api" ,java-eclipse-aether-api) | |
8289 | - | ("aether-spi" ,java-eclipse-aether-spi) | |
8290 | - | ("aether-util" ,java-eclipse-aether-util) | |
8291 | - | ("aether-impl" ,java-eclipse-aether-impl) | |
8458 | + | ("aether-api" ,maven-resolver-api) | |
8459 | + | ("aether-spi" ,maven-resolver-spi) | |
8460 | + | ("aether-util" ,maven-resolver-util) | |
8461 | + | ("aether-impl" ,maven-resolver-impl) | |
8292 | 8462 | ("sisu-inject" ,java-eclipse-sisu-inject) | |
8293 | 8463 | ("container" ,java-eclipse-sisu-plexus) | |
8294 | 8464 | ("java-javax-inject" ,java-javax-inject) | |
… | |||
8319 | 8489 | (add-after 'build 'generate-metadata | |
8320 | 8490 | (lambda _ | |
8321 | 8491 | (delete-file "build/classes/META-INF/plexus/components.xml") | |
8322 | - | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
8323 | - | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
8324 | - | "--source" "maven-core/src/main/java" | |
8325 | - | "--output" "build/classes/META-INF/plexus/components.xml" | |
8326 | - | ;; I don't know what these two options do, but if | |
8327 | - | ;; not present, it ends with a NullPointerException. | |
8328 | - | "--classes" "build/classes" | |
8329 | - | "--descriptors" "build/classes/META-INF")))) | |
8492 | + | (and (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
8493 | + | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
8494 | + | "--source" "maven-core/src/main/java" | |
8495 | + | "--output" "build/classes/META-INF/plexus/components.xml" | |
8496 | + | ;; I don't know what these two options do, but if | |
8497 | + | ;; not present, it ends with a NullPointerException. | |
8498 | + | "--classes" "build/classes" | |
8499 | + | "--descriptors" "build/classes/META-INF")) | |
8500 | + | ;; Maven requires role-hint to be "maven", but plexus-sec-dispatcher | |
8501 | + | ;; provides role-hint default. | |
8502 | + | (substitute* "build/classes/META-INF/plexus/components.xml" | |
8503 | + | (("</components>") | |
8504 | + | (string-append | |
8505 | + | " <component>\n" | |
8506 | + | " <role>org.sonatype.plexus.components.sec.dispatcher.SecDispatcher</role>\n" | |
8507 | + | " <role-hint>maven</role-hint>\n" | |
8508 | + | " <implementation>org.sonatype.plexus.components.sec.dispatcher.DefaultSecDispatcher</implementation>\n" | |
8509 | + | " <description>Maven Security dispatcher</description>\n" | |
8510 | + | " <requirements>\n" | |
8511 | + | " <requirement>\n" | |
8512 | + | " <role>org.sonatype.plexus.components.cipher.PlexusCipher</role>\n" | |
8513 | + | " <field-name>_cipher</field-name>\n" | |
8514 | + | " </requirement>\n" | |
8515 | + | " <requirement>\n" | |
8516 | + | " <role>org.sonatype.plexus.components.sec.dispatcher.PasswordDecryptor</role>\n" | |
8517 | + | " <field-name>_decryptors</field-name>\n" | |
8518 | + | " </requirement>\n" | |
8519 | + | " </requirements>\n" | |
8520 | + | " <configuration>\n" | |
8521 | + | " <_configuration-file>~/.m2/settings-security.xml</_configuration-file>\n" | |
8522 | + | " </configuration>\n" | |
8523 | + | " </component>\n" | |
8524 | + | "</components>"))) | |
8525 | + | #t))) | |
8330 | 8526 | (add-after 'generate-metadata 'fix-metadata | |
8331 | 8527 | (lambda _ | |
8332 | 8528 | (substitute* "build/classes/META-INF/plexus/components.xml" | |
… | |||
8404 | 8600 | (lambda _ | |
8405 | 8601 | (substitute* "wagon-providers/wagon-file/src/test/java/org/apache/maven/wagon/providers/file/FileWagonTest.java" | |
8406 | 8602 | (("target") "build")))) | |
8407 | - | (add-after 'generate-metadata 'rebuild | |
8408 | - | (lambda _ | |
8409 | - | (zero? (system* "ant" "jar")))) | |
8410 | 8603 | (add-after 'build 'generate-metadata | |
8411 | 8604 | (lambda _ | |
8412 | 8605 | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
… | |||
8416 | 8609 | ;; I don't know what these two options do, but if | |
8417 | 8610 | ;; not present, it ends with a NullPointerException. | |
8418 | 8611 | "--classes" "build/classes" | |
8419 | - | "--descriptors" "build/classes/META-INF"))))))) | |
8612 | + | "--descriptors" "build/classes/META-INF")))) | |
8613 | + | (add-after 'generate-metadata 'rebuild | |
8614 | + | (lambda _ | |
8615 | + | (zero? (system* "ant" "jar"))))))) | |
8420 | 8616 | (inputs | |
8421 | 8617 | `(("utils" ,java-plexus-utils) | |
8422 | 8618 | ("provider-api" ,maven-wagon-provider-api))) | |
… | |||
8497 | 8693 | ("model-builder" ,maven-model-builder) | |
8498 | 8694 | ("settings" ,maven-settings) | |
8499 | 8695 | ("settings-builder" ,maven-settings-builder) | |
8696 | + | ("maven-shared-utils" ,maven-shared-utils) | |
8500 | 8697 | ("classworlds" ,java-plexus-classworlds) | |
8501 | 8698 | ("util" ,java-plexus-utils) | |
8502 | - | ("container" ,java-plexus-container-default) | |
8699 | + | ("container" ,java-eclipse-sisu-plexus) | |
8503 | 8700 | ("cipher" ,java-plexus-cipher) | |
8504 | 8701 | ("annotations" ,java-plexus-component-annotations) | |
8505 | 8702 | ("sec-dispatcher" ,java-plexus-sec-dispatcher) | |
8506 | - | ("aether-util" ,java-eclipse-aether-util) | |
8507 | - | ("aether-api" ,java-eclipse-aether-api) | |
8703 | + | ("aether-util" ,maven-resolver-util) | |
8704 | + | ("aether-api" ,maven-resolver-api) | |
8508 | 8705 | ("logback" ,java-logback-core) | |
8509 | 8706 | ("logback-classic" ,java-logback-classic) | |
8510 | 8707 | ("cli" ,java-commons-cli) | |
… | |||
8661 | 8858 | `(#:jar-name "maven-resolver-connector-basic.jar" | |
8662 | 8859 | #:source-dir "maven-resolver-connector-basic/src/main/java" | |
8663 | 8860 | #:test-dir "maven-resolver-connector-basic/src/test" | |
8664 | - | #:jdk ,icedtea-8)) | |
8861 | + | #:jdk ,icedtea-8 | |
8862 | + | #:phases | |
8863 | + | (modify-phases %standard-phases | |
8864 | + | (add-before 'build 'generate-sisu | |
8865 | + | (lambda _ | |
8866 | + | (mkdir-p "build/classes/META-INF/sisu") | |
8867 | + | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
8868 | + | (lambda _ | |
8869 | + | (display "org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory\n")))))))) | |
8665 | 8870 | (inputs | |
8666 | 8871 | `(("api" ,maven-resolver-api) | |
8667 | 8872 | ("spi" ,maven-resolver-spi) | |
… | |||
8680 | 8885 | `(#:jar-name "maven-resolver-transport-wagon.jar" | |
8681 | 8886 | #:source-dir "maven-resolver-transport-wagon/src/main/java" | |
8682 | 8887 | #:test-dir "maven-resolver-transport-wagon/src/test" | |
8683 | - | #:jdk ,icedtea-8)) | |
8888 | + | #:jdk ,icedtea-8 | |
8889 | + | #:phases | |
8890 | + | (modify-phases %standard-phases | |
8891 | + | (add-before 'build 'generate-sisu | |
8892 | + | (lambda _ | |
8893 | + | (mkdir-p "build/classes/META-INF/sisu") | |
8894 | + | (with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named" | |
8895 | + | (lambda _ | |
8896 | + | (display "org.eclipse.aether.transport.wagon.WagonTransporterFactory\n"))) | |
8897 | + | #t)) | |
8898 | + | (add-before 'build 'generate-components.xml | |
8899 | + | (lambda _ | |
8900 | + | (mkdir-p "build/classes/META-INF/plexus") | |
8901 | + | (with-output-to-file "build/classes/META-INF/plexus/components.xml" | |
8902 | + | (lambda _ | |
8903 | + | (display | |
8904 | + | (string-append | |
8905 | + | "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n" | |
8906 | + | "<component-set>\n" | |
8907 | + | " <components>\n" | |
8908 | + | " <component>\n" | |
8909 | + | " <role>org.eclipse.aether.transport.wagon.WagonConfigurator</role>\n" | |
8910 | + | " <role-hint>plexus</role-hint>\n" | |
8911 | + | " <implementation>org.eclipse.aether.internal.transport.wagon.PlexusWagonConfigurator</implementation>\n" | |
8912 | + | " <description />\n" | |
8913 | + | " <isolated-realm>false</isolated-realm>\n" | |
8914 | + | " <requirements>\n" | |
8915 | + | " <requirement>\n" | |
8916 | + | " <role>org.codehaus.plexus.PlexusContainer</role>\n" | |
8917 | + | " <role-hint />\n" | |
8918 | + | " <field-name>container</field-name>\n" | |
8919 | + | " </requirement>\n" | |
8920 | + | " </requirements>\n" | |
8921 | + | " </component>\n" | |
8922 | + | " <component>\n" | |
8923 | + | " <role>org.eclipse.aether.transport.wagon.WagonProvider</role>\n" | |
8924 | + | " <role-hint>plexus</role-hint>\n" | |
8925 | + | " <implementation>org.eclipse.aether.internal.transport.wagon.PlexusWagonProvider</implementation>\n" | |
8926 | + | " <description />\n" | |
8927 | + | " <isolated-realm>false</isolated-realm>\n" | |
8928 | + | " <requirements>\n" | |
8929 | + | " <requirement>\n" | |
8930 | + | " <role>org.codehaus.plexus.PlexusContainer</role>\n" | |
8931 | + | " <role-hint />\n" | |
8932 | + | " <field-name>container</field-name>\n" | |
8933 | + | " </requirement>\n" | |
8934 | + | " </requirements>\n" | |
8935 | + | " </component>\n" | |
8936 | + | " </components>\n" | |
8937 | + | "</component-set>\n")))) | |
8938 | + | #t))))) | |
8684 | 8939 | (inputs | |
8685 | 8940 | `(("api" ,maven-resolver-api) | |
8686 | 8941 | ("spi" ,maven-resolver-spi) | |
8687 | 8942 | ("util" ,maven-resolver-util) | |
8688 | 8943 | ("inject" ,java-javax-inject) | |
8689 | - | ("wagon-ap" ,maven-wagon-provider-api) | |
8944 | + | ("wagon-api" ,maven-wagon-provider-api) | |
8690 | 8945 | ("annotation" ,java-plexus-component-annotations) | |
8691 | 8946 | ("classworld" ,java-plexus-classworlds) | |
8692 | 8947 | ("plexus-util" ,java-plexus-utils) | |
… | |||
8702 | 8957 | ("aopalliance" ,java-aopalliance) | |
8703 | 8958 | ("guice" ,java-guice))))) | |
8704 | 8959 | ||
8960 | + | (define-public maven-slf4j-provider | |
8961 | + | (package | |
8962 | + | (inherit maven) | |
8963 | + | (name "maven-slf4j-provider") | |
8964 | + | (arguments | |
8965 | + | `(#:jar-name "maven-slf4j-provider" | |
8966 | + | #:source-dir "maven-slf4j-provider/src/main/java" | |
8967 | + | #:jdk ,icedtea-8 | |
8968 | + | #:tests? #f; no tests | |
8969 | + | #:phases | |
8970 | + | (modify-phases %standard-phases | |
8971 | + | (add-before 'build 'generate-simple-sources | |
8972 | + | (lambda* (#:key inputs #:allow-other-keys) | |
8973 | + | (mkdir-p "maven-slf4j-provider/target/generated-sources") | |
8974 | + | (with-directory-excursion "maven-slf4j-provider/target/generated-sources" | |
8975 | + | (system* "tar" "xf" (assoc-ref inputs "simple"))) | |
8976 | + | (with-directory-excursion "maven-slf4j-provider/" | |
8977 | + | (zero? (system* "java" "-cp" (getenv "CLASSPATH") | |
8978 | + | "groovy.ui.GroovyMain" "-Db/c gasedir=/tmp" | |
8979 | + | "src/main/script/patch-slf4j-simple.groovy")))))))) | |
8980 | + | (inputs | |
8981 | + | `(("slf4j" ,java-slf4j-api) | |
8982 | + | ("simple" ,(package-source java-slf4j-simple)) | |
8983 | + | ("maven-shared-utils" ,maven-shared-utils))) | |
8984 | + | (native-inputs | |
8985 | + | `(("groovy" ,groovy) | |
8986 | + | ("asm" ,java-asm) | |
8987 | + | ("antlr" ,antlr2) | |
8988 | + | ("cli" ,java-commons-cli))))) | |
8989 | + | ||
8705 | 8990 | (define-public maven-compat | |
8706 | 8991 | (package | |
8707 | 8992 | (inherit maven) | |
8708 | 8993 | (name "maven-compat") | |
8709 | 8994 | (arguments | |
8710 | 8995 | `(#:jar-name "maven-compat.jar" | |
8711 | - | #:source-dir "maven-compat/src/main/java" | |
8996 | + | #:source-dir "src/main/java" | |
8712 | 8997 | #:jdk ,icedtea-8 | |
8713 | - | #:test-dir "maven-compat/src/test" | |
8998 | + | #:test-dir "src/test" | |
8714 | 8999 | #:phases | |
8715 | 9000 | (modify-phases %standard-phases | |
9001 | + | ;; Tests assume we're in this directory | |
9002 | + | (add-before 'configure 'chdir | |
9003 | + | (lambda _ | |
9004 | + | (chdir "maven-compat"))) | |
8716 | 9005 | (add-before 'build 'generate-models | |
8717 | 9006 | (lambda* (#:key inputs #:allow-other-keys) | |
8718 | 9007 | (define (modello-single-mode file version mode) | |
8719 | 9008 | (zero? (system* "java" | |
8720 | 9009 | "org.codehaus.modello.ModelloCli" | |
8721 | - | file mode "maven-compat/src/main/java" version | |
9010 | + | file mode "src/main/java" version | |
8722 | 9011 | "false" "true"))) | |
8723 | - | (let ((file "maven-compat/src/main/mdo/profiles.mdo")) | |
9012 | + | (let ((file "src/main/mdo/profiles.mdo")) | |
8724 | 9013 | (and | |
8725 | 9014 | (modello-single-mode file "1.0.0" "java") | |
8726 | 9015 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
8727 | 9016 | (modello-single-mode file "1.0.0" "xpp3-writer"))) | |
8728 | - | (let ((file "maven-compat/src/main/mdo/paramdoc.mdo")) | |
9017 | + | (let ((file "src/main/mdo/paramdoc.mdo")) | |
8729 | 9018 | (and | |
8730 | 9019 | (modello-single-mode file "1.0.0" "java") | |
8731 | 9020 | (modello-single-mode file "1.0.0" "xpp3-reader") | |
… | |||
8734 | 9023 | (lambda _ | |
8735 | 9024 | (zero? (system* "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes") | |
8736 | 9025 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
8737 | - | "--source" "maven-compat/src/main/java" | |
9026 | + | "--source" "src/main/java" | |
8738 | 9027 | "--output" "build/classes/META-INF/plexus/components.xml" | |
8739 | 9028 | ;; I don't know what these two options do, but if | |
8740 | 9029 | ;; not present, it ends with a NullPointerException. | |
… | |||
8749 | 9038 | ":build/classes" | |
8750 | 9039 | ":build/test-classes") | |
8751 | 9040 | "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" | |
8752 | - | "--source" "maven-compat/src/test/java" | |
9041 | + | "--source" "src/test/java" | |
8753 | 9042 | "--output" "build/test-classes/META-INF/plexus/components.xml" | |
8754 | 9043 | ;; I don't know what these two options do, but if | |
8755 | 9044 | ;; not present, it ends with a NullPointerException. | |
… | |||
8774 | 9063 | ("resolver-spi" ,maven-resolver-spi) | |
8775 | 9064 | ("interpolation" ,java-plexus-interpolation))) | |
8776 | 9065 | (native-inputs | |
8777 | - | ;; maven-resolver-{api,util,impl,connector-basic,transport-wagon} | |
8778 | 9066 | `(("modello" ,java-modello-core) | |
8779 | 9067 | ("utils" ,java-plexus-utils) | |
8780 | 9068 | ("annot" ,java-plexus-component-annotations) | |
… | |||
8799 | 9087 | ("plugin-api" ,maven-plugin-api) | |
8800 | 9088 | ("qdox" ,java-qdox) | |
8801 | 9089 | ;; tests | |
9090 | + | ("cipher" ,java-plexus-cipher) | |
9091 | + | ("sec-dispatcher" ,java-plexus-sec-dispatcher) | |
9092 | + | ("jsr250", java-jsr250) | |
9093 | + | ("cdi-api" ,java-cdi-api) | |
8802 | 9094 | ("junit" ,java-junit) | |
8803 | 9095 | ("impl" ,maven-resolver-impl) | |
9096 | + | ("connector-basic" ,maven-resolver-connector-basic) | |
9097 | + | ("transport-wagon" ,maven-resolver-transport-wagon) | |
8804 | 9098 | ("lang3" ,java-commons-lang3) | |
8805 | 9099 | ("aop" ,java-aopalliance) | |
8806 | 9100 | ("resolver-provider" ,maven-resolver-provider) |