Skip to content

Commit

Permalink
Bug 581125: tmf: Upgrade org.apache.commons.cli version 1.4.0
Browse files Browse the repository at this point in the history
Update older targets for that as well.

[Fixed] Bug 581125: tmf: Upgrade org.apache.commons.cli version 1.4.0

Signed-off-by: Bernd Hufmann <bernd.hufmann@ericsson.com>
Change-Id: Icbd9ccd0d593d6a2dc7cdcdb20aaecfdcd105c52
Reviewed-on: https://git.eclipse.org/r/c/tracecompass/org.eclipse.tracecompass/+/197297
Tested-by: Trace Compass Bot <tracecompass-bot@eclipse.org>
Tested-by: Patrick Tasse <patrick.tasse@gmail.com>
Reviewed-by: Patrick Tasse <patrick.tasse@gmail.com>
  • Loading branch information
bhufmann committed Nov 25, 2022
1 parent 05274d6 commit 03b3b83
Show file tree
Hide file tree
Showing 14 changed files with 42 additions and 38 deletions.
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.16" sequenceNumber="15">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.16" sequenceNumber="16">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -21,7 +21,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.antlr.runtime" version="3.2.0.v201101311130"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v201101311130"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.17" sequenceNumber="17">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.17" sequenceNumber="18">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -21,7 +21,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.antlr.runtime" version="3.2.0.v201101311130"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v201101311130"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.18" sequenceNumber="12">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.18" sequenceNumber="13">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -21,7 +21,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.antlr.runtime" version="3.2.0.v201101311130"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v201101311130"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.19" sequenceNumber="14">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.19" sequenceNumber="15">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -21,7 +21,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.antlr.runtime" version="3.2.0.v201101311130"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v201101311130"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.20" sequenceNumber="9">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.20" sequenceNumber="10">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -21,7 +21,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.antlr.runtime" version="3.2.0.v201101311130"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v201101311130"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.21" sequenceNumber="11">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.21" sequenceNumber="12">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -21,7 +21,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.antlr.runtime" version="3.2.0.v201101311130"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v201101311130"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.22" sequenceNumber="11">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.22" sequenceNumber="12">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -21,7 +21,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.antlr.runtime" version="3.2.0.v201101311130"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v201101311130"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.23" sequenceNumber="9">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.23" sequenceNumber="10">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -21,7 +21,7 @@
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.antlr.runtime" version="3.2.0.v201101311130"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v201101311130"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.24" sequenceNumber="9">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.24" sequenceNumber="10">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -20,6 +20,7 @@
<unit id="jakarta.xml.bind" version="2.3.3.v20201118-1818"/>
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v20220404-1927"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand All @@ -34,7 +35,6 @@
<unit id="javax.activation" version="1.1.0.v201211130549"/>
<unit id="javax.xml.bind" version="0.0.0"/>
<unit id="javax.xml.stream" version="0.0.0"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.lang3" version="0.0.0"/>
<unit id="org.apache.derby" version="0.0.0"/>
<unit id="org.json" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.25" sequenceNumber="8">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.25" sequenceNumber="9">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -20,6 +20,7 @@
<unit id="jakarta.xml.bind" version="2.3.3.v20201118-1818"/>
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v20220404-1927"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand All @@ -34,7 +35,6 @@
<unit id="javax.activation" version="1.1.0.v201211130549"/>
<unit id="javax.xml.bind" version="0.0.0"/>
<unit id="javax.xml.stream" version="0.0.0"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.lang3" version="0.0.0"/>
<unit id="org.apache.derby" version="0.0.0"/>
<unit id="org.json" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.26" sequenceNumber="3">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-e4.26" sequenceNumber="4">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -20,6 +20,7 @@
<unit id="jakarta.xml.bind" version="2.3.3.v20221112-0806"/>
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v20220404-1927"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand All @@ -34,7 +35,6 @@
<unit id="javax.activation" version="1.1.0.v201211130549"/>
<unit id="javax.xml.bind" version="0.0.0"/>
<unit id="javax.xml.stream" version="0.0.0"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.lang3" version="0.0.0"/>
<unit id="org.apache.derby" version="0.0.0"/>
<unit id="org.json" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-eStaging" sequenceNumber="195">
<?xml version="1.0" encoding="UTF-8" standalone="no"?><?pde version="3.8"?><target name="tracecompass-eStaging" sequenceNumber="196">
<locations>
<location includeAllPlatforms="false" includeConfigurePhase="false" includeMode="planner" includeSource="true" type="InstallableUnit">
<unit id="org.eclipse.cdt.gnu.dsf.feature.group" version="0.0.0"/>
Expand All @@ -20,6 +20,7 @@
<unit id="jakarta.xml.bind" version="2.3.3.v20221112-0806"/>
<unit id="org.antlr.runtime" version="3.2.0.v20220404-1927"/>
<unit id="org.antlr.runtime.source" version="3.2.0.v20220404-1927"/>
<unit id="org.apache.commons.cli" version="0.0.0"/>
<unit id="org.apache.commons.compress" version="0.0.0"/>
<unit id="org.apache.commons.io" version="0.0.0"/>
<unit id="org.apache.commons.lang" version="0.0.0"/>
Expand All @@ -34,7 +35,6 @@
<unit id="javax.activation" version="1.1.0.v201211130549"/>
<unit id="javax.xml.bind" version="0.0.0"/>
<unit id="javax.xml.stream" version="0.0.0"/>
<unit id="org.apache.commons.cli" version="1.2.0.v201404270220"/>
<unit id="org.apache.commons.lang3" version="0.0.0"/>
<unit id="org.apache.derby" version="0.0.0"/>
<unit id="org.json" version="0.0.0"/>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
import java.util.Objects;

