• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Ekryd / echo-maven-plugin / 3648

14 Nov 2024 01:38PM CUT coverage: 96.795%. Remained the same
3648

push

circleci

web-flow
Update dependency org.codehaus.mojo:versions-maven-plugin to v2.18.0

302 of 312 relevant lines covered (96.79%)

0.97 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

100.0
/echo/src/main/java/echo/output/EchoOutputWrapper.java
1
package echo.output;
2

3
import echo.parameter.OutputLevelType;
4
import echo.parameter.PluginParameters;
5

6
/** Will echo a message to standard output (in Maven) with the right message level. */
7
public class EchoOutputWrapper {
8
  private final EchoOutput echoOutput;
9
  private final OutputLevelType level;
10

11
  /**
12
   * Creates a new instance of the EchoOutputWrapper class
13
   *
14
   * @param echoOutput the utility class to output to standard output (in Maven)
15
   * @param pluginParameters The user-supplied plugin parameters
16
   */
17
  public EchoOutputWrapper(EchoOutput echoOutput, PluginParameters pluginParameters) {
1✔
18
    this.echoOutput = echoOutput;
1✔
19
    this.level = pluginParameters.getLevel();
1✔
20
  }
1✔
21

22
  /** Echo the content to standard output (in Maven) */
23
  public void output(String content) {
24
    if (content.length() == 0) {
1✔
25
      return;
1✔
26
    }
27

28
    switch (level) {
1✔
29
      case FAIL:
30
        echoOutput.fail(content);
1✔
31
        break;
1✔
32
      case ERROR:
33
        echoOutput.error(content);
1✔
34
        break;
1✔
35
      case WARNING:
36
        echoOutput.warning(content);
1✔
37
        break;
1✔
38
      case INFO:
39
        echoOutput.info(content);
1✔
40
        break;
1✔
41
      case DEBUG:
42
        echoOutput.debug(content);
1✔
43
        break;
44
    }
45
  }
1✔
46
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc