CPD Results
The following document contains the results of PMD's CPD 7.14.0.
Duplications
| File | Line |
|---|---|
| org/apache/maven/cling/invoker/mvnenc/EncryptInvoker.java | 86 |
| org/apache/maven/cling/invoker/mvnup/UpgradeInvoker.java | 85 |
return badGoalsErrorMessage("No goal or multiple goals specified, specify only one goal.", context);
}
String goalName = context.options().goals().get().get(0);
Goal goal = context.goals.get(goalName);
if (goal == null) {
return badGoalsErrorMessage("Unknown goal: " + goalName, context);
}
return goal.execute(context);
} catch (InterruptedException | InterruptedIOException | UserInterruptException e) {
context.logger.error("Goal canceled by user.");
return CANCELED;
} catch (Exception e) {
if (context.options().showErrors().orElse(false)) {
context.logger.error(e.getMessage(), e);
} else {
context.logger.error(e.getMessage());
}
return ERROR;
}
}
protected int badGoalsErrorMessage(String message, EncryptContext context) { | |


