diff options
author | Julien Lepiller <julien@lepiller.eu> | 2020-06-27 20:19:06 +0200 |
---|---|---|
committer | Julien Lepiller <julien@lepiller.eu> | 2020-07-17 04:18:56 +0200 |
commit | f0e3e6caa3582a1994244ad0ec1f3b2efaf68703 (patch) | |
tree | 4c302ea55f6c5f97ed0511d81840e1aa5cd3330a | |
parent | ebe6e6f5d273277c59cbdea145c839d17aec6fe4 (diff) | |
download | guix-f0e3e6caa3582a1994244ad0ec1f3b2efaf68703.tar.gz |
gnu: Add maven-filtering.
* gnu/packages/maven.scm (maven-filtering): New variable. * gnu/packages/java.scm (java-sisu-build-api): Install from pom file.
-rw-r--r-- | gnu/packages/java.scm | 4 | ||||
-rw-r--r-- | gnu/packages/maven.scm | 74 |
2 files changed, 77 insertions, 1 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm index 3e778b6da9..dd7bb8cde9 100644 --- a/gnu/packages/java.scm +++ b/gnu/packages/java.scm @@ -4571,7 +4571,9 @@ which behaves as if all files were just created.</description>\n </component>\n </components>\n </component-set>\n"))) - #t))))) + #t)) + (replace 'install + (install-from-pom "pom.xml"))))) (inputs `(("java-plexus-utils" ,java-plexus-utils) ("java-plexus-container-default" ,java-plexus-container-default))) diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index de74cbc8dd..03206ea545 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -2896,3 +2896,77 @@ 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))) |