mirror of
https://github.com/apache/maven-mvnd.git
synced 2025-09-29 01:21:52 +00:00
Remove plexus-utils and commons-xxx references (#833)
This commit is contained in:
@@ -31,7 +31,6 @@ import org.codehaus.plexus.components.interactivity.InputHandler;
|
||||
import org.codehaus.plexus.components.interactivity.OutputHandler;
|
||||
import org.codehaus.plexus.components.interactivity.Prompter;
|
||||
import org.codehaus.plexus.components.interactivity.PrompterException;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.eclipse.sisu.Priority;
|
||||
import org.eclipse.sisu.Typed;
|
||||
import org.mvndaemon.mvnd.common.Message;
|
||||
@@ -115,7 +114,7 @@ public class DaemonPrompter extends AbstractInputHandler implements Prompter, In
|
||||
} catch (IOException e) {
|
||||
throw new PrompterException("Failed to prompt user", e);
|
||||
}
|
||||
if (StringUtils.isEmpty(line)) {
|
||||
if (line == null || line.isEmpty()) {
|
||||
line = defaultReply;
|
||||
}
|
||||
if (line != null && (possibleValues != null && !possibleValues.contains(line))) {
|
||||
|
@@ -36,7 +36,6 @@ import org.apache.maven.eventspy.EventSpy;
|
||||
import org.apache.maven.execution.ExecutionEvent;
|
||||
import org.apache.maven.execution.MavenSession;
|
||||
import org.apache.maven.plugin.MojoExecution;
|
||||
import org.codehaus.plexus.util.StringUtils;
|
||||
import org.eclipse.sisu.Typed;
|
||||
import org.mvndaemon.mvnd.common.Environment;
|
||||
import org.slf4j.Logger;
|
||||
@@ -196,9 +195,17 @@ public class BuildTimeEventSpy extends AbstractEventSpy {
|
||||
|
||||
public String name() {
|
||||
String name = mojo.getKey();
|
||||
String truncatedName =
|
||||
name.length() >= MAX_NAME_LENGTH ? StringUtils.substring(name, 0, MAX_NAME_LENGTH) : name + " ";
|
||||
return StringUtils.rightPad(truncatedName, MAX_NAME_LENGTH, ".");
|
||||
if (name.length() < MAX_NAME_LENGTH) {
|
||||
StringBuilder sb = new StringBuilder(MAX_NAME_LENGTH);
|
||||
sb.append(name);
|
||||
sb.append(' ');
|
||||
while (sb.length() < MAX_NAME_LENGTH) {
|
||||
sb.append('.');
|
||||
}
|
||||
return sb.toString();
|
||||
} else {
|
||||
return name.substring(0, MAX_NAME_LENGTH);
|
||||
}
|
||||
}
|
||||
|
||||
public long duration() {
|
||||
|
Reference in New Issue
Block a user