From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:38192) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRy8l-0006W1-H3 for guix-patches@gnu.org; Sun, 10 Jun 2018 07:04:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRy8k-0002ZK-5o for guix-patches@gnu.org; Sun, 10 Jun 2018 07:04:07 -0400 Received: from debbugs.gnu.org ([208.118.235.43]:33961) by eggs.gnu.org with esmtps (TLS1.0:RSA_AES_128_CBC_SHA1:16) (Exim 4.71) (envelope-from ) id 1fRy8k-0002ZG-33 for guix-patches@gnu.org; Sun, 10 Jun 2018 07:04:06 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1fRy8j-0005FJ-QV for guix-patches@gnu.org; Sun, 10 Jun 2018 07:04:05 -0400 Subject: [bug#31774] [PATCH 09/22] gnu: Add maven-core-bootstrap. Resent-Message-ID: From: Julien Lepiller Date: Sun, 10 Jun 2018 13:03:06 +0200 Message-Id: <20180610110319.24043-9-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 | 79 ++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/gnu/packages/maven.scm b/gnu/packages/maven.scm index d22883ef9..76884301d 100644 --- a/gnu/packages/maven.scm +++ b/gnu/packages/maven.scm @@ -609,3 +609,82 @@ so really just plain objects."))) ("xpp3" ,java-modello-plugins-xpp3) ;; for tests ("java-junit" ,java-junit))))) + +(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-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))))) -- 2.17.1