;;; GNU Guix --- Functional package management for GNU ;;; Copyright © 2019 Pierre Langlois ;;; Copyright © 2020 Tobias Geerinckx-Rice ;;; Copyright © 2020 Tanguy Le Carrour ;;; Copyright © 2022 Guillaume Le Vaillant ;;; ;;; This file is part of GNU Guix. ;;; ;;; GNU Guix is free software; you can redistribute it and/or modify it ;;; under the terms of the GNU General Public License as published by ;;; the Free Software Foundation; either version 3 of the License, or (at ;;; your option) any later version. ;;; ;;; GNU Guix is distributed in the hope that it will be useful, but ;;; WITHOUT ANY WARRANTY; without even the implied warranty of ;;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the ;;; GNU General Public License for more details. ;;; ;;; You should have received a copy of the GNU General Public License ;;; along with GNU Guix. If not, see . (define-module (gnu packages wireservice) #:use-module ((guix licenses) #:prefix license:) #:use-m
aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--gnu/packages/java.scm188
-rw-r--r--gnu/packages/maven.scm22
2 files changed, 191 insertions, 19 deletions
diff --git a/gnu/packages/java.scm b/gnu/packages/java.scm
index 0686a46571..7d01a81e47 100644
--- a/gnu/packages/java.scm
+++ b/gnu/packages/java.scm
@@ -4094,7 +4094,7 @@ components.")
(define java-plexus-container-default-bootstrap
(package
(name "java-plexus-container-default-bootstrap")
- (version "1.7.1")
+ (version "2.1.0")
(source (origin
(method git-fetch)
(uri (git-reference
@@ -4103,7 +4103,7 @@ components.")
(file-name (git-file-name name version))
(sha256
(base32
- "1316hrp5vqfv0aw7miq2fp0wwy833h66h502h29vnh5sxj27x228"))))
+ "0r9yq67c1hvi1pz5wmx6x6hk5fmavp8a7yal3j5hkaad757firn1"))))
(build-system ant-build-system)
(arguments
`(#:jar-name "container-default.jar"
@@ -4350,7 +4350,82 @@ from source tags and class annotations.")))
(lambda _
(copy-recursively "src/main/resources"
"build/classes/")
- #t)))))
+ #t))
+ (add-before 'build 'reinstate-cli
+ ;; The CLI was removed in 2.1.0, but we still need it to build some
+ ;; maven dependencies, and some parts of maven itself. We can't use
+ ;; the maven plugin for that yet.
+ (lambda _
+ (with-output-to-file "src/main/java/org/codehaus/plexus/metadata/PlexusMetadataGeneratorCli.java"
+ (lambda _
+ ;; Copied from a previous version of this package.
+ (display "package org.codehaus.plexus.metadata;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.Collections;
+
+import org.apache.commons.cli.CommandLine;
+import org.apache.commons.cli.OptionBuilder;
+import org.apache.commons.cli.Options;
+import org.codehaus.plexus.PlexusContainer;
+import org.codehaus.plexus.tools.cli.AbstractCli;
+
+public class PlexusMetadataGeneratorCli
+ extends AbstractCli
+{
+ public static final char SOURCE_DIRECTORY = 's';
+ public static final char SOURCE_ENCODING = 'e';
+ public static final char CLASSES_DIRECTORY = 'c';
+ public static final char OUTPUT_FILE = 'o';
+ public static final char DESCRIPTORS_DIRECTORY = 'm';
+
+ public static void main( String[] args )
+ throws Exception
+ {
+ new PlexusMetadataGeneratorCli().execute( args );
+ }
+
+ @Override
+ public String getPomPropertiesPath()
+ {
+ return \"META-INF/maven/org.codehaus.plexus/plexus-metadata-generator/pom.properties\";
+ }
+
+ @Override
+ @SuppressWarnings(\"static-access\")
+ public Options buildCliOptions( Options options )
+ {
+ options.addOption( OptionBuilder.withLongOpt( \"source\" ).hasArg().withDescription( \"Source directory.\" ).create( SOURCE_DIRECTORY ) );
+ options.addOption( OptionBuilder.withLongOpt( \"encoding\" ).hasArg().withDescription( \"Source file encoding.\" ).create( SOURCE_ENCODING ) );
+ options.addOption( OptionBuilder.withLongOpt( \"classes\" ).hasArg().withDescription( \"Classes directory.\" ).create( CLASSES_DIRECTORY ) );
+ options.addOption( OptionBuilder.withLongOpt( \"output\" ).hasArg().withDescription( \"Output directory.\" ).create( OUTPUT_FILE ) );
+ options.addOption( OptionBuilder.withLongOpt( \"descriptors\" ).hasArg().withDescription( \"Descriptors directory.\" ).create( DESCRIPTORS_DIRECTORY ) );
+ return options;
+ }
+
+ public void invokePlexusComponent( CommandLine cli, PlexusContainer plexus )
+ throws Exception
+ {
+ MetadataGenerator metadataGenerator = plexus.lookup( MetadataGenerator.class );
+
+ MetadataGenerationRequest request = new MetadataGenerationRequest();