forked from pool/beust-jcommander
This commit is contained in:
commit
b9f10025b9
23
.gitattributes
vendored
Normal file
23
.gitattributes
vendored
Normal file
@ -0,0 +1,23 @@
|
||||
## Default LFS
|
||||
*.7z filter=lfs diff=lfs merge=lfs -text
|
||||
*.bsp filter=lfs diff=lfs merge=lfs -text
|
||||
*.bz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.gem filter=lfs diff=lfs merge=lfs -text
|
||||
*.gz filter=lfs diff=lfs merge=lfs -text
|
||||
*.jar filter=lfs diff=lfs merge=lfs -text
|
||||
*.lz filter=lfs diff=lfs merge=lfs -text
|
||||
*.lzma filter=lfs diff=lfs merge=lfs -text
|
||||
*.obscpio filter=lfs diff=lfs merge=lfs -text
|
||||
*.oxt filter=lfs diff=lfs merge=lfs -text
|
||||
*.pdf filter=lfs diff=lfs merge=lfs -text
|
||||
*.png filter=lfs diff=lfs merge=lfs -text
|
||||
*.rpm filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz filter=lfs diff=lfs merge=lfs -text
|
||||
*.tbz2 filter=lfs diff=lfs merge=lfs -text
|
||||
*.tgz filter=lfs diff=lfs merge=lfs -text
|
||||
*.ttf filter=lfs diff=lfs merge=lfs -text
|
||||
*.txz filter=lfs diff=lfs merge=lfs -text
|
||||
*.whl filter=lfs diff=lfs merge=lfs -text
|
||||
*.xz filter=lfs diff=lfs merge=lfs -text
|
||||
*.zip filter=lfs diff=lfs merge=lfs -text
|
||||
*.zst filter=lfs diff=lfs merge=lfs -text
|
1
.gitignore
vendored
Normal file
1
.gitignore
vendored
Normal file
@ -0,0 +1 @@
|
||||
.osc
|
61
0001-ParseValues-NullPointerException-patch.patch
Normal file
61
0001-ParseValues-NullPointerException-patch.patch
Normal file
@ -0,0 +1,61 @@
|
||||
From 4409f9ac0d8d1f64cfd00e91b91cf822d328d526 Mon Sep 17 00:00:00 2001
|
||||
From: Roman Vais <rvais@redhat.com>
|
||||
Date: Tue, 13 Jun 2017 13:24:24 +0200
|
||||
Subject: [PATCH] ParseValues-NullPointerException-patch
|
||||
|
||||
---
|
||||
.../com/beust/jcommander/Parameterized.java | 27 +++++++++++++++++--
|
||||
1 file changed, 25 insertions(+), 2 deletions(-)
|
||||
|
||||
diff --git a/src/main/java/com/beust/jcommander/Parameterized.java b/src/main/java/com/beust/jcommander/Parameterized.java
|
||||
index ba92301..eb24ce7 100644
|
||||
--- a/src/main/java/com/beust/jcommander/Parameterized.java
|
||||
+++ b/src/main/java/com/beust/jcommander/Parameterized.java
|
||||
@@ -6,6 +6,8 @@ import com.beust.jcommander.internal.Sets;
|
||||
import java.lang.annotation.Annotation;
|
||||
import java.lang.reflect.*;
|
||||
import java.util.*;
|
||||
+import java.util.logging.Level;
|
||||
+import java.util.logging.Logger;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
/**
|
||||
@@ -208,12 +210,33 @@ public class Parameterized {
|
||||
String fieldName = Character.toLowerCase(name.charAt(3)) + name.substring(4);
|
||||
Object result = null;
|
||||
try {
|
||||
- Field field = method.getDeclaringClass().getDeclaredField(fieldName);
|
||||
+ Field field = object.getClass().getDeclaredField(fieldName);
|
||||
if (field != null) {
|
||||
setFieldAccessible(field);
|
||||
result = field.get(object);
|
||||
}
|
||||
- } catch(NoSuchFieldException | IllegalAccessException ex) {
|
||||
+ } catch(NoSuchFieldException ex) {
|
||||
+ Class<?> clazz = object.getClass();
|
||||
+ Field found = null;
|
||||
+ while (clazz != null && method.getDeclaringClass().isAssignableFrom(clazz)) {
|
||||
+ try {
|
||||
+ found = clazz.getDeclaredField(fieldName);
|
||||
+ } catch (NoSuchFieldException nfex) {
|
||||
+ // ignore
|
||||
+ }
|
||||
+ if (found != null) break;
|
||||
+ clazz = clazz.getSuperclass();
|
||||
+ }
|
||||
+ if (found != null) {
|
||||
+ setFieldAccessible(found);
|
||||
+ try {
|
||||
+ result = found.get(object);
|
||||
+ } catch (IllegalAccessException iex) {
|
||||
+ // ignore
|
||||
+ }
|
||||
+ }
|
||||
+
|
||||
+ } catch(IllegalAccessException ex) {
|
||||
// ignore
|
||||
}
|
||||
return result;
|
||||
--
|
||||
2.46.0
|
||||
|
19
_service
Normal file
19
_service
Normal file
@ -0,0 +1,19 @@
|
||||
<services>
|
||||
<service name="tar_scm" mode="disabled">
|
||||
<param name="scm">git</param>
|
||||
<param name="url">https://github.com/cbeust/jcommander.git</param>
|
||||
<param name="revision">1.85</param>
|
||||
<param name="versionformat">@PARENT_TAG@</param>
|
||||
<param name="exclude">**.jar</param>
|
||||
<param name="exclude">**.class</param>
|
||||
<param name="exclude">gradle*</param>
|
||||
<param name="exclude">cobalt*</param>
|
||||
<param name="exclude">lib</param>
|
||||
<param name="exclude">.git</param>
|
||||
</service>
|
||||
<service name="recompress" mode="disabled">
|
||||
<param name="file">*.tar</param>
|
||||
<param name="compression">xz</param>
|
||||
</service>
|
||||
<service name="set_version" mode="disabled"/>
|
||||
</services>
|
136
beust-jcommander-build.xml
Normal file
136
beust-jcommander-build.xml
Normal file
@ -0,0 +1,136 @@
|
||||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<project name="jcommander-from-maven" default="package" basedir=".">
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Build environment properties -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<property file="build.properties"/>
|
||||
|
||||
<property name="project.groupId" value="com.beust"/>
|
||||
<property name="project.artifactId" value="jcommander"/>
|
||||
<property name="project.name" value="JCommander"/>
|
||||
<property name="project.version" value="@VERSION@"/>
|
||||
<property name="project.description" value="A Java framework to parse command line options with annotations."/>
|
||||
<property name="project.build.sourceEncoding" value="UTF-8"/>
|
||||
|
||||
<property name="bundle.version" value="${project.version}.0"/>
|
||||
|
||||
<property name="build.finalName" value="${project.artifactId}-${project.version}"/>
|
||||
<property name="build.dir" value="target"/>
|
||||
<property name="build.outputDir" value="${build.dir}/classes"/>
|
||||
<property name="build.srcDir" value="src/main/java"/>
|
||||
<property name="build.resourceDir" value="src/main/resources"/>
|
||||
|
||||
<property name="compiler.release" value="8"/>
|
||||
<property name="compiler.source" value="1.${compiler.release}"/>
|
||||
<property name="compiler.target" value="${compiler.source}"/>
|
||||
|
||||
<property name="reporting.outputDirectory" value="${build.dir}/site"/>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Cleaning up target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="clean" description="Clean the output directory">
|
||||
<delete dir="${build.dir}"/>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Compilation target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="compile" description="Compile the code">
|
||||
<mkdir dir="${build.outputDir}"/>
|
||||
<javac destdir="${build.outputDir}"
|
||||
encoding="${project.build.sourceEncoding}"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
release="${compiler.release}"
|
||||
verbose="false"
|
||||
fork="false">
|
||||
<src>
|
||||
<pathelement location="${build.srcDir}"/>
|
||||
</src>
|
||||
</javac>
|
||||
<javac destdir="${build.outputDir}"
|
||||
encoding="${project.build.sourceEncoding}"
|
||||
nowarn="false"
|
||||
debug="true"
|
||||
optimize="false"
|
||||
deprecation="true"
|
||||
release="9"
|
||||
verbose="false"
|
||||
fork="false">
|
||||
<modulepath>
|
||||
<pathelement location="${build.outputDir}"/>
|
||||
</modulepath>
|
||||
<src>
|
||||
<pathelement location="."/>
|
||||
</src>
|
||||
<include name="**/module-info.java"/>
|
||||
</javac>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Javadoc target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="javadoc" description="Generates the Javadoc of the application">
|
||||
<javadoc sourcepath="${build.srcDir}"
|
||||
packagenames="*"
|
||||
destdir="${reporting.outputDirectory}/apidocs"
|
||||
access="protected"
|
||||
encoding="${project.build.sourceEncoding}"
|
||||
source="${compiler.source}"
|
||||
verbose="false"
|
||||
version="true"
|
||||
use="true"
|
||||
author="true"
|
||||
splitindex="false"
|
||||
nodeprecated="false"
|
||||
nodeprecatedlist="false"
|
||||
notree="false"
|
||||
noindex="false"
|
||||
nohelp="false"
|
||||
nonavbar="false"
|
||||
serialwarn="false"
|
||||
linksource="false"
|
||||
breakiterator="false"/>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- Package target -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="package" depends="compile" description="Package the application">
|
||||
<jar jarfile="${build.dir}/${build.finalName}.jar"
|
||||
compress="true"
|
||||
index="false"
|
||||
basedir="${build.outputDir}"
|
||||
excludes="**/package.html">
|
||||
<manifest>
|
||||
<attribute name="Bundle-Name" value="${project.name}"/>
|
||||
<attribute name="Bundle-SymbolicName" value="${project.groupId}.${project.artifactId}"/>
|
||||
<attribute name="Bundle-Description" value="${project.description}"/>
|
||||
<attribute name="Bundle-Version" value="${bundle.version}"/>
|
||||
<attribute name="JavaPackages-ArtifactId" value="${project.artifactId}"/>
|
||||
<attribute name="JavaPackages-GroupId" value="${project.groupId}"/>
|
||||
<attribute name="JavaPackages-Version" value="${project.version}"/>
|
||||
<attribute name="Export-Package" value="com.beust.jcommander;uses:="com.beust.jcommander.converters,com.beust.jcommander.validators";version="${bundle.version}",com.beust.jcommander.converters;uses:="com.beust.jcommander";version="${bundle.version}",com.beust.jcommander.defaultprovider;uses:="com.beust.jcommander";version="${bundle.version}",com.beust.jcommander.validators;uses:="com.beust.jcommander";version="${bundle.version}""/>
|
||||
<attribute name="Import-Package" value="com.beust.jcommander.validators"/>
|
||||
<attribute name="Require-Capability" value="osgi.ee;filter:="(&(osgi.ee=JavaSE)(version=${compiler.target}))""/>
|
||||
</manifest>
|
||||
</jar>
|
||||
</target>
|
||||
|
||||
<!-- ====================================================================== -->
|
||||
<!-- A dummy target for the package named after the type it creates -->
|
||||
<!-- ====================================================================== -->
|
||||
|
||||
<target name="jar" depends="package" description="Builds the jar for the application"/>
|
||||
|
||||
</project>
|
178
beust-jcommander.changes
Normal file
178
beust-jcommander.changes
Normal file
@ -0,0 +1,178 @@
|
||||
-------------------------------------------------------------------
|
||||
Thu Sep 5 17:12:06 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Update to version 1.85
|
||||
* Changes of 1.84
|
||||
+ Changed the method processing to only ignore bridge and
|
||||
synthetic methods which are not duplicate of other normal
|
||||
methods.
|
||||
+ Renamed BuilderExample to BridgeMethodsExample.
|
||||
+ Exclude methods which are bridge or synthetic when parsing
|
||||
+ Added public IMainParameter interface to fix
|
||||
cbeust/jcommander#559
|
||||
+ Fixed: A default fulfils requirement, but does not count as
|
||||
assignment.
|
||||
+ Expand dynamic arg expands non dynamic args
|
||||
+ Order parameters with the same order by name in usage()
|
||||
+ Asserting that double quotes are not removed.
|
||||
+ Replace arrayOf with array literals in Kotlin sample
|
||||
+ Keep original exception thrown by the parameter setter method
|
||||
+ Fixes #557: Now validates BEFORE conversion
|
||||
+ Fixed: Broken link to TestNG example
|
||||
+ Allow acceptUnknownOption with variableArity
|
||||
+ Fixed: Default value of primitive type must not satisfy
|
||||
required = true
|
||||
+ Simplified code: No need for public class
|
||||
+ No ParameterException if a default value assigned for
|
||||
required params
|
||||
+ Fixed documentation: Contributor fixed inidex.html instead of
|
||||
index.adoc
|
||||
+ Example for @Parameter on setter method
|
||||
+ Fixed docs formatting
|
||||
+ Mentioning Charset converter in docs
|
||||
+ Improved ByteOrderConverterTest: Removing unused Exception
|
||||
+ Adds a CharsetConverter.
|
||||
+ Mentioning ByteOrder converter in docs
|
||||
+ Improved ByteOrderConverterTest: Proofs that parameter may be
|
||||
in mixed case
|
||||
+ Adds a ByteOrderConverter.
|
||||
+ Improved VariableArityTest: Proofs that unknown options are
|
||||
safely passed through
|
||||
+ Test for dontShowNullForMissingCommandDescription
|
||||
+ Fix usage() for missing description on commands
|
||||
+ Moved description of defaultValueDescription to usage chapter
|
||||
+ Fixed backwards compatiblity fail:
|
||||
ParameterDescription.getDefault() must not produce different
|
||||
result as existing code relies on current behavior
|
||||
+ Fixed test fail: NullPointerException in ParameterDescription
|
||||
+ Fixed #471 @Param(default = )
|
||||
+ Clarification: List and Set can be comma-separated
|
||||
+ Modify convertValue() to fix issue 509 and add a test
|
||||
+ Performance: String.isEmpty() is faster than .equals()
|
||||
+ Return an empty list when parsing an empty string
|
||||
+ Using secret GPG_PASSPHRASE for improved security
|
||||
+ Fixed: Deprecation Warning about new Integer(int)
|
||||
+ Ignore default value for required parameter
|
||||
* Changes of 1.85
|
||||
+ Fixed: Compilation fails due to Java 11 API used on Java 8
|
||||
target
|
||||
+ Cleanup configFile after enabledAtSignExpansionTest
|
||||
+ Simplified AtSignExpansion code
|
||||
+ Improved testing of AtSignExpansion
|
||||
+ Fix: enable parameter values to start with @
|
||||
+ Simplified Strings::startsWith
|
||||
+ Simplified Strings::join(String, List<Object>)
|
||||
+ Simplified Strings::join(String, List<String>)
|
||||
- Modified patch:
|
||||
* 0001-ParseValues-NullPointerException-patch.patch
|
||||
+ rebase
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon May 20 16:56:11 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Update to version 1.83
|
||||
* Fixes:
|
||||
+ Fixed Docs Timestamp
|
||||
+ Fixed: #563 - JCommander does not recognize command by alias.
|
||||
+ fixed: missing null check
|
||||
+ renamed IRule to IParametersValidator
|
||||
+ `@Parameters(rules = <? extends IRule>)`
|
||||
+ Unit Test for #532
|
||||
+ Fixed #532: @-syntax not working with command objects
|
||||
+ enable testng tests
|
||||
+ Fix regression with removed usage methods
|
||||
+ Add OSGi entries in MANIFEST.MF during jar creation
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Feb 21 08:20:16 UTC 2024 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Use %patch -P N instead of deprecated %patchN.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed May 3 09:07:55 UTC 2023 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Update to version 1.82
|
||||
* Fixes:
|
||||
+ #392: fixed bug when parsing arguments is ignoring case
|
||||
sensitivity option
|
||||
+ Add a test for Parameter order usage
|
||||
+ add a test for Path converter
|
||||
+ Add automatic module name to manifest
|
||||
+ Add check if Boolean parameter is default null, then do not
|
||||
flip value
|
||||
+ Added testing modules
|
||||
+ Add format tests for DefaultUsageFormatter,
|
||||
UnixStyleUsageFormatter
|
||||
+ add Path converter change #414 to changelog
|
||||
+ Add test case for issue 367
|
||||
+ Add testing for UnixStyleUsageFormatter
|
||||
+ Add unix-style formatter, allow DefaultUsageFormatter to be
|
||||
extended easier
|
||||
+ Allow generics of type <? extends X> and <? super Y> in
|
||||
parameters
|
||||
+ Allow main parameters to be a single field.
|
||||
+ allow System.out to be replaced by something else (f.e.
|
||||
System.err)
|
||||
+ Allow UsageFormatter to be set in JCommander Builder
|
||||
+ Change UsageFormatter into an interface
|
||||
+ Clean up DefaultUsageFormatter
|
||||
+ Create MyDelegate.java
|
||||
+ Create UsageFormatter (preliminary)
|
||||
+ Enable usage() ordering for DynamicParameter
|
||||
+ Encapsulate MainParameter.
|
||||
+ encode user input to massage error message
|
||||
+ Expose more of the UsageFormatter implementations
|
||||
+ Fields annotated with @ParametersDelegate are now allowed to
|
||||
be final.
|
||||
+ FIX #380 Main parameter doesn't support Converter
|
||||
+ Fix error message when failing to convert a Path
|
||||
+ Fixing: squid:ModifiersOrderCheck and squid:S2444
|
||||
+ Fix locale-related issues in usage formatter tests
|
||||
+ Get boolean/Boolean getter with "is" prefix
|
||||
+ GH-477 Environment Variable Default Provider
|
||||
+ make console configurable by JCommander.Builder
|
||||
+ Make UsageFormatter abstract, Create DefaultUsageFormatter
|
||||
+ Only one DefaultConverterFactory
|
||||
+ Remove String.join usage - resolves #381
|
||||
+ Remove the generic in IStringConverterFactory
|
||||
+ Restrict access to JCommander.Options again
|
||||
+ Support arity for main parameters.
|
||||
+ Update DefaultParameterizedParser.java
|
||||
+ Update IParameterizedParser.java
|
||||
+ Update JCommander.java
|
||||
+ usage() hides 'Comments:' header when only hidden commands
|
||||
exist
|
||||
+ Use Builder API as constructor is deprecated
|
||||
+ Use get<fieldname> default getter approach if is<fieldname>
|
||||
method is not found
|
||||
* Upgrade needed by new code in xmvn 4.2.0
|
||||
- Fetch sources using source service and clean the tarball of
|
||||
unnecessary binary files
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Mon Apr 8 18:11:28 UTC 2019 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Remove reference to pom parent from pom.xml file, since we are
|
||||
not building with maven.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Feb 7 16:28:14 UTC 2019 - Jan Engelhardt <jengelh@inai.de>
|
||||
|
||||
- Avoid double shipping of documentation.
|
||||
- Ensure neutrality of descriptions.
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Dec 6 12:25:36 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Fix javadoc build with older JDK versions
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Thu Oct 25 20:55:17 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Build with java source/target levels 8 since the code uses
|
||||
String.join() which does not exist before java 8
|
||||
|
||||
-------------------------------------------------------------------
|
||||
Wed Oct 24 06:47:17 UTC 2018 - Fridrich Strba <fstrba@suse.com>
|
||||
|
||||
- Initial packaging built without maven, adapted from Fedora rpm
|
277
beust-jcommander.pom
Normal file
277
beust-jcommander.pom
Normal file
@ -0,0 +1,277 @@
|
||||
<!--
|
||||
|
||||
Copyright (C) 2010 the original author or authors.
|
||||
See the notice.md file distributed with this work for additional
|
||||
information regarding copyright ownership.
|
||||
|
||||
Licensed under the Apache License, Version 2.0 (the "License");
|
||||
you may not use this file except in compliance with the License.
|
||||
You may obtain a copy of the License at
|
||||
|
||||
http://www.apache.org/licenses/LICENSE-2.0
|
||||
|
||||
Unless required by applicable law or agreed to in writing, software
|
||||
distributed under the License is distributed on an "AS IS" BASIS,
|
||||
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
||||
See the License for the specific language governing permissions and
|
||||
limitations under the License.
|
||||
|
||||
-->
|
||||
|
||||
<project xmlns="http://maven.apache.org/POM/4.0.0" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd">
|
||||
<modelVersion>4.0.0</modelVersion>
|
||||
<groupId>com.beust</groupId>
|
||||
<artifactId>jcommander</artifactId>
|
||||
<packaging>jar</packaging>
|
||||
<name>JCommander</name>
|
||||
<version>@VERSION@</version>
|
||||
<description>A Java framework to parse command line options with annotations.</description>
|
||||
<url>http://beust.com/jcommander</url>
|
||||
<licenses>
|
||||
<license>
|
||||
<name>The Apache Software License, Version 2.0</name>
|
||||
<url>http://www.apache.org/licenses/LICENSE-2.0.txt</url>
|
||||
<distribution>repo</distribution>
|
||||
</license>
|
||||
</licenses>
|
||||
<scm>
|
||||
<connection>scm:git:git@github.com:cbeust/jcommander.git</connection>
|
||||
<developerConnection>scm:git:git@github.com:cbeust/jcommander.git</developerConnection>
|
||||
<url>git@github.com:cbeust/jcommander.git</url>
|
||||
</scm>
|
||||
|
||||
<repositories>
|
||||
<repository>
|
||||
<id>jcenter</id>
|
||||
<name>bintray</name>
|
||||
<url>http://jcenter.bintray.com</url>
|
||||
</repository>
|
||||
<!--
|
||||
<repository>
|
||||
<id>sonatype-nexus-staging</id>
|
||||
<name>Nexus Staging Repository</name>
|
||||
<url>https://oss.sonatype.org/content/repositories/snapshots</url>
|
||||
</repository>
|
||||
<repository>
|
||||
<id>oss-jfrog-artifactory</id>
|
||||
<name>oss-jfrog-artifactory-snapshots</name>
|
||||
<url>http://oss.jfrog.org/artifactory/oss-snapshot-local</url>
|
||||
</repository>
|
||||
-->
|
||||
</repositories>
|
||||
|
||||
<distributionManagement>
|
||||
<repository>
|
||||
<id>sonatype-nexus-staging</id>
|
||||
<name>Nexus Staging Repository</name>
|
||||
<url>https://oss.sonatype.org/service/local/staging/deploy/maven2/</url>
|
||||
</repository>
|
||||
</distributionManagement>
|
||||
|
||||
<developers>
|
||||
<developer>
|
||||
<name>Cedric Beust</name>
|
||||
</developer>
|
||||
</developers>
|
||||
|
||||
<parent>
|
||||
<groupId>org.sonatype.oss</groupId>
|
||||
<artifactId>oss-parent</artifactId>
|
||||
<version>3</version>
|
||||
</parent>
|
||||
|
||||
<build>
|
||||
<plugins>
|
||||
<!-- Compilation -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-compiler-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<configuration>
|
||||
<source>1.8</source>
|
||||
<target>1.8</target>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Resource handling -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-resources-plugin</artifactId>
|
||||
<version>2.4.1</version>
|
||||
<configuration>
|
||||
<encoding>UTF-8</encoding>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- OSGi manifest creation -->
|
||||
<plugin>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>maven-bundle-plugin</artifactId>
|
||||
<version>2.1.0</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>bundle-manifest</id>
|
||||
<phase>process-classes</phase>
|
||||
<goals>
|
||||
<goal>manifest</goal>
|
||||
</goals>
|
||||
<configuration>
|
||||
<instructions>
|
||||
<_versionpolicy>$(@)</_versionpolicy>
|
||||
</instructions>
|
||||
</configuration>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
|
||||
<!-- Add OSGi manifest in JAR -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-jar-plugin</artifactId>
|
||||
<version>2.3.1</version>
|
||||
<configuration>
|
||||
<archive>
|
||||
<manifestFile>${project.build.outputDirectory}/META-INF/MANIFEST.MF</manifestFile>
|
||||
</archive>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Tests -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-surefire-plugin</artifactId>
|
||||
<version>2.10</version>
|
||||
<configuration>
|
||||
<skipTests>false</skipTests>
|
||||
</configuration>
|
||||
</plugin>
|
||||
|
||||
<!-- Generating Javadoc -->
|
||||
<plugin>
|
||||
<groupId>org.apache.maven.plugins</groupId>
|
||||
<artifactId>maven-javadoc-plugin</artifactId>
|
||||
<version>2.7</version>
|
||||
<configuration>
|
||||
<excludePackageNames>*.internal</excludePackageNames>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
<pluginManagement>
|
||||
<plugins>
|
||||
<!--This plugin's configuration is used to store Eclipse m2e settings only. It has no influence on the Maven build itself.-->
|
||||
<plugin>
|
||||
<groupId>org.eclipse.m2e</groupId>
|
||||
<artifactId>lifecycle-mapping</artifactId>
|
||||
<version>1.0.0</version>
|
||||
<configuration>
|
||||
<lifecycleMappingMetadata>
|
||||
<pluginExecutions>
|
||||
<pluginExecution>
|
||||
<pluginExecutionFilter>
|
||||
<groupId>org.apache.felix</groupId>
|
||||
<artifactId>
|
||||
maven-bundle-plugin
|
||||
</artifactId>
|
||||
<versionRange>
|
||||
[2.1.0,)
|
||||
</versionRange>
|
||||
<goals>
|
||||
<goal>manifest</goal>
|
||||
</goals>
|
||||
</pluginExecutionFilter>
|
||||
<action>
|
||||
<ignore />
|
||||
</action>
|
||||
</pluginExecution>
|
||||
</pluginExecutions>
|
||||
</lifecycleMappingMetadata>
|
||||
</configuration>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</pluginManagement>
|
||||
</build>
|
||||
|
||||
<dependencies>
|
||||
<dependency>
|
||||
<groupId>org.testng</groupId>
|
||||
<artifactId>testng</artifactId>
|
||||
<version>6.8.21</version>
|
||||
<type>jar</type>
|
||||
<scope>test</scope>
|
||||
<exclusions>
|
||||
<exclusion>
|
||||
<artifactId>jcommander</artifactId>
|
||||
<groupId>com.beust</groupId>
|
||||
</exclusion>
|
||||
</exclusions>
|
||||
</dependency>
|
||||
</dependencies>
|
||||
|
||||
<profiles>
|
||||
|
||||
<!--
|
||||
Do a license check by running : mvn -P license license:check
|
||||
UPdate the license check by running : mvn -P license license:format
|
||||
-->
|
||||
<profile>
|
||||
<id>license</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<groupId>com.mycila.maven-license-plugin</groupId>
|
||||
<artifactId>maven-license-plugin</artifactId>
|
||||
<version>1.7.0</version>
|
||||
<configuration>
|
||||
<quiet>false</quiet>
|
||||
<header>src/main/license/license-header.txt</header>
|
||||
<includes>
|
||||
<include>src/**</include>
|
||||
<include>pom.xml</include>
|
||||
</includes>
|
||||
<excludes>
|
||||
<exclude>**/.git/**</exclude>
|
||||
<!-- ignore files produced during a build -->
|
||||
<exclude>**/target/**</exclude>
|
||||
</excludes>
|
||||
<useDefaultExcludes>false</useDefaultExcludes>
|
||||
</configuration>
|
||||
<executions>
|
||||
<execution>
|
||||
<goals>
|
||||
<goal>check</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
<!-- Signing with gpg -->
|
||||
<!--
|
||||
Sign the artifacts by calling
|
||||
mvn -P sign [..]
|
||||
-->
|
||||
<profile>
|
||||
<id>sign</id>
|
||||
<build>
|
||||
<plugins>
|
||||
<plugin>
|
||||
<artifactId>maven-gpg-plugin</artifactId>
|
||||
<version>1.4</version>
|
||||
<executions>
|
||||
<execution>
|
||||
<id>sign-artifacts</id>
|
||||
<phase>verify</phase>
|
||||
<goals>
|
||||
<goal>sign</goal>
|
||||
</goals>
|
||||
</execution>
|
||||
</executions>
|
||||
</plugin>
|
||||
</plugins>
|
||||
</build>
|
||||
</profile>
|
||||
</profiles>
|
||||
|
||||
</project>
|
88
beust-jcommander.spec
Normal file
88
beust-jcommander.spec
Normal file
@ -0,0 +1,88 @@
|
||||
#
|
||||
# spec file for package beust-jcommander
|
||||
#
|
||||
# Copyright (c) 2024 SUSE LLC
|
||||
#
|
||||
# All modifications and additions to the file contributed by third parties
|
||||
# remain the property of their copyright owners, unless otherwise agreed
|
||||
# upon. The license for this file, and modifications and additions to the
|
||||
# file, is the same license as for the pristine package itself (unless the
|
||||
# license for the pristine package is not an Open Source License, in which
|
||||
# case the license is the MIT License). An "Open Source License" is a
|
||||
# license that conforms to the Open Source Definition (Version 1.9)
|
||||
# published by the Open Source Initiative.
|
||||
|
||||
# Please submit bugfixes or comments via https://bugs.opensuse.org/
|
||||
#
|
||||
|
||||
|
||||
%define __requires_exclude java-headless
|
||||
%global short_name jcommander
|
||||
Name: beust-%{short_name}
|
||||
Version: 1.85
|
||||
Release: 0
|
||||
Summary: Java framework for parsing command line parameters
|
||||
License: Apache-2.0
|
||||
Group: Development/Libraries/Java
|
||||
URL: https://jcommander.org/
|
||||
Source0: %{short_name}-%{version}.tar.xz
|
||||
# Adapted from earlier version that still shipped poms. It uses kobalt for building now
|
||||
Source1: %{name}.pom
|
||||
Source2: %{name}-build.xml
|
||||
Patch0: 0001-ParseValues-NullPointerException-patch.patch
|
||||
BuildRequires: ant
|
||||
BuildRequires: fdupes
|
||||
BuildRequires: java-devel >= 9
|
||||
BuildRequires: javapackages-local >= 6
|
||||
Requires: java >= 1.8
|
||||
Obsoletes: %{short_name} < %{version}-%{release}
|
||||
Provides: %{short_name} = %{version}-%{release}
|
||||
BuildArch: noarch
|
||||
|
||||
%description
|
||||
JCommander is a Java framework that allows parsing command line
|
||||
parameters (with annotations).
|
||||
|
||||
%package javadoc
|
||||
Summary: API documentation for %{name}
|
||||
Group: Development/Libraries/Java
|
||||
|
||||
%description javadoc
|
||||
This package contains the %{summary}.
|
||||
|
||||
%prep
|
||||
%setup -q -n %{short_name}-%{version}
|
||||
%patch -P 0 -p1
|
||||
|
||||
chmod -x license.txt
|
||||
cp -p %{SOURCE1} pom.xml
|
||||
cp -p %{SOURCE2} build.xml
|
||||
sed -i 's/@VERSION@/%{version}/g' pom.xml build.xml
|
||||
|
||||
%build
|
||||
%{ant} jar javadoc
|
||||
|
||||
%install
|
||||
# jars
|
||||
install -d -m 0755 %{buildroot}%{_javadir}
|
||||
install -m 644 target/%{short_name}-%{version}.jar \
|
||||
%{buildroot}%{_javadir}/%{name}.jar
|
||||
|
||||
# pom
|
||||
install -d -m 755 %{buildroot}%{_mavenpomdir}
|
||||
%{mvn_install_pom} pom.xml %{buildroot}%{_mavenpomdir}/%{name}.pom
|
||||
%add_maven_depmap %{name}.pom %{name}.jar
|
||||
|
||||
# javadoc
|
||||
install -dm 755 %{buildroot}%{_javadocdir}/%{name}
|
||||
cp -pr target/site/apidocs/* %{buildroot}%{_javadocdir}/%{name}/
|
||||
%fdupes -s %{buildroot}%{_javadocdir}/%{name}/
|
||||
|
||||
%files -f .mfiles
|
||||
%license license.txt
|
||||
%doc notice.md README.markdown
|
||||
|
||||
%files javadoc
|
||||
%{_javadocdir}/%{name}
|
||||
|
||||
%changelog
|
BIN
jcommander-1.83.tar.xz
(Stored with Git LFS)
Normal file
BIN
jcommander-1.83.tar.xz
(Stored with Git LFS)
Normal file
Binary file not shown.
3
jcommander-1.85.tar.xz
Normal file
3
jcommander-1.85.tar.xz
Normal file
@ -0,0 +1,3 @@
|
||||
version https://git-lfs.github.com/spec/v1
|
||||
oid sha256:217b845c53531f23497851c22a89354e1ad9c0e7049975cb0555d81350e1650c
|
||||
size 370532
|
Loading…
Reference in New Issue
Block a user