import org.apache.commons.cli.Option;
import org.apache.commons.cli.OptionBuilder;
import org.apache.commons.cli.Option.Builder;
import org.eclipse.jdt.annotation.Nullable;

/**
Expand Down Expand Up @@ -86,40 +86,44 @@ private CliOption(String optionShort, @Nullable String optionLong, @Nullable Str
}

Option toCliOption() {
OptionBuilder.withArgName(fArgumentName);
Builder builder = Option.builder(fShortOption);
builder.argName(fArgumentName);
// Number of arguments
if (fMaxArguments == 0) {
// No arguments
OptionBuilder.hasArg(false);
builder.hasArg(false);
} else if (fMaxArguments == 1) {
// 1 argument, optional or mandatory
if (fMinArguments == 0) {
OptionBuilder.hasOptionalArg();
builder.optionalArg(true);
} else {
OptionBuilder.hasArg();
builder.hasArg();
}
builder.numberOfArgs(1);
} else if (fMaxArguments < Integer.MAX_VALUE) {
// Many arguments, optional or mandatory
if (fMinArguments == 0) {
OptionBuilder.hasOptionalArgs(fMaxArguments);
builder.optionalArg(true);
} else {
OptionBuilder.hasArgs(fMaxArguments);
builder.hasArg();
}
builder.numberOfArgs(fMaxArguments);
} else {
// Unbounded number of optional or mandatory arguments
if (fMinArguments == 0) {
OptionBuilder.hasOptionalArgs();
builder.optionalArg(true);
} else {
OptionBuilder.hasArgs();
builder.hasArg();
builder.numberOfArgs(fMinArguments);
}
}
if (fLongOption != null) {
OptionBuilder.withLongOpt(fLongOption);
builder.longOpt(fLongOption);
}
if (fDescription != null) {
OptionBuilder.withDescription(fDescription);
builder.desc(fDescription);
}
return Objects.requireNonNull(OptionBuilder.create(fShortOption));
return Objects.requireNonNull(builder.build());
}

@Override
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,10 @@

import org.apache.commons.cli.CommandLine;
import org.apache.commons.cli.CommandLineParser;
import org.apache.commons.cli.DefaultParser;
import org.apache.commons.cli.HelpFormatter;
import org.apache.commons.cli.Options;
import org.apache.commons.cli.ParseException;
import org.apache.commons.cli.PosixParser;
import org.eclipse.core.runtime.IProgressMonitor;
import org.eclipse.core.runtime.IStatus;
import org.eclipse.core.runtime.Status;
Expand Down Expand Up @@ -121,7 +121,7 @@ public static Collection<ICliParser> getCliParsers() {
if (tcArgs.isEmpty()) {
return null;
}
CommandLineParser cmdLineParser = new PosixParser();
CommandLineParser cmdLineParser = new DefaultParser();
try {
// There may not be one and only one command line, do not keep the
// command line as internal field of this class
Expand Down

0 comments on commit 03b3b83

Please sign in to comment.