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

Lines changed: 11 additions & 8 deletions
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

Lines changed: 3 additions & 6 deletions
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

Lines changed: 9 additions & 4 deletions
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

Lines changed: 1 addition & 1 deletion
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

Lines changed: 8 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
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

Lines changed: 7 additions & 0 deletions
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

Lines changed: 7 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
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

Lines changed: 8 additions & 0 deletions
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
*

0 commit comments

Comments
 (0)