Robert Munteanu created SLING-8972:
--------------------------------------
Summary: Self-explanatory message when the module name and Jira
version name do not match
Key: SLING-8972
URL: https://issues.apache.org/jira/browse/SLING-8972
Project: Sling
Issue Type: Improvement
Components: Build and Source Control
Reporter: Robert Munteanu
Fix For: Committer CLI 1.0.0
When the committer CLI does not find a matching Jira release for the module
name it fails with slightly cryptic error message (see below). We should
explain to the user what is wrong, e.g. "Unable to match release with a Jira
version - did not find a Jira version matching ${MODULE_NAME} ${VERSION}"
{noformat}java.lang.IllegalArgumentException: No version found with name
Default
POST Servlets 2.3.34
at
org.apache.sling.cli.impl.jira.VersionClient.lambda$find$1(VersionClient.java:84)
at java.base/java.util.Optional.orElseThrow(Unknown Source)
at
org.apache.sling.cli.impl.jira.VersionClient.find(VersionClient.java:84)
at
org.apache.sling.cli.impl.release.PrepareVoteEmailCommand.lambda$run$0(PrepareVoteEmailCommand.java:116)
at
java.base/java.util.stream.ReferencePipeline$3$1.accept(Unknown Source)
at java.base/java.util.Iterator.forEachRemaining(Unknown Source)
at
java.base/java.util.Spliterators$IteratorSpliterator.forEachRemaining(Unknown
Source)
at java.base/java.util.stream.AbstractPipeline.copyInto(Unknown
Source)
at
java.base/java.util.stream.AbstractPipeline.wrapAndCopyInto(Unknown Source)
at
java.base/java.util.stream.ReduceOps$ReduceOp.evaluateSequential(Unknown
Source)
at java.base/java.util.stream.AbstractPipeline.evaluate(Unknown
Source)
at java.base/java.util.stream.ReferencePipeline.collect(Unknown
Source)
at
org.apache.sling.cli.impl.release.PrepareVoteEmailCommand.run(PrepareVoteEmailCommand.java:117)
at picocli.CommandLine.executeUserObject(CommandLine.java:1687)
at picocli.CommandLine.access$900(CommandLine.java:146)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2059)
at picocli.CommandLine$RunLast.handle(CommandLine.java:2026)
at
picocli.CommandLine$AbstractParseResultHandler.execute(CommandLine.java:1893)
at picocli.CommandLine.execute(CommandLine.java:1822)
at
org.apache.sling.cli.impl.CommandProcessor.runCommand(CommandProcessor.java:110)
at
org.apache.sling.cli.impl.ExecutionTrigger.lambda$activate$0(ExecutionTrigger.java:33)
at java.base/java.lang.Thread.run(Unknown Source)
{noformat}
--
This message was sent by Atlassian Jira
(v8.3.4#803005)