aboutsummaryrefslogtreecommitdiff
path: root/gnu/packages/maven.scm
diff options
context:
space:
mode:
Diffstat (limited to 'gnu/packages/maven.scm')
-rw-r--r--gnu/packages/maven.scm2452
1 files changed, 2224 insertions, 228 deletions
diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm
index 66c6e3adfa..e0cc98d408 100644
--- a/gnu/packages/maven.scm
+++ b/gnu/packages/maven.scm
@@ -30,53 +30,10 @@
#:use-module (gnu packages base)
#:use-module (gnu packages compression)
#:use-module (gnu packages java)
+ #:use-module (gnu packages maven-parent-pom)
#:use-module (gnu packages web)
- #:use-module (gnu packages xml))
-
-(define-public java-plexus-component-metadata
- (package
- (inherit java-plexus-container-default)
- (name "java-plexus-component-metadata")
- (arguments
- `(#:jar-name "plexus-component-metadata.jar"
- #:source-dir "src/main/java"
- #:test-dir "src/test"
- #:jdk ,icedtea-8
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'chdir
- (lambda _
- (chdir "plexus-component-metadata")
- #t))
- (add-before 'build 'copy-resources
- (lambda _
- (copy-recursively "src/main/resources"
- "build/classes/")
- #t)))))
- (inputs
- `(("java-plexus-container-default" ,java-plexus-container-default)
- ("java-plexu-component-annotations" ,java-plexus-component-annotations)
- ("java-plexus-utils" ,java-plexus-utils)
- ("java-plexus-cli" ,java-plexus-cli)
- ("java-plexus-classworlds" ,java-plexus-classworlds)
- ("maven-plugin-api" ,maven-plugin-api)
- ("maven-plugin-annotations" ,maven-plugin-annotations)
- ("maven-core-bootstrap" ,maven-core-bootstrap)
- ("maven-model" ,maven-model)
- ("java-commons-cli" ,java-commons-cli)
- ("java-qdox" ,java-qdox)
- ("java-jdom2" ,java-jdom2)
- ("java-asm" ,java-asm)))
- (native-inputs
- `(("java-junit" ,java-junit)
- ("java-guava" ,java-guava)
- ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)))
- (synopsis "Inversion-of-control container for Maven")
- (description "The Plexus project provides a full software stack for creating
-and executing software projects. Based on the Plexus container, the
-applications can utilise component-oriented programming to build modular,
-reusable components that can easily be assembled and reused. This package
-provides the Maven plugin generating the component metadata.")))
+ #:use-module (gnu packages xml)
+ #:use-module (ice-9 match))
(define-public maven-resolver-api
(package
@@ -85,7 +42,7 @@ provides the Maven plugin generating the component metadata.")))
(source (origin
(method git-fetch)
(uri (git-reference
- (url "https://github.com/apache/maven-resolver.git")
+ (url "https://github.com/apache/maven-resolver")
(commit (string-append "maven-resolver-" version))))
(file-name (git-file-name name version))
(sha256
@@ -95,7 +52,11 @@ provides the Maven plugin generating the component metadata.")))
(arguments
`(#:jar-name "maven-resolver-api.jar"
#:source-dir "maven-resolver-api/src/main/java"
- #:test-dir "maven-resolver-api/src/test"))
+ #:test-dir "maven-resolver-api/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "maven-resolver-api/pom.xml")))))
(native-inputs
`(("java-asm" ,java-asm)
("java-cglib" ,java-cglib)
@@ -103,11 +64,32 @@ provides the Maven plugin generating the component metadata.")))
("java-junit" ,java-junit)
("java-mockito-1" ,java-mockito-1)
("java-objenesis" ,java-objenesis)))
+ (propagated-inputs
+ `(("maven-resolver-parent-pom" ,maven-resolver-parent-pom)))
(home-page "https://github.com/apache/maven-resolver")
(synopsis "Maven repository system API")
(description "This package contains the API for the maven repository system.")
(license license:asl2.0)))
+(define maven-resolver-parent-pom
+ (package
+ (inherit maven-resolver-api)
+ (name "maven-resolver-parent-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (add-before 'install 'fix-pom
+ (lambda _
+ (substitute* "pom.xml"
+ (("<classifier>no_aop</classifier>") ""))
+ #t))
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs '())))
+
(define-public maven-resolver-spi
(package
(inherit maven-resolver-api)
@@ -116,8 +98,11 @@ provides the Maven plugin generating the component metadata.")))
`(#:jar-name "maven-resolver-spi.jar"
#:source-dir "maven-resolver-spi/src/main/java"
#:test-dir "maven-resolver-spi/src/test"
- #:jdk ,icedtea-8))
- (inputs
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "maven-resolver-spi/pom.xml")))))
+ (propagated-inputs
`(("maven-resolver-api" ,maven-resolver-api)))
(synopsis "Maven repository system SPI")
(description "This package contains the service provider interface (SPI)
@@ -147,8 +132,11 @@ ease testing of the repository system.")))
`(#:jar-name "maven-resolver-util.jar"
#:source-dir "maven-resolver-util/src/main/java"
#:test-dir "maven-resolver-util/src/test"
- #:jdk ,icedtea-8))
- (inputs
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "maven-resolver-util/pom.xml")))))
+ (propagated-inputs
`(("maven-resolver-api" ,maven-resolver-api)))
(native-inputs
`(("java-junit" ,java-junit)
@@ -175,16 +163,17 @@ ease usage of the repository system.")))
(with-output-to-file "build/classes/META-INF/sisu/javax.inject.Named"
(lambda _
(display "org.eclipse.aether.connector.basic.BasicRepositoryConnectorFactory\n")))
- #t)))))
- (inputs
+ #t))
+ (replace 'install
+ (install-from-pom "maven-resolver-connector-basic/pom.xml")))))
+ (propagated-inputs
`(("maven-resolver-api" ,maven-resolver-api)
("maven-resolver-spi" ,maven-resolver-spi)
("maven-resolver-util" ,maven-resolver-util)
- ("java-javax-inject" ,java-javax-inject)
("java-slf4j-api" ,java-slf4j-api)))
(native-inputs
- `(("java-junit" ,java-junit)
- ("java-hamcrest-core" ,java-hamcrest-core)
+ `(("java-javax-inject" ,java-javax-inject)
+ ("java-junit" ,java-junit)
("maven-resolver-test-util" ,maven-resolver-test-util)))
(synopsis "Maven repository connector implementation")
(description "This package contains a repository connector implementation
@@ -198,7 +187,6 @@ for repositories using URI-based layouts.")))
`(#:jar-name "maven-resolver-impl.jar"
#:source-dir "maven-resolver-impl/src/main/java"
#:test-dir "maven-resolver-impl/src/test"
- #:jdk ,icedtea-8
#:phases
(modify-phases %standard-phases
(add-before 'build 'generate-sisu
@@ -232,22 +220,20 @@ for repositories using URI-based layouts.")))
"org.eclipse.aether.internal.impl.Maven2RepositoryLayoutFactory\n"
"org.eclipse.aether.internal.impl.SimpleLocalRepositoryManagerFactory\n"
"org.eclipse.aether.internal.impl.slf4j.Slf4jLoggerFactory"))))
- #t)))))
- (inputs
+ #t))
+ (replace 'install
+ (install-from-pom "maven-resolver-impl/pom.xml")))))
+ (propagated-inputs
`(("maven-resolver-api" ,maven-resolver-api)
("maven-resolver-spi" ,maven-resolver-spi)
("maven-resolver-util" ,maven-resolver-util)
("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
("java-javax-inject" ,java-javax-inject)
("java-guice" ,java-guice)
- ("java-guava" ,java-guava)
- ("java-cglib" ,java-cglib)
- ("java-asm" ,java-asm)
- ("jajva-aopalliance" ,java-aopalliance)
- ("java-slf4j-api" ,java-slf4j-api)))
+ ("java-slf4j-api" ,java-slf4j-api)
+ ("maven-resolver-parent-pom" ,maven-resolver-parent-pom)))
(native-inputs
`(("java-junit" ,java-junit)
- ("java-hamcrest-core" ,java-hamcrest-core)
("maven-resolver-test-util" ,maven-resolver-test-util)))))
(define-public maven-resolver-transport-wagon
@@ -334,6 +320,241 @@ for repositories using URI-based layouts.")))
(description "This package contains a transport implementation based on
Maven Wagon, for use in Maven.")))
+;; aether is the parent project that was forked into maven-resolver. It used
+;; to be used with older versions of Maven, and is still required for some
+;; plugins and their dependencies. This version is required for the plugins,
+;; even though there are newer versions of this project.
+(define-public java-sonatype-aether-api
+ (package
+ (name "java-sonatype-aether-api")
+ (version "1.7")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/sonatype/sonatype-aether")
+ (commit (string-append "aether-" version))))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "1wn9fv91n40bvlwbzy0dmh0xqibxl2mpzpnbibhqss3c0zlr1ccq"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "aether-api.jar"
+ #:source-dir "aether-api/src/main/java"
+ #:test-dir "aether-api/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'install-parent (install-pom-file "pom.xml"))
+ (replace 'install (install-from-pom "aether-api/pom.xml")))))
+ (propagated-inputs
+ `(("java-sonatype-forge-parent-pom" ,java-sonatype-forge-parent-pom-6)))
+ (native-inputs `(("java-junit" ,java-junit)))
+ (home-page "https://github.com/sonatype/sonatype-aether")
+ (synopsis "Maven repository system API")
+ (description "This package contains the API for the maven repository system.")
+ (license license:asl2.0)))
+
+(define-public java-sonatype-aether-spi
+ (package
+ (inherit java-sonatype-aether-api)
+ (name "java-sonatype-aether-spi")
+ (arguments
+ `(#:jar-name "aether-spi.jar"
+ #:source-dir "aether-spi/src/main/java"
+ #:tests? #f; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install (install-from-pom "aether-spi/pom.xml")))))
+ (propagated-inputs
+ `(("java-sonatype-aether-api" ,java-sonatype-aether-api)))
+ (synopsis "Maven repository system SPI")
+ (description "This package contains the service provider interface (SPI)
+for repository system implementations and repository connectors.")))
+
+(define-public java-sonatype-aether-test-util
+ (package
+ (inherit java-sonatype-aether-api)
+ (name "java-sonatype-aether-test-util")
+ (arguments
+ `(#:jar-name "java-sonatype-aether-test-util.jar"
+ #:source-dir "aether-test-util/src/main/java"
+ #:test-dir "aether-test-util/src/test"))
+ (inputs
+ `(("java-sonatype-aether-api" ,java-sonatype-aether-api)
+ ("java-sonatype-aether-spi" ,java-sonatype-aether-spi)))
+ (synopsis "Utility classes for testing the maven repository system")
+ (description "This package contains a collection of utility classes to
+ease testing of the repository system.")))
+
+(define-public java-sonatype-aether-util
+ (package
+ (inherit java-sonatype-aether-api)
+ (name "java-sonatype-aether-util")
+ (arguments
+ `(#:jar-name "aether-util.jar"
+ #:source-dir "aether-util/src/main/java"
+ #:test-dir "aether-util/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install (install-from-pom "aether-util/pom.xml")))))
+ (propagated-inputs
+ `(("java-sonatype-aether-api" ,java-sonatype-aether-api)))
+ (native-inputs
+ `(("java-junit" ,java-junit)
+ ("java-sonatype-aether-test-util" ,java-sonatype-aether-test-util)))
+ (synopsis "Utility classes for the maven repository system")
+ (description "This package contains a collection of utility classes to
+ease usage of the repository system.")))
+
+(define-public java-sonatype-aether-impl
+ (package
+ (inherit java-sonatype-aether-api)
+ (name "java-sonatype-aether-impl")
+ (arguments
+ `(#:jar-name "aether-impl.jar"
+ #:source-dir "aether-impl/src/main/java"
+ #:test-dir "aether-impl/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'fix-pom
+ (lambda _
+ (substitute* "aether-impl/pom.xml"
+ (("org.sonatype.sisu") "org.codehaus.plexus")
+ (("sisu-inject-plexus") "plexus-container-default"))
+ #t))
+ (add-after 'build 'generate-metadata
+ (lambda _
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
+ "--source" "src/main/java"
+ "--output" "build/classes/META-INF/plexus/components.xml"
+ "--classes" "build/classes"
+ "--descriptors" "build/classes/META-INF")
+ #t))
+ (add-after 'generate-metadata 'rebuild
+ (lambda _
+ (invoke "ant" "jar")
+ #t))
+ (replace 'install (install-from-pom "aether-impl/pom.xml")))))
+ (propagated-inputs
+ `(("java-sonatype-aether-api" ,java-sonatype-aether-api)
+ ("java-sonatype-aether-spi" ,java-sonatype-aether-spi)
+ ("java-sonatype-aether-util" ,java-sonatype-aether-util)
+ ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+ ("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-slf4j-api" ,java-slf4j-api)))
+ (native-inputs
+ `(("java-junit" ,java-junit)
+ ("java-plexus-component-metadata" ,java-plexus-component-metadata)
+ ("java-sonatype-aether-test-util" ,java-sonatype-aether-test-util)))))
+
+;; Again, this old version is required by some maven plugins
+(define-public java-eclipse-aether-api
+ (package
+ (name "java-eclipse-aether-api")
+ (version "1.0.2")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/eclipse/aether-core")
+ (commit "aether-1.0.2.v20150114")))
+ (file-name (git-file-name name version))
+ (sha256
+ (base32
+ "14d336nn0kh5ddf23j37va3hd8gaai19llrpxhf4bcc7g7sgdqxs"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "aether-api.jar"
+ #:source-dir "aether-api/src/main/java"
+ #:test-dir "aether-api/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'install-parent (install-pom-file "pom.xml"))
+ (replace 'install (install-from-pom "aether-api/pom.xml")))))
+ (native-inputs `(("java-junit" ,java-junit)))
+ (home-page "https://github.com/sonatype/sonatype-aether")
+ (synopsis "Maven repository system API")
+ (description "This package contains the API for the maven repository system.")
+ (license license:asl2.0)))
+
+(define-public java-eclipse-aether-spi
+ (package
+ (inherit java-eclipse-aether-api)
+ (name "java-eclipse-aether-spi")
+ (arguments
+ `(#:jar-name "aether-spi.jar"
+ #:source-dir "aether-spi/src/main/java"
+ #:test-dir "aether-spi/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install (install-from-pom "aether-spi/pom.xml")))))
+ (propagated-inputs
+ `(("java-eclipse-aether-api" ,java-eclipse-aether-api)))
+ (synopsis "Maven repository system SPI")
+ (description "This package contains the service provider interface (SPI)
+for repository system implementations and repository connectors.")))
+
+(define-public java-eclipse-aether-test-util
+ (package
+ (inherit java-eclipse-aether-api)
+ (name "java-eclipse-aether-test-util")
+ (arguments
+ `(#:jar-name "aether-test-util.jar"
+ #:source-dir "aether-test-util/src/main/java"
+ #:test-dir "aether-test-util/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install (install-from-pom "aether-util/pom.xml")))))
+ (propagated-inputs
+ `(("java-eclipse-aether-api" ,java-eclipse-aether-api)
+ ("java-eclipse-aether-spi" ,java-eclipse-aether-spi)))
+ (synopsis "Utility classes for testing the maven repository system")
+ (description "This package contains a collection of utility classes to
+ease testing of the repository system.")))
+
+(define-public java-eclipse-aether-util
+ (package
+ (inherit java-eclipse-aether-api)
+ (name "java-eclipse-aether-util")
+ (arguments
+ `(#:jar-name "aether-util.jar"
+ #:source-dir "aether-util/src/main/java"
+ #:test-dir "aether-util/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install (install-from-pom "aether-util/pom.xml")))))
+ (propagated-inputs
+ `(("java-eclipse-aether-api" ,java-eclipse-aether-api)))
+ (native-inputs
+ `(("java-eclipse-aether-test-util" ,java-eclipse-aether-test-util)
+ ("java-junit" ,java-junit)))
+ (synopsis "Utility classes for the maven repository system")
+ (description "This package contains a collection of utility classes to
+ease usage of the repository system.")))
+
+(define-public java-eclipse-aether-impl
+ (package
+ (inherit java-eclipse-aether-api)
+ (name "java-eclipse-aether-impl")
+ (arguments
+ `(#:jar-name "aether-impl.jar"
+ #:source-dir "aether-impl/src/main/java"
+ #:test-dir "aether-impl/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install (install-from-pom "aether-impl/pom.xml")))))
+ (propagated-inputs
+ `(("java-eclipse-aether-api" ,java-eclipse-aether-api)
+ ("java-eclipse-aether-spi" ,java-eclipse-aether-spi)
+ ("java-eclipse-aether-util" ,java-eclipse-aether-util)
+ ("java-javax-inject" ,java-javax-inject)
+ ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
+ ("java-guice" ,java-guice)
+ ("java-slf4j-api" ,java-slf4j-api)))
+ (native-inputs
+ `(("java-eclipse-aether-test-util" ,java-eclipse-aether-test-util)
+ ("java-junit" ,java-junit)))))
+
(define-public maven-shared-utils
(package
(name "maven-shared-utils")
@@ -349,19 +570,26 @@ Maven Wagon, for use in Maven.")))
(arguments
`(#:jar-name "maven-shared-utils.jar"
#:source-dir "src/main/java"
- #:jdk ,icedtea-8
#:phases
(modify-phases %standard-phases
+ (add-before 'build 'fix-/bin/sh-invocation
+ (lambda _
+ (substitute* (find-files "src" ".*.java$")
+ (("/bin/sh") (which "sh")))
+ #t))
(add-before 'check 'remove-cyclic-dep
(lambda _
(delete-file
"src/test/java/org/apache/maven/shared/utils/introspection/ReflectionValueExtractorTest.java")
- #t)))))
- (inputs
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
`(("java-jansi" ,java-jansi)
("java-commons-io" ,java-commons-io)
("java-jsr305" ,java-jsr305)
- ("java-plexus-container-default" ,java-plexus-container-default)))
+ ("java-plexus-container-default" ,java-plexus-container-default)
+ ("maven-parent-pom-30" ,maven-parent-pom-30)))
(native-inputs
`(("unzip" ,unzip)
("java-junit" ,java-junit)
@@ -388,9 +616,14 @@ replacement with improvements.")
(arguments
`(#:jar-name "maven-plugin-annotations.jar"
#:source-dir "maven-plugin-annotations/src/main/java"
- #:tests? #f))
- (inputs
- `(("maven-artifact" ,maven-artifact)))
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "maven-plugin-annotations/pom.xml")))))
+ (propagated-inputs
+ `(("maven-artifact" ,maven-artifact)
+ ("maven-plugin-tools-parent-pom" ,maven-plugin-tools-parent-pom)))
(native-inputs
`(("unzip" ,unzip)))
(home-page "https://maven.apache.org/plugin-tools/maven-plugin-annotations/")
@@ -398,22 +631,43 @@ replacement with improvements.")
(description "This package contains Java 5 annotations for use in Mojos.")
(license license:asl2.0)))
+(define maven-plugin-tools-parent-pom
+ (package
+ (inherit maven-plugin-annotations)
+ (name "maven-plugin-tools-parent-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs '())))
+
(define-public maven-wagon-provider-api
(package
(name "maven-wagon-provider-api")
- (version "3.1.0")
+ (version "3.3.4")
(source (origin
(method url-fetch)
- (uri (string-append "mirror://apache/maven/wagon/"
+ (uri (string-append "https://archive.apache.org/dist/maven/wagon/"
"wagon-" version "-source-release.zip"))
- (sha256 (base32 "0r07j6xdzdnrvqnv8ida7dx1m05pznh5qgmcfcfpyvg9nxbj3l1n"))))
+ (sha256
+ (base32
+ "1iq9bilgfklzbxwwhzi3f19mkbaaf9dh9f83h3yz5gbmvypask9a"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "maven-wagon-provider-api.jar"
#:source-dir "wagon-provider-api/src/main/java"
- #:test-dir "wagon-provider-api/src/test"))
- (inputs
- `(("java-plexus-utils" ,java-plexus-utils)))
+ #:test-dir "wagon-provider-api/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "wagon-provider-api/pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-utils" ,java-plexus-utils)
+ ("maven-wagon-parent-pom" ,maven-wagon-parent-pom)))
(native-inputs
`(("unzip" ,unzip)
("java-junit" ,java-junit)
@@ -424,6 +678,22 @@ replacement with improvements.")
artifact and repository handling code.")
(license license:asl2.0)))
+(define maven-wagon-parent-pom
+ (package
+ (inherit maven-wagon-provider-api)
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("maven-parent-pom-33" ,maven-parent-pom-33)))
+ (native-inputs
+ `(("unzip" ,unzip)))))
+
(define-public maven-wagon-provider-test
(package
(inherit maven-wagon-provider-api)
@@ -436,6 +706,7 @@ artifact and repository handling code.")
(inputs
`(("java-plexus-utils" ,java-plexus-utils)
("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-eclipse-jetty-http-9.2" ,java-eclipse-jetty-http-9.2)
("java-eclipse-jetty-util-9.2" ,java-eclipse-jetty-util-9.2)
("java-eclipse-jetty-security-9.2" ,java-eclipse-jetty-security-9.2)
("java-eclipse-jetty-server-9.2" ,java-eclipse-jetty-server-9.2)
@@ -685,9 +956,9 @@ artifact and repository handling code. It uses providers, that are tools to
manage artifacts and deployment. This package contains a Wagon provider that
gets and puts artifacts through HTTP(S) using Apache HttpClient-4.x.")))
-(define-public maven-artifact
+(define maven-pom
(package
- (name "maven-artifact")
+ (name "maven-pom")
(version "3.6.1")
(source (origin
(method url-fetch)
@@ -705,23 +976,100 @@ gets and puts artifacts through HTTP(S) using Apache HttpClient-4.x.")))
"maven-generate-javax-inject-named.patch"))))
(build-system ant-build-system)
(arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (add-before 'install 'fix-dependencies
+ (lambda _
+ (substitute* "pom.xml"
+ (("classWorldsVersion>.*")
+ (string-append
+ "classWorldsVersion>"
+ ,(package-version java-plexus-classworlds)
+ "</classWorldsVersion>\n"))
+ (("commonsCliVersion>.*")
+ (string-append
+ "commonsCliVersion>"
+ ,(package-version java-commons-cli)
+ "</commonsCliVersion>\n"))
+ (("commonsLangVersion>.*")
+ (string-append
+ "commonsLangVersion>"
+ ,(package-version java-commons-lang3)
+ "</commonsLangVersion>\n"))
+ (("plexusUtilsVersion>.*")
+ (string-append
+ "plexusUtilsVersion>"
+ ,(package-version java-plexus-utils)
+ "</plexusUtilsVersion>\n"))
+ (("plexusInterpolationVersion>.*")
+ (string-append
+ "plexusInterpolationVersion>"
+ ,(package-version java-plexus-interpolation)
+ "</plexusInterpolationVersion>\n"))
+ (("guiceVersion>.*")
+ (string-append
+ "guiceVersion>"
+ ,(package-version java-guice)
+ "</guiceVersion>\n"))
+ (("sisuInjectVersion>.*")
+ (string-append
+ "sisuInjectVersion>"
+ ,(package-version java-eclipse-sisu-inject)
+ "</sisuInjectVersion>\n"))
+ (("securityDispatcherVersion>.*")
+ (string-append
+ "securityDispatcherVersion>"
+ ,(package-version java-plexus-sec-dispatcher)
+ "</securityDispatcherVersion>\n"))
+ (("cipherVersion>.*")
+ (string-append
+ "cipherVersion>"
+ ,(package-version java-plexus-cipher)
+ "</cipherVersion>\n"))
+ (("slf4jVersion>.*")
+ (string-append
+ "slf4jVersion>"
+ ,(package-version java-slf4j-api)
+ "</slf4jVersion>\n"))
+ (("<classifier>no_aop</classifier>") ""))
+ #t))
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("maven-parent-pom-33" ,maven-parent-pom-33)))
+ (home-page "https://maven.apache.org/")
+ (synopsis "Build system")
+ (description "Apache Maven is a software project management and comprehension
+tool. This package contains the Maven pom file, used by all maven components.")
+ (license license:asl2.0)))
+
+(define-public maven-artifact
+ (package
+ (inherit maven-pom)
+ (name "maven-artifact")
+ (arguments
`(#:jar-name "maven-artifact.jar"
#:source-dir "maven-artifact/src/main/java"
#:test-dir "maven-artifact/src/test"
- #:main-class "org.apache.maven.artifact.versioning.ComparableVersion"))
- (inputs
+ #:main-class "org.apache.maven.artifact.versioning.ComparableVersion"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "maven-artifact/pom.xml")))))
+ (propagated-inputs
`(("java-plexus-utils" ,java-plexus-utils)
- ("java-commons-lang3" ,java-commons-lang3)))
+ ("java-commons-lang3" ,java-commons-lang3)
+ ("maven-pom" ,maven-pom)))
(native-inputs
`(("java-junit" ,java-junit)))
- (home-page "https://maven.apache.org/")
- (synopsis "Build system")
(description "Apache Maven is a software project management and comprehension
tool. This package contains the Maven Artifact classes, providing the
@code{Artifact} interface, with its @code{DefaultArtifact} implementation. The
jar file is executable and provides a little tool to display how Maven parses
-and compares versions:")
- (license license:asl2.0)))
+and compares versions:")))
(define-public maven-model
(package
@@ -731,7 +1079,6 @@ and compares versions:")
`(#:jar-name "maven-model.jar"
#:source-dir "maven-model/src/main/java"
#:test-dir "maven-model/src/test"
- #:jdk ,icedtea-8
#:phases
(modify-phases %standard-phases
(add-before 'build 'generate-models
@@ -745,10 +1092,12 @@ and compares versions:")
(modello-single-mode file "4.0.0" "xpp3-reader")
(modello-single-mode file "4.0.0" "xpp3-writer")
(modello-single-mode file "4.0.0" "xpp3-extended-reader"))
- #t)))))
- (inputs
+ #t))
+ (replace 'install (install-from-pom "maven-model/pom.xml")))))
+ (propagated-inputs
`(("java-commons-lang3" ,java-commons-lang3)
- ("java-plexus-utils" ,java-plexus-utils)))
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("maven-pom" ,maven-pom)))
(native-inputs
`(("java-modello-core" ,java-modello-core)
;; for modello:
@@ -791,13 +1140,12 @@ so really just plain Java objects.")))
'("org/apache/maven/building/FileSourceTest.java"
"org/apache/maven/building/UrlSourceTest.java")
(("target/test-classes") "maven-builder-support/src/test/resources")))
- #t)))))
- (inputs
- `(("java-plexus-utils" ,java-plexus-utils)
- ("java-commons-lang3" ,java-commons-lang3)))
+ #t))
+ (replace 'install (install-from-pom "maven-builder-support/pom.xml")))))
+ (propagated-inputs
+ `(("maven-pom" ,maven-pom)))
(native-inputs
- `(("java-junit" ,java-junit)
- ("java-hamcrest-core" ,java-hamcrest-core)))
+ `(("java-junit" ,java-junit)))
(description "Apache Maven is a software project management and comprehension
tool. This package contains a support library for descriptor builders (model,
setting, toolchains)")))
@@ -809,7 +1157,6 @@ setting, toolchains)")))
(arguments
`(#:jar-name "maven-settings.jar"
#:source-dir "maven-settings/src/main/java"
- #:jdk ,icedtea-8
#:tests? #f; no tests
#:phases
(modify-phases %standard-phases
@@ -823,8 +1170,11 @@ setting, toolchains)")))
(modello-single-mode file "1.1.0" "java")
(modello-single-mode file "1.1.0" "xpp3-reader")
(modello-single-mode file "1.1.0" "xpp3-writer"))
- #t)))))
- (inputs '())
+ #t))
+ (replace 'install (install-from-pom "maven-settings/pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-utils" ,java-plexus-utils)
+ ("maven-pom" ,maven-pom)))
(native-inputs
`(("java-modello-core" ,java-modello-core)
;; for modello:
@@ -866,17 +1216,18 @@ simply plain java objects.")))
(chmod "components.sh" #o755)
(invoke "./components.sh" "maven-settings-builder/src/main/java"
"build/classes/META-INF/plexus/components.xml")
- #t)))))
- (inputs
+ #t))
+ (replace 'install (install-from-pom "maven-settings-builder/pom.xml")))))
+ (propagated-inputs
`(("java-plexus-utils" ,java-plexus-utils)
- ("java-plexus-component-annotations" ,java-plexus-component-annotations)
("java-plexus-interpolation" ,java-plexus-interpolation)
("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher)
("maven-builder-support" ,maven-builder-support)
("maven-settings" ,maven-settings)
- ("java-commons-lang3" ,java-commons-lang3)))
+ ("maven-pom" ,maven-pom)))
(native-inputs
- `(("java-junit" ,java-junit)))
+ `(("java-junit" ,java-junit)
+ ("java-plexus-component-annotations" ,java-plexus-component-annotations)))
(description "Apache Maven is a software project management and comprehension
tool. This package contains the effective model builder, with profile activation,
inheritance, interpolation, @dots{}")))
@@ -908,19 +1259,19 @@ inheritance, interpolation, @dots{}")))
(lambda _
(substitute* (find-files "maven-model-builder/src/test/java" ".*.java")
(("src/test") "maven-model-builder/src/test"))
- #t)))))
- (inputs
- `(("model" ,maven-model)
- ("artifact" ,maven-artifact)
- ("support" ,maven-builder-support)
- ("annotations" ,java-plexus-component-annotations)
- ("utils" ,java-plexus-utils)
- ("interpolation" ,java-plexus-interpolation)
- ("lang3" ,java-commons-lang3)
- ("guava" ,java-guava)))
+ #t))
+ (replace 'install
+ (install-from-pom "maven-model-builder/pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-interpolation" ,java-plexus-interpolation)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("maven-artifact" ,maven-artifact)
+ ("maven-builder-support" ,maven-builder-support)
+ ("maven-model" ,maven-model)
+ ("maven-pom" ,maven-pom)))
(native-inputs
`(("java-junit" ,java-junit)
- ("java-hamcrest-core" ,java-hamcrest-core)
+ ("java-guava" ,java-guava)
("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus)
("java-plexus-component-annotations" ,java-plexus-component-annotations)
("guice" ,java-guice)
@@ -957,8 +1308,12 @@ inheritance, interpolation, @dots{}")))
(modello-single-mode file "1.1.0" "java")
(modello-single-mode file "1.1.0" "xpp3-reader")
(modello-single-mode file "1.1.0" "xpp3-writer"))
- #t)))))
- (inputs '())
+ #t))
+ (replace 'install
+ (install-from-pom "maven-repository-metadata/pom.xml")))))
+ (propagated-inputs
+ `(("java-plexus-utils" ,java-plexus-utils)
+ ("maven-pom" ,maven-pom)))
(native-inputs
`(("modello" ,java-modello-core)
;; for modello:
@@ -1000,22 +1355,21 @@ so really just plain objects.")))
(chmod "./sisu.sh" #o755)
(invoke "./sisu.sh" "maven-resolver-provider/src/main/java"
"build/classes/META-INF/sisu/javax.inject.Named")
- #t)))))
- (inputs
- `(("maven-resolver-spi" ,maven-resolver-spi)
+ #t))
+ (replace 'install
+ (install-from-pom "maven-resolver-provider/pom.xml")))))
+ (propagated-inputs
+ `(("maven-model" ,maven-model)
+ ("maven-model-builder" ,maven-model-builder)
+ ("maven-resolver-spi" ,maven-resolver-spi)
("maven-resolver-api" ,maven-resolver-api)
("maven-resolver-impl" ,maven-resolver-impl)
("maven-resolver-util" ,maven-resolver-util)
- ("maven-model" ,maven-model)
- ("maven-model-builder" ,maven-model-builder)
("maven-builder-support" ,maven-builder-support)
("maven-repository-metadata" ,maven-repository-metadata)
("java-plexus-utils" ,java-plexus-utils)
("java-plexus-component-annotations" ,java-plexus-component-annotations)
- ("java-commons-lang3" ,java-commons-lang3)
("java-guice" ,java-guice)
- ("java-guava" ,java-guava)
- ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
("java-javax-inject" ,java-javax-inject)))))
(define-public maven-plugin-api
@@ -1039,8 +1393,10 @@ so really just plain objects.")))
(modello-single-mode file "1.0.0" "java")
(modello-single-mode file "1.0.0" "xpp3-reader")
(modello-single-mode file "1.0.0" "xpp3-writer"))
- #t)))))
- (inputs
+ #t))
+ (replace 'install
+ (install-from-pom "maven-plugin-api/pom.xml")))))
+ (propagated-inputs
`(("maven-artifact" ,maven-artifact)
("maven-model" ,maven-model)
("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus)
@@ -1071,99 +1427,107 @@ implemented by Mojos -- development.
A plugin is described in a @file{META-INF/maven/plugin.xml} plugin descriptor,
generally generated from plugin sources using maven-plugin-plugin.")))
-(define maven-core-bootstrap
- (package
- (inherit maven-artifact)
- (name "maven-core")
- (arguments
- `(#:jar-name "maven-core.jar"
- #:source-dir "src/main/java"
- #:jdk ,icedtea-8
- ;; Tests need maven-compat, which requires maven-core
- #:tests? #f
- #:phases
- (modify-phases %standard-phases
- (add-before 'configure 'chdir
- (lambda _
- ;; Required for generating components.xml in maven-core
- (chdir "maven-core")
- #t))
- (add-before 'build 'copy-resources
- (lambda _
- (mkdir-p "build/classes/")
- (copy-recursively "src/main/resources" "build/classes")
- #t))
- (add-after 'copy-resources 'fill-properties
- (lambda _
- ;; This file controls the output of some mvn subcommands, such as
- ;; mvn -version.
- (substitute* "build/classes/org/apache/maven/messages/build.properties"
- (("\\$\\{buildNumber\\}") "guix_build")
- (("\\$\\{timestamp\\}") "0")
- (("\\$\\{project.version\\}") ,(package-version maven-artifact))
- (("\\$\\{distributionId\\}") "apache-maven")
- (("\\$\\{distributionShortName\\}") "Maven")
- (("\\$\\{distributionName\\}") "Apache Maven"))
- #t))
- (add-before 'build 'generate-sisu-named
- (lambda _
- (mkdir-p "build/classes/META-INF/sisu")
- (chmod "../sisu.sh" #o755)
- (invoke "../sisu.sh" "src/main/java"
- "build/classes/META-INF/sisu/javax.inject.Named")
- #t))
- (add-before 'build 'generate-models
- (lambda* (#:key inputs #:allow-other-keys)
- (define (modello-single-mode file version mode)
- (invoke "java" "org.codehaus.modello.ModelloCli"
- file mode "src/main/java" version
- "false" "true"))
- (let ((file "src/main/mdo/toolchains.mdo"))
- (modello-single-mode file "1.1.0" "java")
- (modello-single-mode file "1.1.0" "xpp3-reader")
- (modello-single-mode file "1.1.0" "xpp3-writer"))
- #t)))))
- (inputs
- `(("maven-artifact" ,maven-artifact)
- ("maven-resolver-provider" ,maven-resolver-provider)
- ("maven-builder-support" ,maven-builder-support)
- ("maven-model" ,maven-model)
- ("maven-model-builder" ,maven-model-builder)
- ("maven-settings" ,maven-settings)
- ("maven-settings-builder" ,maven-settings-builder)
- ("maven-plugin-api" ,maven-plugin-api)
- ("maven-repository-metadata" ,maven-repository-metadata)
- ("maven-shared-utils" ,maven-shared-utils)
- ("java-plexus-component-annotations" ,java-plexus-component-annotations)
- ("java-plexus-utils" ,java-plexus-utils)
- ("java-commons-lang3" ,java-commons-lang3)
- ("java-guava" ,java-guava)
- ("java-guice" ,java-guice)
- ("maven-resolver-api" ,maven-resolver-api)
- ("maven-resolver-spi" ,maven-resolver-spi)
- ("maven-resolver-util" ,maven-resolver-util)
- ("maven-resolver-impl" ,maven-resolver-impl)
- ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
- ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus)
- ("java-javax-inject" ,java-javax-inject)
- ("java-plexus-classworld" ,java-plexus-classworlds)))
- (native-inputs
- `(("java-modello-core" ,java-modello-core)
- ("java-cglib" ,java-cglib)
- ("java-asm" ,java-asm)
- ("java-plexus-classworlds" ,java-plexus-classworlds)
- ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
- ("java-sisu-build-api" ,java-sisu-build-api)
- ("java-modello-plugins-java" ,java-modello-plugins-java)
- ("java-modello-plugins-xml" ,java-modello-plugins-xml)
- ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3)
- ;; tests
- ("java-junit" ,java-junit)
- ("java-mockito-1" ,java-mockito-1)
- ("java-commons-jxpath" ,java-commons-jxpath)))
- (description "Apache Maven is a software project management and comprehension
+(define-public maven-core-bootstrap
+ (hidden-package
+ (package
+ (inherit maven-artifact)
+ (name "maven-core")
+ (arguments
+ `(#:jar-name "maven-core.jar"
+ #:source-dir "src/main/java"
+ #:jdk ,icedtea-8
+ ;; Tests need maven-compat, which requires maven-core
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ ;; Required for generating components.xml in maven-core
+ (chdir "maven-core")
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (mkdir-p "build/classes/")
+ (copy-recursively "src/main/resources" "build/classes")
+ #t))
+ (add-after 'copy-resources 'fill-properties
+ (lambda _
+ ;; This file controls the output of some mvn subcommands, such as
+ ;; mvn -version.
+ (substitute* "build/classes/org/apache/maven/messages/build.properties"
+ (("\\$\\{buildNumber\\}") "guix_build")
+ (("\\$\\{timestamp\\}") "0")
+ (("\\$\\{project.version\\}") ,(package-version maven-artifact))
+ (("\\$\\{distributionId\\}") "apache-maven")
+ (("\\$\\{distributionShortName\\}") "Maven")
+ (("\\$\\{distributionName\\}") "Apache Maven"))
+ #t))
+ (add-before 'build 'generate-sisu-named
+ (lambda _
+ (mkdir-p "build/classes/META-INF/sisu")
+ (chmod "../sisu.sh" #o755)
+ (invoke "../sisu.sh" "src/main/java"
+ "build/classes/META-INF/sisu/javax.inject.Named")
+ #t))
+ (add-before 'build 'generate-models
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define (modello-single-mode file version mode)
+ (invoke "java" "org.codehaus.modello.ModelloCli"
+ file mode "src/main/java" version
+ "false" "true"))
+ (let ((file "src/main/mdo/toolchains.mdo"))
+ (modello-single-mode file "1.1.0" "java")
+ (modello-single-mode file "1.1.0" "xpp3-reader")
+ (modello-single-mode file "1.1.0" "xpp3-writer"))
+ #t))
+ (add-before 'install 'fix-pom
+ (lambda _
+ (substitute* "pom.xml"
+ (("<classifier>no_aop</classifier>") ""))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-artifact" ,maven-artifact)
+ ("maven-resolver-provider" ,maven-resolver-provider)
+ ("maven-builder-support" ,maven-builder-support)
+ ("maven-model" ,maven-model)
+ ("maven-model-builder" ,maven-model-builder)
+ ("maven-settings" ,maven-settings)
+ ("maven-settings-builder" ,maven-settings-builder)
+ ("maven-plugin-api" ,maven-plugin-api)
+ ("maven-repository-metadata" ,maven-repository-metadata)
+ ("maven-shared-utils" ,maven-shared-utils)
+ ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("java-commons-lang3" ,java-commons-lang3)
+ ("java-guava" ,java-guava)
+ ("java-guice" ,java-guice)
+ ("maven-resolver-api" ,maven-resolver-api)
+ ("maven-resolver-spi" ,maven-resolver-spi)
+ ("maven-resolver-util" ,maven-resolver-util)
+ ("maven-resolver-impl" ,maven-resolver-impl)
+ ("java-eclipse-sisu-inject" ,java-eclipse-sisu-inject)
+ ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus)
+ ("java-javax-inject" ,java-javax-inject)
+ ("java-plexus-classworld" ,java-plexus-classworlds)))
+ (native-inputs
+ `(("java-modello-core" ,java-modello-core)
+ ("java-cglib" ,java-cglib)
+ ("java-asm" ,java-asm)
+ ("java-plexus-classworlds" ,java-plexus-classworlds)
+ ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
+ ("java-sisu-build-api" ,java-sisu-build-api)
+ ("java-modello-plugins-java" ,java-modello-plugins-java)
+ ("java-modello-plugins-xml" ,java-modello-plugins-xml)
+ ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3)
+ ;; tests
+ ("java-junit" ,java-junit)
+ ("java-mockito-1" ,java-mockito-1)
+ ("java-commons-jxpath" ,java-commons-jxpath)))
+ (description "Apache Maven is a software project management and comprehension
tool. This package contains the maven core classes managing the whole build
-process.")))
+process."))))
(define-public maven-core
(package
@@ -1281,8 +1645,10 @@ artifactId=maven-core" ,(package-version maven-core-bootstrap))))
(substitute* "build.xml"
(("srcdir=\"maven-embedder/src/test\"")
"srcdir=\"maven-embedder/src/test/java\""))
- #t)))))
- (inputs
+ #t))
+ (replace 'install
+ (install-from-pom "maven-embedder/pom.xml")))))
+ (propagated-inputs
`(("maven-core" ,maven-core)
("maven-artifact" ,maven-artifact)
("maven-plugin-api" ,maven-plugin-api)
@@ -1309,7 +1675,8 @@ artifactId=maven-core" ,(package-version maven-core-bootstrap))))
("java-guice" ,java-guice)
("java-javax-inject" ,java-javax-inject)
("java-slf4j-api" ,java-slf4j-api)
- ("java-slf4j-simple" ,java-slf4j-simple)))
+ ("java-slf4j-simple" ,java-slf4j-simple)
+ ("java-jsr250" ,java-jsr250)))
(native-inputs
`(("java-modello-core" ,java-modello-core)
("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect)
@@ -1478,8 +1845,10 @@ logging support.")))
(add-after 'generate-metadata 'rebuild
(lambda _
(invoke "ant" "jar")
- #t)))))
- (inputs
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
`(("maven-artifact" ,maven-artifact)
("maven-repository-metadata" ,maven-repository-metadata)
("maven-builder-support" ,maven-builder-support)
@@ -1559,8 +1928,10 @@ layer for plugins that need to keep Maven2 compatibility.")))
;; Reference every jar so plexus-classworlds can find them.
(for-each
(lambda (dependency)
- (format #t "load ~a/share/java/*.jar~%"
- (assoc-ref inputs dependency)))
+ (for-each
+ (lambda (file)
+ (format #t "load ~a~%" file))
+ (find-files (assoc-ref inputs dependency) ".*.jar$")))
'("maven-artifact" "maven-embedder" "maven-core" "maven-compat"
"maven-builder-support" "maven-model" "maven-model-builder"
"maven-settings" "maven-settings-builder" "maven-plugin-api"
@@ -1663,3 +2034,1628 @@ management, documentation creation, site publication, and distribution
publication are all controlled from the @file{pom.xml} declarative file. Maven
can be extended by plugins to utilise a number of other development tools for
reporting or the build process.")))
+
+;; Many plugins require maven 3.0 as a dependency.
+(define maven-3.0-pom
+ (package
+ (inherit maven-pom)
+ (version "3.0")
+ (source (origin
+ (method git-fetch)
+ (uri (git-reference
+ (url "https://github.com/apache/maven")
+ (commit (string-append "maven-" version))))
+ (file-name (git-file-name "maven" version))
+ (sha256
+ (base32
+ "06jdwxx9w24shhv3kca80rlrikynn7kdqcrwg59lv2b7adpllwnh"))
+ (modules '((guix build utils)))
+ (snippet
+ '(begin
+ (for-each delete-file (find-files "." "\\.jar$"))
+ (for-each (lambda (file) (chmod file #o644))
+ (find-files "." "."))
+ #t))
+ (patches
+ (search-patches "maven-generate-component-xml.patch"
+ "maven-generate-javax-inject-named.patch"))))
+ (propagated-inputs
+ `(("maven-parent-pom-15" ,maven-parent-pom-15)))))
+
+(define-public maven-3.0-artifact
+ (package
+ (inherit maven-artifact)
+ (version (package-version maven-3.0-pom))
+ (source (package-source maven-3.0-pom))
+ (propagated-inputs
+ (map
+ (lambda (input)
+ (if (equal? (car input) "maven-pom")
+ `("maven-pom" ,maven-3.0-pom)
+ input))
+ (package-propagated-inputs maven-artifact)))))
+
+(define-public maven-3.0-model
+ (package
+ (inherit maven-model)
+ (version (package-version maven-3.0-pom))
+ (source (package-source maven-3.0-pom))
+ (propagated-inputs
+ (map
+ (lambda (input)
+ (if (equal? (car input) "maven-pom")
+ `("maven-pom" ,maven-3.0-pom)
+ input))
+ (package-propagated-inputs maven-artifact)))
+ (arguments
+ `(#:jar-name "maven-model.jar"
+ #:source-dir "maven-model/src/main/java"
+ #:test-dir "maven-model/src/test"
+ #:modules
+ ((guix build ant-build-system)
+ (guix build java-utils)
+ (guix build syscalls)
+ (guix build utils))
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'configure 'use-newer-model
+ (lambda* (#:key inputs #:allow-other-keys)
+ ;; The model has almost not changed, but the newer version is
+ ;; needed to prevent an error in the newer modello we have
+ (let ((source (assoc-ref inputs "maven-source"))
+ (dir (mkdtemp! "maven-source-XXXXXXXX")))
+ (with-directory-excursion dir
+ (invoke "tar" "xf" source)
+ (copy-file (car (find-files "." "maven.mdo"))
+ "../maven-model/src/main/mdo/maven.mdo")))
+ #t))
+ (add-before 'build 'generate-models
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define (modello-single-mode file version mode)
+ (invoke "java" "org.codehaus.modello.ModelloCli"
+ file mode "maven-model/src/main/java" version
+ "false" "true" "UTF-8"))
+ (let ((file "maven-model/src/main/mdo/maven.mdo"))
+ (modello-single-mode file "4.0.0" "java")
+ (modello-single-mode file "4.0.0" "xpp3-reader")
+ (modello-single-mode file "4.0.0" "xpp3-writer")
+ (modello-single-mode file "4.0.0" "xpp3-extended-reader"))
+ #t))
+ (replace 'install
+ (install-from-pom "maven-model/pom.xml")))))
+ (inputs
+ `(("maven-source" ,(package-source maven-pom))
+ ,@(package-inputs maven-model)))))
+
+(define-public maven-3.0-settings
+ (package
+ (inherit maven-settings)
+ (version (package-version maven-3.0-pom))
+ (source (package-source maven-3.0-pom))
+ (propagated-inputs
+ (map
+ (lambda (input)
+ (if (equal? (car input) "maven-pom")
+ `("maven-pom" ,maven-3.0-pom)
+ input))
+ (package-propagated-inputs maven-settings)))))
+
+(define-public maven-3.0-settings-builder
+ (package
+ (inherit maven-settings-builder)
+ (version (package-version maven-3.0-pom))
+ (source (package-source maven-3.0-pom))
+ (propagated-inputs
+ `(("java-plexus-component-annotations" ,java-plexus-component-annotations)
+ ,@(filter
+ (lambda (a) a)
+ (map
+ (lambda (input)
+ (match (car input)
+ ("maven-pom" `("maven-pom" ,maven-3.0-pom))
+ ("maven-settings" `("maven-settings" ,maven-3.0-settings))
+ ("maven-builder-support" #f)
+ (_ input)))
+ (package-propagated-inputs maven-settings-builder)))))))
+
+(define-public maven-3.0-model-builder
+ (package
+ (inherit maven-model-builder)
+ (version (package-version maven-3.0-pom))
+ (source (package-source maven-3.0-pom))
+ (propagated-inputs
+ `(("java-plexus-component-annotations" ,java-plexus-component-annotations)
+ ,@(filter
+ (lambda (a) a)
+ (map
+ (lambda (input)
+ (match (car input)
+ ("maven-pom" `("maven-pom" ,maven-3.0-pom))
+ ("maven-model" `("maven-model" ,maven-3.0-model))
+ ("maven-artifact" `("maven-artifact" ,maven-3.0-artifact))
+ ("maven-builder-support" #f)
+ (_ input)))
+ (package-propagated-inputs maven-model-builder)))))))
+
+(define-public maven-3.0-plugin-api
+ (package
+ (inherit maven-plugin-api)
+ (version (package-version maven-3.0-pom))
+ (source (package-source maven-3.0-pom))
+ (arguments
+ (substitute-keyword-arguments (package-arguments maven-plugin-api)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'install 'fix-pom
+ (lambda _
+ (substitute* "maven-plugin-api/pom.xml"
+ (("org.sonatype.sisu") "org.codehaus.plexus")
+ (("sisu-inject-plexus") "plexus-container-default"))
+ #t))))))
+ (propagated-inputs
+ (map
+ (lambda (input)
+ (match (car input)
+ ("maven-pom" `("maven-pom" ,maven-3.0-pom))
+ ("maven-artifact" `("maven-artifact" ,maven-3.0-artifact))
+ ("maven-model" `("maven-model" ,maven-3.0-model))
+ (_ input)))
+ (package-propagated-inputs maven-model-builder)))
+ (native-inputs
+ `(("java-plexus-container-default" ,java-plexus-container-default)
+ ,@(package-native-inputs maven-plugin-api)))))
+
+(define-public maven-3.0-repository-metadata
+ (package
+ (inherit maven-repository-metadata)
+ (version (package-version maven-3.0-pom))
+ (source (package-source maven-3.0-pom))
+ (propagated-inputs
+ (map
+ (lambda (input)
+ (if (equal? (car input) "maven-pom")
+ `("maven-pom" ,maven-3.0-pom)
+ input))
+ (package-propagated-inputs maven-repository-metadata)))))
+
+(define-public maven-3.0-aether-provider
+ (package
+ (inherit maven-3.0-pom)
+ (name "maven-aether-provider")
+ (arguments
+ `(#:jar-name "maven-aether-provider.jar"
+ #:source-dir "maven-aether-provider/src/main/java"
+ #:tests? #f; no tests in 3.0
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'generate-metadata
+ (lambda _
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
+ "--source" "src/main/java"
+ "--output" "build/classes/META-INF/plexus/components.xml"
+ "--classes" "build/classes"
+ "--descriptors" "build/classes/META-INF")
+ #t))
+ (add-after 'generate-metadata 'rebuild
+ (lambda _
+ (invoke "ant" "jar")
+ #t))
+ (replace 'install
+ (install-from-pom "maven-aether-provider/pom.xml")))))
+ (propagated-inputs
+ `(("maven-model" ,maven-3.0-model)
+ ("maven-model-builder" ,maven-3.0-model-builder)
+ ("maven-repository-metadata" ,maven-3.0-repository-metadata)
+ ("java-sonatype-aether-api" ,java-sonatype-aether-api)
+ ("java-sonatype-aether-spi" ,java-sonatype-aether-spi)
+ ("java-sonatype-aether-impl" ,java-sonatype-aether-impl)
+ ("java-plexus-component-annotation" ,java-plexus-component-annotations)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("maven-pom" ,maven-3.0-pom)))
+ (native-inputs
+ `(("java-plexus-component-metadata" ,java-plexus-component-metadata)))))
+
+(define-public maven-3.0-core
+ (package
+ (inherit maven-core)
+ (version (package-version maven-3.0-pom))
+ (source (package-source maven-3.0-pom))
+ (arguments
+ `(#:jar-name "maven-core.jar"
+ #:source-dir "src/main/java"
+ #:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'configure 'chdir
+ (lambda _
+ ;; Required for generating components.xml in maven-core
+ (chdir "maven-core")
+ #t))
+ (add-before 'build 'generate-models
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define (modello-single-mode file version mode)
+ (invoke "java" "org.codehaus.modello.ModelloCli"
+ file mode "src/main/java" version
+ "false" "true" "UTF-8"))
+ (let ((file "src/main/mdo/toolchains.mdo"))
+ (modello-single-mode file "1.0.0" "java")
+ (modello-single-mode file "1.0.0" "xpp3-reader")
+ (modello-single-mode file "1.0.0" "xpp3-writer"))
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (mkdir-p "build/classes/")
+ (copy-recursively "src/main/resources" "build/classes")
+ #t))
+ (add-after 'build 'generate-metadata
+ (lambda _
+ (define (components file)
+ (let ((sxml (with-input-from-file file
+ (lambda _ (xml->sxml (current-input-port)
+ #:trim-whitespace? #t)))))
+ ;; Select the list of <component>s inside the <component-set>
+ ;; and <components>.
+ ((@ (ice-9 match) match) sxml
+ (('*TOP*
+ ('*PI* foo ...)
+ ('component-set
+ ('components x ...))) x))))
+ (use-modules (sxml simple))
+ (delete-file "build/classes/META-INF/plexus/components.xml")
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
+ "--source" "build/classes/META-INF/plexus"
+ "--output" "build/classes/META-INF/plexus/components.t.xml"
+ "--classes" "build/classes"
+ "--descriptors" "build/classes")
+ ;; Now we merge all other components from hand-written xml
+ (let ((generated-xml (components "build/classes/META-INF/plexus/components.t.xml"))
+ (components-xml (components "src/main/resources/META-INF/plexus/components.xml"))
+ (artifact-handlers-xml (components "src/main/resources/META-INF/plexus/artifact-handlers.xml")))
+ (with-output-to-file "build/classes/META-INF/plexus/components.xml"
+ (lambda _
+ (display "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n")
+ (sxml->xml
+ `(component-set
+ (components
+ ,@(append generated-xml components-xml
+ artifact-handlers-xml)))))))
+ #t))
+ (add-after 'generate-metadata 'rebuild
+ (lambda _
+ (invoke "ant" "jar")
+ #t))
+ (add-before 'install 'fix-pom
+ (lambda _
+ (substitute* "pom.xml"
+ (("org.sonatype.sisu") "org.codehaus.plexus")
+ (("sisu-inject-plexus") "plexus-container-default"))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-model" ,maven-3.0-model)
+ ("maven-settings" ,maven-3.0-settings)
+ ("maven-settings-builder" ,maven-3.0-settings-builder)
+ ("maven-repository-metadata" ,maven-3.0-repository-metadata)
+ ("maven-artifact" ,maven-3.0-artifact)
+ ("maven-model-builder" ,maven-3.0-model-builder)
+ ("maven-aether-provider" ,maven-3.0-aether-provider)
+ ("java-sonatype-aether-impl" ,java-sonatype-aether-impl)
+ ("java-sonatype-aether-api" ,java-sonatype-aether-api)
+ ("java-sonatype-aether-util" ,java-sonatype-aether-util)
+ ("java-plexus-interpolation" ,java-plexus-interpolation)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("java-plexus-classworlds" ,java-plexus-classworlds)
+ ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+ ("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher)
+ ("maven-pom" ,maven-3.0-pom)))))
+
+(define-public maven-3.0-compat
+ (package
+ (inherit maven-compat)
+ (version (package-version maven-3.0-pom))
+ (source (package-source maven-3.0-pom))
+ (arguments
+ `(#:tests? #f ;require an old version of java-easymock
+ ,@(substitute-keyword-arguments (package-arguments maven-compat)
+ ((#:phases phases)
+ `(modify-phases ,phases
+ (add-before 'install 'fix-pom
+ (lambda _
+ (substitute* "pom.xml"
+ (("org.sonatype.sisu") "org.codehaus.plexus")
+ (("sisu-inject-plexus") "plexus-container-default"))
+ #t))
+ (delete 'build-tests))))))
+ (propagated-inputs
+ `(("maven-model" ,maven-3.0-model)
+ ("maven-model-builder" ,maven-3.0-model-builder)
+ ("maven-settings" ,maven-3.0-settings)
+ ("maven-settings-builder" ,maven-3.0-settings-builder)
+ ("maven-artifact" ,maven-3.0-artifact)
+ ("maven-core" ,maven-3.0-core)
+ ("maven-aether-provider" ,maven-3.0-aether-provider)
+ ("maven-repository-metadata" ,maven-3.0-repository-metadata)
+ ("java-sonatype-aether-api" ,java-sonatype-aether-api)
+ ("java-sonatype-aether-util" ,java-sonatype-aether-util)
+ ("java-sonatype-aether-impl" ,java-sonatype-aether-impl)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("java-plexus-interpolation" ,java-plexus-interpolation)
+ ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus)
+ ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+ ("java-plexus-container-default" ,java-plexus-container-default)
+ ("maven-wagon-provider-api" ,maven-wagon-provider-api)
+ ("maven-pom" ,maven-3.0-pom)))))
+
+(define-public maven-shared-utils-3.0
+ (package
+ (inherit maven-shared-utils)
+ (version "3.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://archive.apache.org/dist/maven/shared/"
+ "maven-shared-utils-" version "-source-release.zip"))
+ (sha256
+ (base32
+ "0qm8y85kip2hyhnhlkqgj0rhmf83z07s7l7gzsfl5dzl3kvp8nal"))))
+ (propagated-inputs
+ `(("maven-core" ,maven-3.0-core)
+ ("maven-components-parent-pom" ,maven-components-parent-pom-21)
+ ,@(package-propagated-inputs maven-shared-utils)))))
+
+(define-public maven-shared-utils-3.1
+ (package
+ (inherit maven-shared-utils)
+ (version "3.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://archive.apache.org/dist/maven/shared/"
+ "maven-shared-utils-" version "-source-release.zip"))
+ (sha256
+ (base32
+ "0vfaas4g09ch0agrd1dcxcmhdd3w971ssvfr9mx9gi2lp5nv8w66"))))))
+
+(define-public maven-shared-io
+ (package
+ (name "maven-shared-io")
+ (version "3.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/maven/shared/"
+ "maven-shared-io-" version
+ "-source-release.zip"))
+ (sha256
+ (base32
+ "0hsyll8gg581802xhs4achdz8fpmfz7y02abx9s4mb8bc6yfh229"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "maven-shared-io.jar"
+ #:source-dir "src/main/java"
+ #:test-dir "src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "src/main/resources" "build/classes/")
+ (copy-recursively "src/test/resources" "build/test-classes/")
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-artifact" ,maven-3.0-artifact)
+ ("maven-compat" ,maven-3.0-compat)
+ ("maven-plugin-api" ,maven-3.0-plugin-api)
+ ("maven-shared-utils" ,maven-shared-utils)
+ ("maven-wagon-provider-api" ,maven-wagon-provider-api)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("maven-components-parent-pom" ,maven-components-parent-pom-22)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-junit" ,java-junit)
+ ("java-easymock" ,java-easymock)))
+ (home-page "https://maven.apache.org/shared/maven-dependency-tree")
+ (synopsis "Tree-based API for resolution of Maven project dependencies")
+ (description "This package provides a tree-based API for resolution of
+Maven project dependencies.")
+ (license license:asl2.0)))
+
+(define-public maven-file-management
+ (package
+ (name "maven-file-management")
+ (version "3.0.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/maven/shared/"
+ "file-management-" version
+ "-source-release.zip"))
+ (sha256
+ (base32
+ "0wisz6sm67axrwvx8a75mb9s03h7kzkzfw8j3aaa4sx4k9ph58da"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "maven-file-management.jar"
+ #:source-dir "src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (copy-recursively "src/main/resources" "build/classes/")
+ #t))
+ (add-before 'build 'generate-models
+ (lambda* (#:key inputs #:allow-other-keys)
+ (define (modello-single-mode file version mode)
+ (invoke "java"
+ "org.codehaus.modello.ModelloCli"
+ file mode "src/main/java" version
+ "false" "true"))
+ (let ((file "src/main/mdo/fileset.mdo"))
+ (modello-single-mode file "1.1.0" "java")
+ (modello-single-mode file "1.1.0" "xpp3-reader")
+ (modello-single-mode file "1.1.0" "xpp3-writer"))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-plugin-api" ,maven-3.0-plugin-api)
+ ("maven-shared-io" ,maven-shared-io)
+ ("maven-shared-utils" ,maven-shared-utils)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("maven-components-parent-pom" ,maven-components-parent-pom-22)))
+ (native-inputs
+ `(("java-modello-core" ,java-modello-core)
+ ;; modello plugins:
+ ("java-modellop-plugins-java" ,java-modello-plugins-java)
+ ("java-modellop-plugins-xpp3" ,java-modello-plugins-xpp3)
+ ("unzip" ,unzip)))
+ (home-page "https://maven.apache.org/shared/maven-dependency-tree")
+ (synopsis "Tree-based API for resolution of Maven project dependencies")
+ (description "This package provides a tree-based API for resolution of
+Maven project dependencies.")
+ (license license:asl2.0)))
+
+(define-public maven-archiver
+ (package
+ (name "maven-archiver")
+ (version "3.5.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/maven/shared/"
+ "maven-archiver-" version
+ "-source-release.zip"))
+ (sha256
+ (base32
+ "1204xkqj259brpk3yscprml0lbfbyn1vn5nrgqjk44z5vx127lbw"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "maven-archiver.jar"
+ #:source-dir "src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("java-commons-io" ,java-commons-io)
+ ("maven-artifact" ,maven-3.0-artifact)
+ ("maven-core" ,maven-3.0-core)
+ ("maven-model" ,maven-3.0-model)
+ ("maven-shared-utils" ,maven-shared-utils)
+ ("java-plexus-archiver" ,java-plexus-archiver)
+ ("java-plexus-interpolation" ,java-plexus-interpolation)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("maen-parent-pom" ,maven-parent-pom-33)))
+ (native-inputs
+ `(("java-junit" ,java-junit)
+ ("java-assertj" ,java-assertj)
+ ("unzip" ,unzip)))
+ (home-page "https://maven.apache.org/shared/maven-dependency-tree")
+ (synopsis "Tree-based API for resolution of Maven project dependencies")
+ (description "This package provides a tree-based API for resolution of
+Maven project dependencies.")
+ (license license:asl2.0)))
+
+(define-public maven-dependency-tree
+ (package
+ (name "maven-dependency-tree")
+ (version "3.0.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/maven/shared/"
+ "maven-dependency-tree-" version
+ "-source-release.zip"))
+ (sha256
+ (base32
+ "0mxfslxvcmjs13jl30zhcg672j970dzn6ihh79w9ajh6sfqmlds2"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "maven-dependency-tree.jar"
+ #:source-dir "src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-core" ,maven-3.0-core)
+ ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+ ("maven-parent-pom" ,maven-parent-pom-30)))
+ (inputs
+ `(("java-sonatype-aether-api" ,java-sonatype-aether-api)
+ ("java-sonatype-aether-util" ,java-sonatype-aether-util)
+ ("java-eclipse-aether-api" ,java-eclipse-aether-api)
+ ("java-eclipse-aether-util" ,java-eclipse-aether-util)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-junit" ,java-junit)))
+ (home-page "https://maven.apache.org/shared/maven-dependency-tree")
+ (synopsis "Tree-based API for resolution of Maven project dependencies")
+ (description "This package provides a tree-based API for resolution of
+Maven project dependencies.")
+ (license license:asl2.0)))
+
+(define-public maven-common-artifact-filters
+ (package
+ (name "maven-common-artifact-filters")
+ (version "3.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/maven/shared/"
+ "maven-common-artifact-filters-" version
+ "-source-release.zip"))
+ (sha256
+ (base32
+ "1cl1qk4r0gp62bjzfm7lml9raz1my2kd4yf0ci0lnfsn0h5qivnb"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "maven-common-artifact-filters.jar"
+ #:source-dir "src/main/java"
+ #:tests? #f; require maven-plugin-testing-harness, which requires maven 3.2.
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'remove-sisu
+ (lambda _
+ ;; Replace sisu with an existing dependency, to prevent a failure
+ ;; when rewritting dependency versions
+ (substitute* "pom.xml"
+ (("sisu-inject-plexus") "maven-plugin-api")
+ (("org.sonatype.sisu") "org.apache.maven"))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-artifact" ,maven-3.0-artifact)
+ ("maven-model" ,maven-3.0-model)
+ ("maven-core" ,maven-3.0-core)
+ ("maven-plugin-api" ,maven-3.0-plugin-api)
+ ("maven-shared-utils" ,maven-shared-utils)
+ ("maven-parent-pom" ,maven-parent-pom-33)
+ ("java-sonatype-aether-api" ,java-sonatype-aether-api)
+ ("java-sonatype-aether-util" ,java-sonatype-aether-util)))
+ (inputs
+ `(("maven-resolver-api" ,maven-resolver-api)
+ ("maven-resolver-util" ,maven-resolver-util)))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (home-page "https://maven.apache.org/shared/maven-dependency-tree")
+ (synopsis "Tree-based API for resolution of Maven project dependencies")
+ (description "This package provides a tree-based API for resolution of
+Maven project dependencies.")
+ (license license:asl2.0)))
+
+(define-public maven-enforcer-api
+ (package
+ (name "maven-enforcer-api")
+ (version "3.0.0-M3")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/maven/enforcer/"
+ "enforcer-" version "-source-release.zip"))
+ (sha256
+ (base32
+ "014cwj0dqa69nnlzcin8pk9wsjmmg71vsbcpb16cibcjpm6h9wjg"))
+ (patches
+ (search-patches "maven-enforcer-api-fix-old-dependencies.patch"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "maven-enforcer-api.jar"
+ #:source-dir "enforcer-api/src/main/java"
+ #:tests? #f; no tests
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "enforcer-api/pom.xml")))))
+ (propagated-inputs
+ `(("maven-plugin-api" ,maven-plugin-api)
+ ("java-plexus-container-default" ,java-plexus-container-default)
+ ("java-jsr305" ,java-jsr305)
+ ("maven-enforcer-parent-pom" ,maven-enforcer-parent-pom)))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (home-page "https://maven.apache.org/shared/maven-dependency-tree")
+ (synopsis "Tree-based API for resolution of Maven project dependencies")
+ (description "This package provides a tree-based API for resolution of
+Maven project dependencies.")
+ (license license:asl2.0)))
+
+(define maven-enforcer-parent-pom
+ (package
+ (inherit maven-enforcer-api)
+ (name "maven-enforcer-parent-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("maven-parent-pom" ,maven-parent-pom-30)))))
+
+(define-public maven-enforcer-rules
+ (package
+ (inherit maven-enforcer-api)
+ (name "maven-enforcer-rules")
+ (arguments
+ `(#:tests? #f; requires maven-plugin-testing-harness
+ #:jar-name "maven-enforcer-rules.jar"
+ #:source-dir "enforcer-rules/src/main/java"
+ #:test-dir "enforcer-rules/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "enforcer-rules/pom.xml")))))
+ (propagated-inputs
+ `(("maven-artifact" ,maven-artifact)
+ ("maven-plugin-api" ,maven-plugin-api)
+ ("maven-core" ,maven-core)
+ ("maven-common-artifact-filters" ,maven-common-artifact-filters)
+ ("java-commons-codec" ,java-commons-codec)
+ ("java-commons-lang3" ,java-commons-lang3)
+ ("maven-enforcer-api" ,maven-enforcer-api)
+ ("maven-resolver-util" ,maven-resolver-util)
+ ("java-bsh" ,java-bsh)
+ ("maven-dependency-tree" ,maven-dependency-tree)
+ ("maven-compat" ,maven-3.0-compat)
+ ("maven-enforcer-parent-pom" ,maven-enforcer-parent-pom)))))
+
+(define-public maven-enforcer-plugin
+ (package
+ (inherit maven-enforcer-api)
+ (name "maven-enforcer-plugin")
+ (arguments
+ `(#:tests? #f
+ #:jar-name "maven-enforcer-plugin.jar"
+ #:source-dir "maven-enforcer-plugin/src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'generate-plugin.xml
+ (generate-plugin.xml "maven-enforcer-plugin/pom.xml"
+ "enforcer"
+ "maven-enforcer-plugin/src/main/java/org/apache/maven/plugins/enforcer/"
+ (list
+ (list "DisplayInfoMojo.java")
+ (list "EnforceMojo.java"))))
+ (replace 'install
+ (install-from-pom "maven-enforcer-plugin/pom.xml")))))
+ (propagated-inputs
+ `(("maven-artifact" ,maven-artifact)
+ ("maven-plugin-api" ,maven-plugin-api)
+ ("maven-core" ,maven-core)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("maven-enforcer-api" ,maven-enforcer-api)
+ ("maven-enforcer-rules" ,maven-enforcer-rules)
+ ("maven-plugin-annotations" ,maven-plugin-annotations)
+ ("maven-enforcer-parent-pom" ,maven-enforcer-parent-pom)))))
+
+(define-public maven-artifact-transfer
+ (package
+ (name "maven-artifact-transfer")
+ (version "0.12.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/maven/shared/"
+ "maven-artifact-transfer-" version
+ "-source-release.zip"))
+ (sha256
+ (base32
+ "0mkdjr3wnvaxqaq68sy7h4mqlq3xgwwp5s2anj5vbxfy4bsc1ivj"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f; require mockito 2
+ #:jar-name "maven-artifact-transfer.jar"
+ #:source-dir "src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'generate-metadata
+ (lambda _
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
+ "--source" "src/main/java"
+ "--output" "build/classes/META-INF/plexus/components.xml"
+ "--classes" "build/classes"
+ "--descriptors" "build/classes/META-INF")
+ #t))
+ (add-after 'generate-metadata 'rebuild
+ (lambda _
+ (invoke "ant" "jar")
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("java-commons-codec" ,java-commons-codec)
+ ("maven-artifact" ,maven-3.0-artifact)
+ ("maven-core" ,maven-3.0-core)
+ ("maven-common-artifact-filters" ,maven-common-artifact-filters)
+ ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("java-slf4j-api" ,java-slf4j-api)
+ ("java-plexus-classworlds" ,java-plexus-classworlds)
+ ("java-sonatype-aether-api" ,java-sonatype-aether-api)
+ ("java-eclipse-aether-api" ,java-eclipse-aether-api)
+ ("java-eclipse-aether-util" ,java-eclipse-aether-util)
+ ("java-eclipse-aether-impl" ,java-eclipse-aether-impl)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
+ (home-page "https://maven.apache.org/shared/maven-artifact-transfer")
+ (synopsis "API to install, deploy and resolve artifacts in Maven")
+ (description "This package contains an API to install, deploy and resolve
+artifacts in Maven 3.")
+ (license license:asl2.0)))
+
+(define-public maven-install-plugin
+ (package
+ (name "maven-install-plugin")
+ (version "3.0.0-M1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/maven/plugins/"
+ "maven-install-plugin-" version
+ "-source-release.zip"))
+ (sha256
+ (base32
+ "1l9iydxririrair0i5sk2iypn9wspzbb666lc0ddg20yyr8w39dm"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:tests? #f; require maven-plugin-testing-harness
+ #:jar-name "maven-install-plugin.jar"
+ #:source-dir "src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-pom
+ (lambda _
+ (substitute* "pom.xml"
+ (("maven-project") "maven-core")
+ (("maven-artifact-manager") "maven-artifact")
+ (("2.0.6") "3.0"))
+ #t))
+ (add-before 'build 'generate-plugin.xml
+ (generate-plugin.xml "pom.xml"
+ "install"
+ "src/main/java/org/apache/maven/plugins/install"
+ (list
+ (list "AbstractInstallMojo.java" "InstallFileMojo.java")
+ (list "AbstractInstallMojo.java" "InstallMojo.java"))))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-artifact" ,maven-artifact)
+ ("maven-plugin-api" ,maven-plugin-api)
+ ("maven-compat" ,maven-compat)
+ ("maven-artifact-transfer" ,maven-artifact-transfer)
+ ("maven-plugins-pom-23" ,maven-plugins-pom-23)
+ ("java-plexus-digest" ,java-plexus-digest)))
+ (inputs
+ `(("maven-plugin-annotations" ,maven-plugin-annotations)
+ ("java-slf4j-api" ,java-slf4j-api)))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (home-page "https://maven.apache.org/plugin/maven-install-plugin")
+ (synopsis "Maven's install plugin")
+ (description "The Install Plugin is used during the install phase to add
+artifact(s) to the local repository. The Install Plugin uses the information
+in the POM (groupId, artifactId, version) to determine the proper location for
+the artifact within the local repository.
+
+The local repository is the local cache where all artifacts needed for the
+build are stored. By default, it is located within the user's home directory
+(@file{~/.m2/repository}) but the location can be configured in
+@file{~/.m2/settings.xml} using the @code{<localRepository>} element.")
+ (license license:asl2.0)))
+
+(define-public maven-filtering
+ (package
+ (name "maven-filtering")
+ (version "3.1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://archive.apache.org/dist/maven/"
+ "shared/maven-filtering-" version
+ "-source-release.zip"))
+ (sha256
+ (base32
+ "09wrdhchnszd2l6h4z30ra0bv1a19qyjgac9z8zf1pn0m4nw05yz"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "maven-filtering.jar"
+ #:source-dir "src/main/java"
+ #:test-dir "src/test"
+ ;; this test comes from sisu-build-api, not this package
+ #:test-exclude (list "**/IncrementalResourceFilteringTest.java"
+ "**/Abstract*.java")
+ #:phases
+ (modify-phases %standard-phases
+ (add-after 'build 'generate-metadata
+ (lambda _
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
+ "--source" "src/main/java"
+ "--output" "build/classes/META-INF/plexus/components.xml"
+ "--classes" "build/classes"
+ "--descriptors" "build/classes/META-INF")
+ #t))
+ (add-after 'generate-metadata 'rebuild
+ (lambda _
+ (invoke "ant" "jar")
+ #t))
+ (add-before 'check 'decompress-tests
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let* ((build-api-source (assoc-ref inputs "java-sisu-build-api-origin"))
+ (classes (string-append build-api-source "/src/test/java")))
+ (copy-recursively classes "src/test/"))
+ #t))
+ (add-before 'check 'fix-directory
+ (lambda _
+ (substitute* (find-files "src/test" ".*.java$")
+ (("target/test-classes/") "build/test-classes/"))))
+ (add-before 'check 'copy-test-resources
+ (lambda _
+ (copy-recursively "src/test/resources" "build/test-classes/")
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-core" ,maven-3.0-core)
+ ("maven-shared-utils" ,maven-shared-utils)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("java-plexus-interpolation" ,java-plexus-interpolation)
+ ("java-sisu-build-api" ,java-sisu-build-api)
+ ("maven-parent-pom" ,maven-parent-pom-30)))
+ (inputs
+ `(("java-jsr305" ,java-jsr305)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-assertj" ,java-assertj)
+ ("java-junit" ,java-junit)
+ ("java-mockito" ,java-mockito-1)
+ ("java-objenesis" ,java-objenesis)
+ ("java-plexus-component-metadata" ,java-plexus-component-metadata)
+ ("java-sisu-build-api-origin" ,(package-source java-sisu-build-api))))
+ (home-page "https://maven.apache.org/shared/maven-filtering")
+ (synopsis "Shared component for all plugins that needs to filter resources")
+ (description "This component provides an API to filter resources in Maven
+projects.")
+ (license license:asl2.0)))
+
+(define-public maven-resources-plugin
+ (package
+ (name "maven-resources-plugin")
+ (version "3.1.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/apache/"
+ "maven-resources-plugin/archive/"
+ "maven-resources-plugin-" version ".tar.gz"))
+ (sha256
+ (base32
+ "1f5gnjg2xmqfxml6k0ydyd1sxxwzgnb24qn6avcc4mijwd8a84pl"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "maven-resources-plugin.jar"
+ #:source-dir "src/main/java"
+ #:test-dir "src/test"
+ #:tests? #f; test depends on maven-plugin-test-harness
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'generate-plugin.xml
+ (generate-plugin.xml "pom.xml" "resources"
+ "src/main/java/org/apache/maven/plugins/resources"
+ (list
+ (list "ResourcesMojo.java" "CopyResourcesMojo.java")
+ (list "ResourcesMojo.java")
+ (list "ResourcesMojo.java" "TestResourcesMojo.java"))))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-plugin-api" ,maven-plugin-api)
+ ("maven-core" ,maven-core)
+ ("java-plexus-utils" ,java-plexus-utils)
+ ("maven-filtering" ,maven-filtering)
+ ("java-plexus-interpolation" ,java-plexus-interpolation)
+ ("maven-parent-pom" ,maven-parent-pom-31)))
+ (inputs
+ `(("maven-plugin-annotations" ,maven-plugin-annotations)
+ ("java-commons-io" ,java-commons-io)))
+ (native-inputs
+ `(("java-plexus-component-metadata" ,java-plexus-component-metadata)))
+ (home-page "https://maven.apache.org/plugins/maven-resources-plugin")
+ (synopsis "Maven plugin to collect and install resources")
+ (description "The Resources Plugin handles the copying of project resources
+to the output directory. There are two different kinds of resources: main
+resources and test resources. The difference is that the main resources are
+the resources associated to the main source code while the test resources are
+associated to the test source code.
+
+Thus, this allows the separation of resources for the main source code and its
+unit tests.")
+ (license license:asl2.0)))
+
+(define-public maven-shared-incremental
+ (package
+ (name "maven-shared-incremental")
+ (version "1.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://archive.apache.org/dist/maven/shared/"
+ "maven-shared-incremental-" version
+ "-source-release.zip"))
+ (sha256
+ (base32
+ "03n4nfswyg9ahkz2zx4skcr3ghs01zh95g9js51hc75mfqx9b976"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "shared-incremental.java"
+ #:source-dir "src/main/java"
+ #:test-dir "src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'change-parent
+ (lambda _
+ (substitute* "pom.xml"
+ (("19") "30"))
+ #t))
+ (add-before 'build 'fix-pom
+ (lambda _
+ (substitute* "pom.xml"
+ (("plexus-component-api") "plexus-component-annotations"))
+ #t))
+ (add-after 'build 'generate-metadata
+ (lambda _
+ (invoke "java" "-cp" (string-append (getenv "CLASSPATH") ":build/classes")
+ "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli"
+ "--source" "src/main/java"
+ "--output" "build/classes/META-INF/plexus/components.xml"
+ "--classes" "build/classes"
+ "--descriptors" "build/classes/META-INF")
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-plugin-api" ,maven-plugin-api)
+ ("maven-core" ,maven-core)
+ ("maven-shared-utils" ,maven-shared-utils)
+ ("java-plexus-component-annotations" ,java-plexus-component-annotations)
+ ("maven-parent-pom" ,maven-parent-pom-30)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-plexus-component-metadata" ,java-plexus-component-metadata)))
+ (home-page "https://maven.apache.org/shared/maven-shared-incremental")
+ (synopsis "Maven Incremental Build support utilities")
+ (description "This package contains various utility classes and plexus
+components for supporting incremental build functionality in maven plugins.")
+ (license license:asl2.0)))
+
+(define-public maven-compiler-plugin
+ (package
+ (name "maven-compiler-plugin")
+ (version "3.8.1")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/apache/"
+ "maven-compiler-plugin/archive/"
+ "maven-compiler-plugin-" version ".tar.gz"))
+ (sha256
+ (base32
+ "018d9qwc4cd6k7a8kvhvxjmzbzd2ifdf7m36wqjfq42010js1mv1"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "maven-compiler-plugin.jar"
+ #:source-dir "src/main/java"
+ #:test-dir "src/test"
+ #:tests? #f; test depends on maven-plugin-test-harness
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'generate-plugin.xml
+ (generate-plugin.xml "pom.xml"
+ "compiler"
+ "src/main/java/org/apache/maven/plugin/compiler"
+ (list
+ (list "AbstractCompilerMojo.java" "CompilerMojo.java")
+ (list "AbstractCompilerMojo.java" "TestCompilerMojo.java"))))
+ (add-after 'generate-plugin.xml 'fix-plugin.xml
+ (lambda _
+ (substitute* "build/classes/META-INF/maven/plugin.xml"
+ ;; These are defined in AbstractCompilerMojo.java, but not
+ ;; parsed correctly in the previous phase
+ (("DEFAULT_TARGET") "1.6")
+ (("DEFAULT_SOURCE") "1.6"))
+ #t))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-plugin-api" ,maven-plugin-api)
+ ("maven-artifact" ,maven-artifact)
+ ("maven-core" ,maven-core)
+ ("maven-shared-utils" ,maven-shared-utils)
+ ("maven-shared-incremental" ,maven-shared-incremental)
+ ("java-plexus-java" ,java-plexus-java)
+ ("java-plexus-compiler-api" ,java-plexus-compiler-api)
+ ("java-plexus-compiler-manager" ,java-plexus-compiler-manager)
+ ("java-plexus-compiler-javac" ,java-plexus-compiler-javac)
+ ("maven-parent-pom" ,maven-parent-pom-33)))
+ (inputs
+ `(("maven-plugin-annotations" ,maven-plugin-annotations)
+ ("java-commons-io" ,java-commons-io)))
+ (home-page "https://maven.apache.org/plugins/maven-compiler-plugin")
+ (synopsis "Compiler plugin for Maven")
+ (description "The Compiler Plugin is used to compile the sources of your
+project. Since 3.0, the default compiler is @code{javax.tools.JavaCompiler}
+(if you are using java 1.6) and is used to compile Java sources. If you want
+to force the plugin using javac, you must configure the plugin option
+@code{forceJavacCompilerUse}.
+
+Also note that at present the default source setting is 1.6 and the default
+target setting is 1.6, independently of the JDK you run Maven with. You are
+highly encouraged to change these defaults by setting source and target as
+described in Setting the -source and -target of the Java Compiler.
+
+Other compilers than javac can be used and work has already started on
+AspectJ, .NET, and C#.")
+ (license license:asl2.0)))
+
+(define-public java-surefire-logger-api
+ (package
+ (name "java-surefire-logger-api")
+ (version "3.0.0-M4")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "mirror://apache/maven/surefire/"
+ "surefire-" version "-source-release.zip"))
+ (sha256
+ (base32
+ "1s6d4pzk3bjm9l38mj9sfgbgmk145rppdj1dmqwc4d5105mr9q9w"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "java-surefire-logger-api.jar"
+ #:source-dir "surefire-logger-api/src/main/java"
+ #:tests? #f; require mockito 2
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "surefire-logger-api/pom.xml")))))
+ (propagated-inputs
+ `(("java-surefire-parent-pom" ,java-surefire-parent-pom)))
+ (native-inputs
+ `(("unzip" ,unzip)))
+ (home-page "https://maven.apache.org/surefire/surefire-logger-api")
+ (synopsis "Interfaces and Utilities related only to internal SureFire Logger API")
+ (description "This package contains interfaces and utilities that are
+internal to the SureFire Logger API. It is designed to have no dependency.")
+ (license license:asl2.0)))
+
+(define-public java-surefire-parent-pom
+ (package
+ (inherit java-surefire-logger-api)
+ (name "java-surefire-parent-pom")
+ (arguments
+ `(#:tests? #f
+ #:phases
+ (modify-phases %standard-phases
+ (delete 'configure)
+ (delete 'build)
+ (add-before 'install 'fix-pom-dependency-versions
+ (lambda _
+ (substitute* "pom.xml"
+ (("1.11") ,(package-version java-commons-compress))
+ (("1.13") ,(package-version java-commons-codec)))
+ (substitute* "pom.xml"
+ (("commonsLang3Version>.*")
+ (string-append
+ "commonsLang3Version>"
+ ,(package-version java-commons-lang3)
+ "</commonsLang3Version>\n"))
+ (("commonsCompress>.*")
+ (string-append
+ "commonsCompress>"
+ ,(package-version java-commons-compress)
+ "</commonsCompress>\n"))
+ (("commonsIoVersion>.*")
+ (string-append
+ "commonsIoVersion>"
+ ,(package-version java-commons-io)
+ "</commonsIoVersion>\n"))
+ (("0.11.0") ,(package-version maven-artifact-transfer))
+ (("1.0.3") ,(package-version java-plexus-java)))
+ #t))
+ (add-after 'install 'install-providers
+ (install-pom-file "surefire-providers/pom.xml"))
+ (replace 'install
+ (install-pom-file "pom.xml")))))
+ (propagated-inputs
+ `(("maven-parent-pom" ,maven-parent-pom-33)))))
+
+(define-public java-surefire-api
+ (package
+ (inherit java-surefire-logger-api)
+ (name "java-surefire-api")
+ (arguments
+ `(#:tests? #f
+ #:jar-name "java-surefire-api.jar"
+ #:source-dir "surefire-api/src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'copy-resources
+ (lambda _
+ (mkdir-p "build/classes")
+ (copy-recursively "surefire-api/src/main/resources" "build/classes")
+ #t))
+ (add-before 'build 'prepare-shade
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir-p "build/classes")
+ (with-directory-excursion "build/classes"
+ (for-each
+ (lambda (input)
+ (for-each
+ (lambda (jar-file)
+ (invoke "jar" "xf" jar-file)
+ (delete-file-recursively "META-INF"))
+ (find-files (assoc-ref inputs input) ".*.jar$")))
+ '("maven-shared-utils" "java-commons-codec")))
+ #t))
+ (add-after 'build 'shade
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((jarjar
+ (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$")))
+ (injar "java-surefire-api.jar")
+ (outjar "java-surefire-api-shaded.jar"))
+ (with-directory-excursion "build/jar"
+ (with-output-to-file "rules"
+ (lambda _
+ (format #t (string-append
+ "rule "
+ "org.apache.maven.shared.utils.** "
+ "org.apache.maven.surefire.shade.api."
+ "org.apache.maven.shared.utils.@1~%"))
+ (format #t (string-append
+ "rule "
+ "org.apache.commons.codec.** "
+ "org.apache.maven.surefire.shade.api."
+ "org.apache.commons.codec.@1~%"))))
+ (invoke "java" "-jar" jarjar "process" "rules" injar outjar)
+ (delete-file injar)
+ (rename-file outjar injar)))
+ #t))
+ (replace 'install
+ (install-from-pom "surefire-api/pom.xml")))))
+ (propagated-inputs
+ `(("java-surefire-logger-api" ,java-surefire-logger-api)
+ ("java-commons-codec" ,java-commons-codec)
+ ("java-surefire-parent-pom" ,java-surefire-parent-pom)
+ ("maven-shared-utils" ,maven-shared-utils-3.1)))
+ (inputs
+ `(("java-jsr305" ,java-jsr305)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-jarjar" ,java-jarjar)))
+ (synopsis "Maven SureFire API")
+ (description "This package contains the API to use Maven SureFire.")))
+
+(define-public java-surefire-booter
+ (package
+ (inherit java-surefire-logger-api)
+ (name "java-surefire-booter")
+ (arguments
+ `(#:tests? #f; require mockito 2
+ #:jar-name "java-surefire-booter.jar"
+ #:source-dir "surefire-booter/src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'fix-/bin/sh
+ (lambda _
+ (substitute* "surefire-booter/src/main/java/org/apache/maven/surefire/booter/PpidChecker.java"
+ (("/bin/sh") (which "sh")))
+ #t))
+ (replace 'install
+ (install-from-pom "surefire-booter/pom.xml")))))
+ (propagated-inputs
+ `(("java-surefire-api" ,java-surefire-api)
+ ("java-commons-lang3" ,java-commons-lang3)
+ ("java-commons-io" ,java-commons-io)
+ ("java-surefire-parent-pom" ,java-surefire-parent-pom)))
+ (inputs
+ `(("java-jsr305" ,java-jsr305)))
+ (synopsis "API and Facilities used by forked tests running in JVM sub-process")
+ (description "SureFire runs tests inside a forked JVM subprocess. This
+package contains an API and facilities used inside that forked JVM.")))
+
+(define-public java-surefire-extensions-api
+ (package
+ (inherit java-surefire-logger-api)
+ (name "java-surefire-extensions-api")
+ (arguments
+ `(#:tests? #f; requires mockito 2
+ #:jar-name "java-surefire-extensions-api.jar"
+ #:source-dir "surefire-extensions-api/src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "surefire-extensions-api/pom.xml")))))
+ (propagated-inputs
+ `(("java-surefire-api" ,java-surefire-api)
+ ("java-surefire-parent-pom" ,java-surefire-parent-pom)))
+ (inputs
+ `(("java-plexus-component-annotations" ,java-plexus-component-annotations)))
+ (synopsis "Extension API for Maven SureFire")
+ (description "Surefire is a test framework project. This is the aggregator
+POM in Apache Maven Surefire project.")))
+
+(define-public java-surefire-common-java5
+ (package
+ (inherit java-surefire-logger-api)
+ (name "java-surefire-common-java5")
+ (arguments
+ `(#:jar-name "java-surefire-common-java5.jar"
+ #:source-dir "surefire-providers/common-java5/src/main/java"
+ #:test-dir "surefire-providers/common-java5/src/test"
+ #:test-exclude (list
+ ;; Abstract class
+ "**/PojoStackTraceWriterTest.java"
+ ;; Fails
+ "**/SmartStackTraceParserTest.java")
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'prepare-shade
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir-p "build/classes")
+ (with-directory-excursion "build/classes"
+ (for-each
+ (lambda (jar-file)
+ (invoke "jar" "xf" jar-file)
+ (delete-file-recursively "META-INF"))
+ (find-files (assoc-ref inputs "maven-shared-utils") ".*.jar$")))
+ #t))
+ (add-after 'build 'shade
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((jarjar
+ (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$")))
+ (injar "java-surefire-common-java5.jar")
+ (outjar "java-surefire-common-java5-shaded.jar"))
+ (with-directory-excursion "build/jar"
+ (with-output-to-file "rules"
+ (lambda _
+ (format #t (string-append
+ "rule "
+ "org.apache.maven.shared.utils.** "
+ "org.apache.maven.surefire.shade.common."
+ "org.apache.maven.shared.utils.@1~%"))))
+ (invoke "java" "-jar" jarjar "process" "rules" injar outjar)
+ (delete-file injar)
+ (rename-file outjar injar)))
+ #t))
+ (replace 'install
+ (install-from-pom "surefire-providers/common-java5/pom.xml")))))
+ (propagated-inputs
+ `(("maven-shared-utils" ,maven-shared-utils-3.1)
+ ("java-surefire-api" ,java-surefire-api)
+ ("java-surefire-parent-pom" ,java-surefire-parent-pom)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-jarjar" ,java-jarjar)
+ ("java-junit" ,java-junit)
+ ("java-fest-assert" ,java-fest-assert)))
+ (synopsis "Common java5 facilities for Maven SureFire")
+ (description "This package contains shared Java 5 code for all providers.")))
+
+(define-public java-surefire-common-junit3
+ (package
+ (inherit java-surefire-logger-api)
+ (name "java-surefire-common-junit3")
+ (arguments
+ `(#:jar-name "java-surefire-common-junit3.jar"
+ #:source-dir "surefire-providers/common-junit3/src/main/java"
+ #:test-dir "surefire-providers/common-junit3/src/test"
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "surefire-providers/common-junit3/pom.xml")))))
+ (propagated-inputs
+ `(("java-junit" ,java-junit)
+ ("java-surefire-api" ,java-surefire-api)
+ ("java-surefire-parent-pom" ,java-surefire-parent-pom)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-junit" ,java-junit)
+ ("java-fest-assert" ,java-fest-assert)))
+ (synopsis "Shared JUnit3 provider code for Maven SureFire")
+ (description "This package contains shared code for all JUnit providers.")))
+
+(define-public java-surefire-common-junit4
+ (package
+ (inherit java-surefire-logger-api)
+ (name "java-surefire-common-junit4")
+ (arguments
+ `(#:jar-name "java-surefire-common-junit4.jar"
+ #:source-dir "surefire-providers/common-junit4/src/main/java"
+ #:tests? #f; tests require junit 4.0
+ #:phases
+ (modify-phases %standard-phases
+ (replace 'install
+ (install-from-pom "surefire-providers/common-junit4/pom.xml")))))
+ (propagated-inputs
+ `(("java-junit" ,java-junit)
+ ("java-surefire-api" ,java-surefire-api)
+ ("java-surefire-common-java5" ,java-surefire-common-java5)
+ ("java-surefire-common-junit3" ,java-surefire-common-junit3)
+ ("maven-shared-utils" ,maven-shared-utils-3.1)
+ ("java-surefire-parent-pom" ,java-surefire-parent-pom)))
+ (synopsis "Shared JUnit4 provider code for Maven SureFire")
+ (description "This package contains shared code for all JUnit providers,
+starting from JUnit 4.")))
+
+(define-public java-surefire-junit4
+ (package
+ (inherit java-surefire-logger-api)
+ (name "java-surefire-junit4")
+ (arguments
+ `(;#:tests? #f
+ #:jar-name "java-surefire-junit4.jar"
+ #:source-dir "surefire-providers/surefire-junit4/src/main/java"
+ #:test-dir "surefire-providers/surefire-junit4/src/test"
+ #:modules ((guix build ant-build-system)
+ (guix build utils)
+ (guix build java-utils)
+ (sxml simple))
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'install 'regenerate-own-pom
+ (lambda _
+ ;; Surefire struggles resolving artifacts because of this pom
+ ;; file, resulting in a NullPointerException when collecting
+ ;; Artifacts (and a "Failure detected." message from
+ ;; DefaultArtifactResolver). Replace the pom file with a much
+ ;; simpler one. Everything is shaded anyway (as used to be the
+ ;; case in 2.22), so there will not be missing dependencies.
+ (with-output-to-file "surefire-providers/surefire-junit4/pom.xml"
+ (lambda _
+ (sxml->xml
+ `((project
+ (modelVersion "4.0.0")
+ (name "Surefire JUnit4")
+ (groupId "org.apache.maven.surefire")
+ (artifactId "surefire-junit4")
+ (version ,,(package-version java-surefire-common-java5)))))))
+ #t))
+ (add-before 'build 'copy-resources
+ (lambda _
+ (mkdir-p "build/classes")
+ (copy-recursively "surefire-providers/surefire-junit4/src/main/resources"
+ "build/classes")
+ #t))
+ (add-before 'build 'prepare-shade
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir-p "build/classes")
+ (with-directory-excursion "build/classes"
+ (for-each
+ (lambda (input)
+ (for-each
+ (lambda (jar-file)
+ (invoke "jar" "xf" jar-file)
+ (delete-file-recursively "META-INF"))
+ (find-files (assoc-ref inputs input) ".*.jar$")))
+ '("maven-shared-utils" "java-surefire-common-java5"
+ "java-surefire-common-junit3" "java-surefire-common-junit4"
+ "java-surefire-api")))
+ #t))
+ (add-after 'build 'shade
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((jarjar
+ (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$")))
+ (injar "java-surefire-junit4.jar")
+ (outjar "java-surefire-junit4-shaded.jar"))
+ (with-directory-excursion "build/jar"
+ (with-output-to-file "rules"
+ (lambda _
+ (format #t (string-append
+ "rule "
+ "org.apache.maven.shared.utils.** "
+ "org.apache.maven.surefire.shade."
+ "org.apache.maven.shared.utils.@1~%"))))
+ (invoke "java" "-jar" jarjar "process" "rules" injar outjar)
+ (delete-file injar)
+ (rename-file outjar injar)))
+ #t))
+ (replace 'install
+ (install-from-pom "surefire-providers/surefire-junit4/pom.xml")))))
+ (propagated-inputs
+ `(("java-junit" ,java-junit)
+ ("java-surefire-parent-pom" ,java-surefire-parent-pom)))
+ (inputs
+ `(("java-surefire-common-junit4" ,java-surefire-common-junit4)
+ ("java-surefire-common-junit3" ,java-surefire-common-junit3)
+ ("java-surefire-common-java5" ,java-surefire-common-java5)
+ ("java-surefire-api" ,java-surefire-api)))
+ (native-inputs
+ `(("java-jarjar" ,java-jarjar)
+ ("unzip" ,unzip)
+ ("java-junit" ,java-junit)
+ ("java-hamcrest-all" ,java-hamcrest-all)
+ ("java-fest-assert" ,java-fest-assert)))
+ (synopsis "SureFire JUnit 4.0+ runner")
+ (description "This package contains the runner for tests run on a forked
+JVM, using JUnit 4.0 or later.")))
+
+(define-public maven-surefire-common
+ (package
+ (inherit java-surefire-logger-api)
+ (name "maven-surefire-common")
+ (arguments
+ `(#:tests? #f; require mockito 2
+ #:jar-name "maven-surefire-common.jar"
+ #:source-dir "maven-surefire-common/src/main/java"
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'prepare-shade
+ (lambda* (#:key inputs #:allow-other-keys)
+ (mkdir-p "build/classes")
+ (with-directory-excursion "build/classes"
+ (for-each
+ (lambda (input)
+ (for-each
+ (lambda (jar-file)
+ (invoke "jar" "xf" jar-file)
+ (delete-file-recursively "META-INF"))
+ (find-files (assoc-ref inputs input) ".*.jar$")))
+ '("maven-shared-utils" "java-commons-io" "java-commons-lang3"
+ "java-commons-compress" "maven-common-artifact-filters")))
+ #t))
+ (add-after 'build 'shade
+ (lambda* (#:key inputs #:allow-other-keys)
+ (let ((jarjar
+ (car (find-files (assoc-ref inputs "java-jarjar") ".*.jar$")))
+ (injar "maven-surefire-common.jar")
+ (outjar "maven-surefire-common-shaded.jar"))
+ (with-directory-excursion "build/jar"
+ (with-output-to-file "rules"
+ (lambda _
+ (format #t (string-append
+ "rule "
+ "org.apache.maven.shared.utils.** "
+ "org.apache.maven.surefire.shade.common."
+ "org.apache.maven.shared.utils.@1~%"))
+ (format #t (string-append
+ "rule "
+ "org.apache.commons.io.** "
+ "org.apache.maven.surefire.shade.common."
+ "org.apache.commons.io.@1~%"))
+ (format #t (string-append
+ "rule "
+ "org.apache.commons.lang3.** "
+ "org.apache.maven.surefire.shade.common."
+ "org.apache.commons.lang3.@1~%"))
+ (format #t (string-append
+ "rule "
+ "org.apache.commons.compress.** "
+ "org.apache.maven.surefire.shade.common."
+ "org.apache.commons.compress.@1~%"))))
+ (invoke "java" "-jar" jarjar "process" "rules" injar outjar)
+ (delete-file injar)
+ (rename-file outjar injar)))
+ #t))
+ (add-before 'install 'fix-pom
+ (lambda _
+ (substitute* "maven-surefire-common/pom.xml"
+ (("maven-toolchain") "maven-core"))
+ #t))
+ (replace 'install
+ (install-from-pom "maven-surefire-common/pom.xml")))))
+ (propagated-inputs
+ `(("java-surefire-api" ,java-surefire-api)
+ ("java-surefire-extensions-api" ,java-surefire-extensions-api)
+ ("java-surefire-booter" ,java-surefire-booter)
+ ("maven-core" ,maven-core)
+ ("maven-plugin-annotations" ,maven-plugin-annotations)
+ ("maven-common-artifact-filters" ,maven-common-artifact-filters)
+ ("maven-artifact-transfer" ,maven-artifact-transfer)
+ ("java-plexus-java" ,java-plexus-java)
+ ("java-jansi" ,java-jansi)
+ ("java-commons-io" ,java-commons-io)
+ ("java-commons-lang3" ,java-commons-lang3)
+ ("java-commons-compress" ,java-commons-compress)
+ ("maven-shared-utils" ,maven-shared-utils-3.1)
+ ("java-surefire-parent-pom" ,java-surefire-parent-pom)))
+ (inputs
+ `(("java-jsr305" ,java-jsr305)))
+ (native-inputs
+ `(("unzip" ,unzip)
+ ("java-jarjar" ,java-jarjar)))
+ (synopsis "API used in Surefire and Failsafe MOJO")
+ (description "This package contains an API used in SureFire and Failsafe
+MOJO.")))
+
+(define-public maven-surefire-plugin
+ (package
+ (inherit java-surefire-logger-api)
+ (name "maven-surefire-plugin")
+ (arguments
+ `(#:jar-name "maven-surefire-plugin.jar"
+ #:source-dir "maven-surefire-plugin/src/main/java"
+ #:tests? #f; test depends on maven-plugin-test-harness
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'generate-plugin.xml
+ (generate-plugin.xml "maven-surefire-plugin/pom.xml"
+ "surefire"
+ "."
+ (list
+ (list
+ "maven-surefire-common/src/main/java/org/apache/maven/plugin/surefire/AbstractSurefireMojo.java"
+ "maven-surefire-plugin/src/main/java/org/apache/maven/plugin/surefire/SurefirePlugin.java"))))
+ (replace 'install
+ (install-from-pom "maven-surefire-plugin/pom.xml")))))
+ (propagated-inputs
+ `(("maven-surefire-common" ,maven-surefire-common)
+ ("maven-core" ,maven-core)))
+ (native-inputs
+ `(("maven-plugin-annotations" ,maven-plugin-annotations)
+ ("unzip" ,unzip)))
+ (synopsis "SureFire Maven plugin that runs tests.")
+ (description "The Surefire Plugin is used during the test phase of the
+build lifecycle to execute the unit tests of an application. It generates
+reports in two different file formats, plain text and xml.")))
+
+(define-public maven-jar-plugin
+ (package
+ (name "maven-jar-plugin")
+ (version "3.2.0")
+ (source (origin
+ (method url-fetch)
+ (uri (string-append "https://github.com/apache/"
+ "maven-jar-plugin/archive/"
+ "maven-jar-plugin-" version ".tar.gz"))
+ (sha256
+ (base32
+ "032042n3kfb4g5jf6khzxywn22xfy3jpx57lkq88xsv0lwx9np96"))))
+ (build-system ant-build-system)
+ (arguments
+ `(#:jar-name "maven-jar-plugin.jar"
+ #:source-dir "src/main/java"
+ #:tests? #f; test depends on maven-plugin-test-harness
+ #:phases
+ (modify-phases %standard-phases
+ (add-before 'build 'generate-plugin.xml
+ (generate-plugin.xml "pom.xml"
+ "jar"
+ "src/main/java/org/apache/maven/plugins/jar"
+ (list
+ (list "AbstractJarMojo.java" "JarMojo.java")
+ (list "AbstractJarMojo.java" "TestJarMojo.java"))))
+ (replace 'install
+ (install-from-pom "pom.xml")))))
+ (propagated-inputs
+ `(("maven-archiver" ,maven-archiver)
+ ("maven-artifact" ,maven-3.0-artifact)
+ ("maven-core" ,maven-3.0-core)
+ ("maven-plugin-api" ,maven-3.0-plugin-api)
+ ("maven-file-management" ,maven-file-management)
+ ("maven-shared-utils" ,maven-shared-utils)
+ ("java-plexus-archiver" ,java-plexus-archiver)
+ ("java-plexus-utils" ,java-plexus-utils)))
+ (inputs
+ `(("maven-plugin-annotations" ,maven-plugin-annotations)))
+ (home-page "https://maven.apache.org/plugins/maven-jar-plugin")
+ (synopsis "Jar builder plugin for Maven")
+ (description "This plugin provides the capability to build jars. If you
+would like to sign jars please use the Maven Jarsigner Plugin instead.")
+ (license license:asl2.0)))