Skip to content

Commit f19ef5f

Browse files
committed
Merge from release
2 parents 410459d + 4994a04 commit f19ef5f

25 files changed

+230
-96
lines changed

CONTRIBUTING.md

+11-8
Original file line numberDiff line numberDiff line change
@@ -60,26 +60,29 @@ Making Changes
6060
--------------
6161

6262
+ Create a _topic branch_ for your isolated work.
63-
* Usually you should base your branch on the `master` branch.
64-
* A good topic branch name can be the JIRA bug ID plus a keyword, e.g. `CLI-123-InputStream`.
63+
* Usually you should base your branch from the `master` branch.
64+
* A good topic branch name can be the JIRA bug ID plus a keyword, for example, `CLI-123-InputStream`.
6565
* If you have submitted multiple JIRA issues, try to maintain separate branches and pull requests.
6666
+ Make commits of logical units.
6767
* Make sure your commit messages are meaningful and in the proper format. Your commit message should contain the key of the JIRA issue.
68-
* e.g. `CLI-123: Close input stream earlier`
68+
* For example, `[CLI-123] Close input stream earlier`
6969
+ Respect the original code style:
70-
+ Only use spaces for indentation.
70+
+ Only use spaces for indentation; you can check for unnecessary whitespace with `git diff` before committing.
7171
+ Create minimal diffs - disable _On Save_ actions like _Reformat Source Code_ or _Organize Imports_. If you feel the source code should be reformatted create a separate PR for this change first.
72-
+ Check for unnecessary whitespace with `git diff` -- check before committing.
73-
+ Make sure you have added the necessary tests for your changes, typically in `src/test/java`.
74-
+ Run all the tests with `mvn clean verify` to ensure nothing else was accidentally broken.
72+
+ Write unit tests that match behavioral changes, where the tests fail if the changes to the runtime are not applied. This may not always be possible but is a best-practice.
73+
Unit tests are typically in the `src/test/java` directory.
74+
+ Run a successful build using the default [Maven](https://maven.apache.org/) goal with `mvn`; that's `mvn` on the command line by itself.
75+
+ Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
76+
+ Each commit in the pull request should have a meaningful subject line and body. Note that commits might be squashed by a maintainer on merge.
77+
7578

7679
Making Trivial Changes
7780
----------------------
7881

7982
The JIRA tickets are used to generate the changelog for the next release.
8083

8184
For changes of a trivial nature to comments and documentation, it is not always necessary to create a new ticket in JIRA.
82-
In this case, it is appropriate to start the first line of a commit with '(doc)' instead of a ticket number.
85+
In this case, it is appropriate to start the first line of a commit with '[doc]' or '[javadoc]' instead of a ticket number.
8386

8487

8588
Submitting Changes

pom.xml

+3-6
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@
1919
<parent>
2020
<groupId>org.apache.commons</groupId>
2121
<artifactId>commons-parent</artifactId>
22-
<version>79</version>
22+
<version>81</version>
2323
</parent>
2424
<modelVersion>4.0.0</modelVersion>
2525
<groupId>commons-cli</groupId>
@@ -78,7 +78,7 @@
7878
</dependencies>
7979
<properties>
8080
<!-- project.build.outputTimestamp is managed by Maven plugins, see https://maven.apache.org/guides/mini/guide-reproducible-builds.html -->
81-
<project.build.outputTimestamp>2024-08-14T23:15:56Z</project.build.outputTimestamp>
81+
<project.build.outputTimestamp>2025-01-11T14:52:17Z</project.build.outputTimestamp>
8282
<maven.compiler.source>1.8</maven.compiler.source>
8383
<maven.compiler.target>1.8</maven.compiler.target>
8484
<commons.componentid>cli</commons.componentid>
@@ -181,9 +181,6 @@
181181
<artifactId>maven-javadoc-plugin</artifactId>
182182
<configuration>
183183
<linksource>true</linksource>
184-
<links>
185-
<link>${commons.javadoc.java.link}</link>
186-
</links>
187184
</configuration>
188185
</plugin>
189186
<plugin>
@@ -334,7 +331,7 @@
334331
<email>ggregory at apache.org</email>
335332
<url>https://www.garygregory.com</url>
336333
<organization>The Apache Software Foundation</organization>
337-
<organizationUrl>https://www.apache.org/</organizationUrl>
334+
<organizationUrl>https://www.apache.org/</organizationUrl>
338335
<roles>
339336
<role>PMC Member</role>
340337
</roles>

src/changes/changes.xml

+9-4
Original file line numberDiff line numberDiff line change
@@ -22,23 +22,28 @@
2222
<title>Apache Commons CLI Release Notes</title>
2323
</properties>
2424
<body>
25-
<release version="1.10.0" date="2025-01-11" description="This is a feature and maintenance release. Java 8 or later is required.">
25+
<release version="1.10.0" date="YYYY-MM-DD" description="This is a feature and maintenance release. Java 8 or later is required.">
2626
<!-- FIX -->
2727
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate CommandLine.Builder() in favor of CommandLine.builder().</action>
2828
<action type="fix" dev="ggregory" due-to="Gary Gregory">Deprecate DeprecatedAttributes.Builder() in favor of DeprecatedAttributes.builder().</action>
2929
<action type="fix" dev="ggregory" due-to="Dávid Szigecsán">Refactor default parser test #294.</action>
3030
<action type="fix" dev="ggregory" due-to="Gary Gregory">Port to JUnit 5.</action>
3131
<action type="fix" dev="ggregory" due-to="Gary Gregory">Generics for Converter should use Exception not Throwable.</action>
32-
<action type="fix" dev="ggregory" due-to="Gary Gregory">Pick up maven-antrun-plugin version from parent POM org.apache:apache.</action>
32+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Pick up maven-antrun-plugin version from parent POM org.apache:apache.</action>
33+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Javadoc is missing its Overview page.</action>
34+
<action type="fix" dev="ggregory" due-to="Arnout Engelen">Get mockito version from parent pom (#351).</action>
35+
<action type="fix" dev="ggregory" due-to="Gary Gregory">Remove -nouses directive from maven-bundle-plugin. OSGi package imports now state 'uses' definitions for package imports, this doesn't affect JPMS (from org.apache.commons:commons-parent:80).</action>
36+
<action type="fix" dev="ggregory" due-to="Arnout Engelen">Deprecate PatternOptionBuilder.PatternOptionBuilder().</action>
3337
<!-- ADD -->
3438
<action type="add" issue="CLI-339" dev="ggregory" due-to="Claude Warren, Gary Gregory">Help formatter extension in the new package #314.</action>
3539
<action type="add" dev="ggregory" due-to="Gary Gregory">CommandLine.Builder implements Supplier&lt;CommandLine&gt;.</action>
3640
<action type="add" dev="ggregory" due-to="Gary Gregory">DefaultParser.Builder implements Supplier&lt;DefaultParser&gt;.</action>
3741
<action type="add" issue="CLI-340" dev="ggregory" due-to="Claude Warren, Gary Gregory">Add CommandLine.getParsedOptionValues() #334.</action>
3842
<!-- UPDATE -->
39-
<action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">Bump org.apache.commons:commons-parent from 72 to 79 #302, #304, #310, #315, #320, #327.</action>
43+
<action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">Bump org.apache.commons:commons-parent from 72 to 81 #302, #304, #310, #315, #320, #327.</action>
4044
<action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">[test] Bump commons-io:commons-io from 2.16.1 to 2.18.0 #309, #337.</action>
41-
<action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">[test] Bump org.apache.commons:commons-text from 1.12.0 to 1.13.0 #344.</action>
45+
<action type="update" dev="ggregory" due-to="Gary Gregory, Dependabot">[test] Bump org.apache.commons:commons-text from 1.12.0 to 1.13.0 #344.</action>
46+
<action type="update" dev="ggregory" due-to="Gary Gregory">Update site documentation to https://maven.apache.org/xsd/xdoc-2.0.xsd.</action>
4247
</release>
4348
<release version="1.9.0" date="2024-08-10" description="This release contains new features and bug fixes and requires Java 8 or above.">
4449
<!-- ADD -->

src/changes/release-notes.vm

+1-1
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ Removed
107107
## End of main loop
108108
#end
109109

110-
Historical list of changes: ${project.url}changes-report.html
110+
Historical list of changes: ${project.url}changes.html
111111

112112
For complete information on ${project.name}, including instructions on how to submit bug reports,
113113
patches, or suggestions for improvement, see the ${project.name} website:

src/main/java/org/apache/commons/cli/BasicParser.java

+8
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,14 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2525
*/
2626
@Deprecated
2727
public class BasicParser extends Parser {
28+
29+
/**
30+
* Constructs a new instance.
31+
*/
32+
public BasicParser() {
33+
// empty
34+
}
35+
2836
/**
2937
* <p>
3038
* A simple implementation of {@link Parser}'s abstract {@link Parser#flatten(Options, String[], boolean) flatten}

src/main/java/org/apache/commons/cli/GnuParser.java

+8
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,14 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2828
*/
2929
@Deprecated
3030
public class GnuParser extends Parser {
31+
32+
/**
33+
* Constructs a new instance.
34+
*/
35+
public GnuParser() {
36+
// empty
37+
}
38+
3139
/**
3240
* This flatten method does so using the following rules:
3341
* <ol>

src/main/java/org/apache/commons/cli/HelpFormatter.java

+7
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,13 @@ public static class Builder implements Supplier<HelpFormatter> {
7878
// TODO All other instance HelpFormatter instance variables.
7979
// Make HelpFormatter immutable for 2.0
8080

81+
/**
82+
* Constructs a new instance.
83+
*/
84+
public Builder() {
85+
// empty
86+
}
87+
8188
/**
8289
* A function to convert a description (not null) and a deprecated Option (not null) to help description
8390
*/

src/main/java/org/apache/commons/cli/OptionGroup.java

+7
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,13 @@ Licensed to the Apache Software Foundation (ASF) under one or more
2828
*/
2929
public class OptionGroup implements Serializable {
3030

31+
/**
32+
* Constructs a new instance.
33+
*/
34+
public OptionGroup() {
35+
// empty
36+
}
37+
3138
/** The serial version UID. */
3239
private static final long serialVersionUID = 1L;
3340

src/main/java/org/apache/commons/cli/Options.java

+8
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,14 @@ Licensed to the Apache Software Foundation (ASF) under one or more
3939
* @see org.apache.commons.cli.CommandLine
4040
*/
4141
public class Options implements Serializable {
42+
43+
/**
44+
* Constructs new instance.
45+
*/
46+
public Options() {
47+
// empty
48+
}
49+
4250
/** The serial version UID. */
4351
private static final long serialVersionUID = 1L;
4452

src/main/java/org/apache/commons/cli/Parser.java

+8
Original file line numberDiff line numberDiff line change
@@ -31,6 +31,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
3131
*/
3232
@Deprecated
3333
public abstract class Parser implements CommandLineParser {
34+
3435
/** CommandLine instance */
3536
protected CommandLine cmd;
3637

@@ -40,6 +41,13 @@ public abstract class Parser implements CommandLineParser {
4041
/** List of required options strings */
4142
private List requiredOptions;
4243

44+
/**
45+
* Constructs a new instance.
46+
*/
47+
public Parser() {
48+
// empty
49+
}
50+
4351
/**
4452
* Throws a {@link MissingOptionException} if all of the required options are not present.
4553
*

src/main/java/org/apache/commons/cli/PatternOptionBuilder.java

+10
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,16 @@ Licensed to the Apache Software Foundation (ASF) under one or more
7474
*/
7575
public class PatternOptionBuilder {
7676

77+
/**
78+
* Deprecated, only provides static methods.
79+
*
80+
* @deprecated Will be private or class will be final.
81+
*/
82+
@Deprecated
83+
public PatternOptionBuilder() {
84+
// empty
85+
}
86+
7787
/** String class */
7888
public static final Class<String> STRING_VALUE = String.class;
7989

src/main/java/org/apache/commons/cli/PosixParser.java

+8
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ Licensed to the Apache Software Foundation (ASF) under one or more
3030
*/
3131
@Deprecated
3232
public class PosixParser extends Parser {
33+
3334
/** Holder for flattened tokens */
3435
private final List<String> tokens = new ArrayList<>();
3536

@@ -42,6 +43,13 @@ public class PosixParser extends Parser {
4243
/** The command line Options */
4344
private Options options;
4445

46+
/**
47+
* Constructs a new instance.
48+
*/
49+
public PosixParser() {
50+
// empty
51+
}
52+
4553
/**
4654
* Breaks {@code token} into its constituent parts using the following algorithm.
4755
*

src/main/java/org/apache/commons/cli/overview.html src/main/javadoc/overview.html

+11-11
Original file line numberDiff line numberDiff line change
@@ -14,30 +14,30 @@
1414
See the License for the specific language governing permissions and
1515
limitations under the License.
1616
-->
17+
<html>
18+
<head>
19+
<title>Apache Commons CLI Overview</title>
20+
</head>
1721
<body>
22+
<img src="../images/commons-logo.png" alt="Apache Commons CLI">
1823

19-
<p>Apache Commons CLI.</p>
24+
<p>The Commons CLI component parses command-line arguments for your application.</p>
2025

21-
<p>The commons-cli package aides in parsing command-line arguments.</p>
22-
23-
<p>Allow command-line arguments to be parsed against a descriptor of
26+
<p>Commons CLI parses command-line arguments using a descriptor of
2427
valid options (long and short), potentially with arguments.</p>
2528

26-
<p>command-line arguments may be of the typical {@code String[]}
27-
form, but also may be a {@code java.util.List}. Indexes allow
28-
for parsing only a portion of the command-line. Also, functionality
29+
<p>Command-line arguments may be of the typical {@code String[]}
30+
form, but also may be a {@code java.util.List}. Indexes allow
31+
for parsing only a portion of the command-line. Also, functionality
2932
for parsing the command-line in phases is built in, allowing for
3033
'cvs-style' command-lines, where some global options are specified
3134
before a 'command' argument, and command-specific options are
3235
specified after the command argument:
3336

3437
<code>
35-
<pre>
3638
myApp -p &lt;port&gt; command -p &lt;printer&gt;
37-
</pre>
3839
</code>
3940

40-
4141
<p>The homepage for the project is
42-
<a href="https://commons.apache.org">Apache Commons/</a>
42+
<a href="https://commons.apache.org">Apache Commons</a>
4343
</body>

src/site/site.xml

+50-40
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,55 @@
11
<?xml version="1.0" encoding="ISO-8859-1"?>
22
<!--
3-
Licensed to the Apache Software Foundation (ASF) under one or more
4-
contributor license agreements. See the NOTICE file distributed with
5-
this work for additional information regarding copyright ownership.
6-
The ASF licenses this file to You under the Apache License, Version 2.0
7-
(the "License"); you may not use this file except in compliance with
8-
the License. You may obtain a copy of the License at
3+
Licensed to the Apache Software Foundation (ASF) under one
4+
or more contributor license agreements. See the NOTICE file
5+
distributed with this work for additional information
6+
regarding copyright ownership. The ASF licenses this file
7+
to you under the Apache License, Version 2.0 (the
8+
"License"); you may not use this file except in compliance
9+
with the License. You may obtain a copy of the License at
910
10-
http://www.apache.org/licenses/LICENSE-2.0
11+
https://www.apache.org/licenses/LICENSE-2.0
1112
12-
Unless required by applicable law or agreed to in writing, software
13-
distributed under the License is distributed on an "AS IS" BASIS,
14-
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15-
See the License for the specific language governing permissions and
16-
limitations under the License.
13+
Unless required by applicable law or agreed to in writing,
14+
software distributed under the License is distributed on an
15+
"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
16+
KIND, either express or implied. See the License for the
17+
specific language governing permissions and limitations
18+
under the License.
1719
-->
18-
<project name="Apache Commons CLI">
19-
<bannerRight>
20-
<name>Apache Commons CLI</name>
21-
<src>/images/logo.png</src>
22-
<href>/index.html</href>
23-
</bannerRight>
24-
25-
<body>
26-
<menu name="Commons CLI">
27-
<item name="Overview" href="/index.html"/>
28-
<item name="Download" href="https://commons.apache.org/cli/download_cli.cgi"/>
29-
<item name="Changes Report" href="/changes.html"/>
30-
<item name="Mailing Lists" href="/mail-lists.html"/>
31-
<item name="Issue Tracking" href="/issue-tracking.html"/>
32-
<item name="Source Repository" href="/scm.html"/>
33-
</menu>
34-
35-
<menu name="User Guide">
36-
<item name="Getting started" href="/introduction.html"/>
37-
<item name="Using CLI" href="/usage.html"/>
38-
<item name="Option properties" href="/properties.html"/>
39-
<item name="Javadoc" href="/apidocs/index.html"/>
40-
<item name="Javadoc Archive" href="https://javadoc.io/doc/commons-cli/commons-cli/latest/index.html"/>
41-
</menu>
42-
43-
</body>
44-
45-
</project>
20+
<site xmlns="http://maven.apache.org/SITE/2.0.0"
21+
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
22+
xsi:schemaLocation="http://maven.apache.org/SITE/2.0.0 http://maven.apache.org/xsd/site-2.0.0.xsd"
23+
name="Apache Commons CLI">
24+
<bannerRight name="Commons CLI" href="/index.html">
25+
<image src="/images/logo.png"/>
26+
</bannerRight>
27+
<body>
28+
<menu name="Commons BCEL">
29+
<!-- Start: For all components. -->
30+
<item name="About" href="index.html" />
31+
<item name="Asking Questions" href="/mail-lists.html" />
32+
<item name="Release History" href="/changes.html" />
33+
<item name="Issue Tracking" href="/issue-management.html" />
34+
<item name="Dependency Management" href="/dependency-info.html" />
35+
<item name="Sources" href="/scm.html" />
36+
<item name="Security" href="security.html" />
37+
<item name="License" href="https://www.apache.org/licenses/LICENSE-2.0" />
38+
<item name="Code of Conduct" href="https://www.apache.org/foundation/policies/conduct.html" />
39+
<item name="Download" href="https://commons.apache.org/proper/commons-bcel/download_bcel.cgi" />
40+
<item name="Javadoc">
41+
<item name="Javadoc Current" href="apidocs/index.html" />
42+
<item name="Javadoc Archive" href="https://javadoc.io/doc/org.apache.bcel/bcel/" />
43+
</item>
44+
<!-- End: For all components. -->
45+
</menu>
46+
<!-- Specific to this component: -->
47+
<menu name="User Guide">
48+
<item name="Getting started" href="/introduction.html"/>
49+
<item name="Using CLI" href="/usage.html"/>
50+
<item name="Option properties" href="/properties.html"/>
51+
<item name="Javadoc" href="/apidocs/index.html"/>
52+
<item name="Javadoc Archive" href="https://javadoc.io/doc/commons-cli/commons-cli/latest/index.html"/>
53+
</menu>
54+
</body>
55+
</site>

0 commit comments

Comments
 (0)