Name: picocli Version: 4.6.3 Release: 4%{?dist} Summary: Java command line parser with both an annotations API and a programmatic API License: ASL 2.0 URL: https://github.com/remkop/picocli BuildArch: noarch ExclusiveArch: %{java_arches} noarch Source0: %{url}/archive/v%{version}/%{name}-%{version}.tar.gz Source1: https://repo1.maven.org/maven2/info/picocli/%{name}/%{version}/%{name}-%{version}.pom Source2: https://repo1.maven.org/maven2/info/picocli/%{name}-codegen/%{version}/%{name}-codegen-%{version}.pom Source3: https://repo1.maven.org/maven2/info/picocli/%{name}-shell-jline2/%{version}/%{name}-shell-jline2-%{version}.pom Source4: https://repo1.maven.org/maven2/info/picocli/%{name}-shell-jline3/%{version}/%{name}-shell-jline3-%{version}.pom BuildRequires: maven-local BuildRequires: mvn(jline:jline) BuildRequires: mvn(org.codehaus.mojo:build-helper-maven-plugin) BuildRequires: mvn(org.jline:jline-builtins) BuildRequires: mvn(org.jline:jline-console) BuildRequires: mvn(org.jline:jline-reader) BuildRequires: mvn(org.jline:jline-terminal-jansi) %description Picocli is a modern library and framework, written in Java, that contains both an annotations API and a programmatic API. It features usage help with ANSI colors and styles, TAB auto-completion and nested sub-commands. In a single file, so you can include it in source form. This lets users run picocli-based applications without requiring picocli as an external dependency. %package -n %{name}-codegen Summary: Tools to generate documentation, configuration, source code from a picocli model %description -n %{name}-codegen The picocli-codegen (Picocli Code Generation) module contains tools for generating configuration files and documentation for picocli-based applications. This module also includes an annotation processor that can build a model from the picocli annotations at compile time rather than at runtime. The annotation processor allows many of the tools to be invoked automatically as part of the build without configuration. If a tool does not have an annotation processor wrapper (yet), it can be invoked on the command line, and can be scripted to be invoked automatically as part of building your project. %package -n %{name}-shell-jline2 Summary: Easily build interactive shell applications with JLine 2 and picocli %description -n %{name}-shell-jline2 Picocli Shell JLine2 contains components and documentation for building interactive shell command line applications with JLine 2 and picocli. JLine and picocli complement each other very well and have little or none functional overlap. JLine provides interactive shell functionality but has no built-in command line parsing functionality. What it does provide is a tokenizer for splitting a single command line String into an array of command line argument Strings. Given an array of Strings, picocli can execute a command or subcommand. Combining these two libraries makes it easy to build powerful interactive shell applications. %package -n %{name}-shell-jline3 Summary: Easily build interactive shell applications with JLine 3 and picocli %description -n %{name}-shell-jline3 Picocli Shell JLine3 contains components and documentation for building interactive shell command line applications with JLine 3 and picocli. JLine and picocli complement each other very well and have little or none functional overlap. JLine provides interactive shell functionality but has no built-in command line parsing functionality. What it does provide is a tokenizer for splitting a single command line String into an array of command line argument Strings. Given an array of Strings, picocli can execute a command or subcommand. Combining these two libraries makes it easy to build powerful interactive shell applications. %prep %autosetup # note: # picocli is a gradle project, we need to transform it to maven. # here, we create a parent pom according to maven project aggregation. (see # https://maven.apache.org/guides/introduction/introduction-to-the-pom.html#project-aggregation) find -type f '(' -iname '*.jar' -o -iname '*.class' ')' -print -delete # create directory for picocli mkdir %{name} # move picocli source code mv src/ %{name} cp -p %{SOURCE1} %{name}/pom.xml cp -p %{SOURCE2} %{name}-codegen/pom.xml cp -p %{SOURCE3} %{name}-shell-jline2/pom.xml cp -p %{SOURCE4} %{name}-shell-jline3/pom.xml # create parent from the simplest pom cp -p %{SOURCE1} pom.xml # set parent artifact id %pom_xpath_set pom:artifactId %{name}-parent # set parent name (optional: useful for debugging) %pom_xpath_set pom:name %{name}-parent # set parent packaging %pom_xpath_inject pom:project 'pom' # add modules %pom_xpath_inject pom:project ' %{name} %{name}-tests %{name}-codegen %{name}-shell-jline2 %{name}-shell-jline3 ' # picocli: set the name to picocli %pom_xpath_set pom:name %{name} %{name} # picocli-shell-jline3: fedora has a split jline3, so split up the dependency %pom_remove_dep org.jline:jline %{name}-shell-jline3 %pom_add_dep org.jline:jline-builtins %{name}-shell-jline3 %pom_add_dep org.jline:jline-console %{name}-shell-jline3 %pom_add_dep org.jline:jline-reader %{name}-shell-jline3 %pom_add_dep org.jline:jline-terminal-jansi %{name}-shell-jline3 %pom_add_plugin org.codehaus.mojo:build-helper-maven-plugin:3.2.0 %{name} ' add-source generate-sources add-source src/main/java9 ' # set up compiler plugin %pom_add_plugin :maven-compiler-plugin:3.8.1 %{name} ' 9 base-compile compile 8 module-info.java ' # picocli-codegen: don't perform annotation processing %pom_add_plugin :maven-compiler-plugin:3.8.1 %{name}-codegen ' none ' # set up jar plugin %pom_add_plugin :maven-jar-plugin:3.2.0 %{name} ' picocli ${project.version} Remko Popma picocli ${project.version} Remko Popma picocli.AutoComplete true ' %pom_add_plugin :maven-jar-plugin:3.2.0 %{name}-codegen ' Picocli Code Generation ${project.version} Remko Popma Picocli Code Generation ${project.version} Remko Popma info.picocli.codegen ' %pom_add_plugin :maven-jar-plugin:3.2.0 %{name}-shell-jline2 ' Picocli Shell JLine2 ${project.version} Remko Popma Picocli Shell JLine2 ${project.version} Remko Popma info.picocli.shell.jline2 ' %pom_add_plugin :maven-jar-plugin:3.2.0 %{name}-shell-jline3 ' Picocli Shell JLine3 ${project.version} Remko Popma Picocli Shell JLine3 ${project.version} Remko Popma info.picocli.shell.jline3 ' # Test modules (for code that atleast shown at picocli's README) mkdir -p %{name}-tests/src/main/java/picocli mv %{name}/src/test/java/picocli/{Demo.java,CustomLayoutDemo.java,Size.java,WindowsJansiDemo.java} %{name}-tests/src/main/java/picocli cp -p %{SOURCE1} %{name}-tests/pom.xml %pom_xpath_set pom:artifactId %{name}-tests %{name}-tests %pom_xpath_set pom:name %{name}-tests %{name}-tests %pom_add_dep info.picocli:picocli:%{version}:compile %{name}-tests %pom_add_dep org.fusesource.jansi:jansi %{name}-tests # don't install parent pom %mvn_package :%{name}-parent __noinstall %build %mvn_build -s -f -j -- -Dmaven.compiler.source=1.8 -Dmaven.compiler.target=1.8 %install %mvn_install %files -n %{name} -f .mfiles-%{name} %{_datadir}/maven-metadata/picocli-picocli-tests.xml %{_javadir}/picocli/picocli-tests.jar %{_mavenpomdir}/picocli/picocli-tests.pom %license LICENSE %doc README.md RELEASE-NOTES.md %files -n %{name}-codegen -f .mfiles-%{name}-codegen %license LICENSE %doc %{name}-codegen/README.adoc %files -n %{name}-shell-jline2 -f .mfiles-%{name}-shell-jline2 %license LICENSE %doc %{name}-shell-jline2/README.md %files -n %{name}-shell-jline3 -f .mfiles-%{name}-shell-jline3 %license LICENSE %doc %{name}-shell-jline3/README.md %changelog * Fri Jan 20 2023 Fedora Release Engineering - 4.6.3-4 - Rebuilt for https://fedoraproject.org/wiki/Fedora_38_Mass_Rebuild * Fri Jul 22 2022 Fedora Release Engineering - 4.6.3-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_37_Mass_Rebuild * Fri Jul 08 2022 Jiri Vanek - 4.6.3-2 - Rebuilt for Drop i686 JDKs * Wed Feb 09 2022 Didik Supriadi - 4.6.3-1 - Update to 4.6.3 (#2052464) - Introduce new BR: jline-reader and jline-builtins * Sat Feb 05 2022 Jiri Vanek - 4.6.2-4 - Rebuilt for java-17-openjdk as system jdk * Fri Jan 21 2022 Fedora Release Engineering - 4.6.2-3 - Rebuilt for https://fedoraproject.org/wiki/Fedora_36_Mass_Rebuild * Tue Nov 16 2021 Didik Supriadi - 4.6.2-2 - Enable picocli-tests * Sun Nov 07 2021 Didik Supriadi - 4.6.2-1 - New upstream release 4.6.2 - Remove javadoc package * Mon Oct 04 2021 Didik Supriadi - 4.6.1-17 - Remove BR bnd-maven-plugin - Remove rpmautospec * Sun Sep 12 2021 Didik Supriadi - 4.6.1-16 - Add metadata manifest for all modules * Fri Sep 03 2021 Didik Supriadi - 4.6.1-15 - Don't perform annotation processing * Tue Aug 31 2021 Didik Supriadi - 4.6.1-14 - Enable osgi bundle * Tue Aug 31 2021 Didik Supriadi - 4.6.1-13 - Use javadoc_package macro * Sat Aug 07 2021 Didik Supriadi - 4.6.1-12 - Define doc in spec * Sat Aug 07 2021 Didik Supriadi - 4.6.1-11 - Use -f option to skip tests * Tue Jul 27 2021 Fedora Release Engineering - 4.6.1-5 - Second attempt - Rebuilt for https://fedoraproject.org/wiki/Fedora_35_Mass_Rebuild * Fri Jul 16 2021 Jerry James - 4.6.1-4 - Add picocli-shell-jline3 * Fri Jul 16 2021 Didik Supriadi - 4.6.1-3 - Add picocli-shell-jline2 * Wed Jul 14 2021 Didik Supriadi - 4.6.1-2 - Add picocli-parent and picocli-codegen * Tue Jul 06 2021 Didik Supriadi - 4.6.1-1 - First picocli package