From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:40329) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRyHR-00081d-HR for guix-patches@gnu.org; Sun, 10 Jun 2018 07:13:06 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRyHO-0006xT-NZ for guix-patches@gnu.org; Sun, 10 Jun 2018 07:13:05 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33984) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRyHO-0006xN-JC for guix-patches@gnu.org; Sun, 10 Jun 2018 07:13:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fRyHO-0005T1-Dn for guix-patches@gnu.org; Sun, 10 Jun 2018 07:13:02 -0400 Subject: [bug#31774] [PATCH 21/22] gnu: Add maven-compat. Resent-Message-ID: From: Julien Lepiller Date: Sun, 10 Jun 2018 13:03:18 +0200 Message-Id: <20180610110319.24043-21-julien@lepiller.eu> In-Reply-To: <20180610110319.24043-1-julien@lepiller.eu> References: <20180610130104.2b154715@lepiller.eu> <20180610110319.24043-1-julien@lepiller.eu> List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+kyle=kyleam.com@gnu.org Sender: "Guix-patches" To: 31774@debbugs.gnu.org * gnu/packages/maven.scm (maven-compat): New variable. --- gnu/packages/maven.scm | 114 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 114 insertions(+) diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index 5b9d6984f..7f089687c 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -1245,3 +1245,117 @@ artifactId=maven-core" ,(package-version maven-core-bootstrap)))) ("java-objenesis" ,java-objenesis) ("java-mockito-1" ,java-mockito-1) ("java-hamcrest-core" ,java-hamcrest-core))))) + +(define-public maven-compat + (package + (inherit maven-artifact) + (name "maven-compat") + (arguments + `(#:jar-name "maven-compat.jar" + #:source-dir "src/main/java" + #:jdk ,icedtea-8 + #:test-dir "src/test" + #:phases + (modify-phases %standard-phases + ;; Tests assume we're in this directory + (add-before 'configure 'chdir + (lambda _ + (chdir "maven-compat") + #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/profiles.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")) + (let ((file "src/main/mdo/paramdoc.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-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-before 'check 'build-tests + (lambda _ + (invoke "ant" "compile-tests") + #t)) + (add-after 'build-tests 'generate-test-metadata + (lambda _ + (invoke "java" "-cp" (string-append (getenv "CLASSPATH") + ":build/classes" + ":build/test-classes") + "org.codehaus.plexus.metadata.PlexusMetadataGeneratorCli" + "--source" "src/test/java" + "--output" "build/test-classes/META-INF/plexus/components.xml" + "--classes" "build/test-classes" + "--descriptors" "build/test-classes/META-INF") + #t)) + (add-after 'generate-metadata 'rebuild + (lambda _ + (invoke "ant" "jar") + #t))))) + (inputs + `(("maven-artifact" ,maven-artifact) + ("maven-repository-metadata" ,maven-repository-metadata) + ("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-core" ,maven-core) + ("maven-wagon-provider-api" ,maven-wagon-provider-api) + ("maven-wagon-file" ,maven-wagon-file) + ("maven-resolver-api" ,maven-resolver-api) + ("maven-resolver-util" ,maven-resolver-util) + ("maven-resolver-spi" ,maven-resolver-spi) + ("java-plexus-interpolation" ,java-plexus-interpolation))) + (native-inputs + `(("java-modello-core" ,java-modello-core) + ("java-plexus-utils" ,java-plexus-utils) + ("java-plexus-component-annotations" ,java-plexus-component-annotations) + ("java-plexus-classworlds" ,java-plexus-classworlds) + ("java-geronimo-xbean-reflect" ,java-geronimo-xbean-reflect) + ("java-sisu-build-api" ,java-sisu-build-api) + ("java-eclipse-sisu-plexus" ,java-eclipse-sisu-plexus) + ("java-exclispe-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) + ("java-modello-plugins-java" ,java-modello-plugins-java) + ("java-modello-plugins-xml" ,java-modello-plugins-xml) + ("java-modello-plugins-xpp3" ,java-modello-plugins-xpp3) + ;; metadata + ("java-plexus-component-metadata" ,java-plexus-component-metadata) + ("java-commons-cli" ,java-commons-cli) + ("java-plexus-cli" ,java-plexus-cli) + ("java-jdom2" ,java-jdom2) + ("maven-plugin-api" ,maven-plugin-api) + ("java-qdox" ,java-qdox) + ;; tests + ("java-plexus-cipher" ,java-plexus-cipher) + ("java-plexus-sec-dispatcher" ,java-plexus-sec-dispatcher) + ("java-jsr250", java-jsr250) + ("java-cdi-api" ,java-cdi-api) + ("java-junit" ,java-junit) + ("maven-resolver-impl" ,maven-resolver-impl) + ("maven-resolver-connector-basic" ,maven-resolver-connector-basic) + ("maven-resolver-transport-wagon" ,maven-resolver-transport-wagon) + ("java-commons-lang3" ,java-commons-lang3) + ("java-aop" ,java-aopalliance) + ("maven-resolver-provider" ,maven-resolver-provider) + ("java-slf4j-api" ,java-slf4j-api) + ("java-slf4j-simple" ,java-slf4j-simple) + ,@(package-inputs java-slf4j-api))))) -- 2.17.1