Package hudson.maven

Class ExecutedMojo

java.lang.Object
hudson.maven.ExecutedMojo
All Implemented Interfaces:
Serializable

public final class ExecutedMojo extends Object implements Serializable
Persisted record of mojo execution.

This information is first recorded in the maven process, then sent over the remoting layer to the controller, then persisted via XStream.

Author:
Kohsuke Kawaguchi
See Also:
  • Field Details

    • groupId

      public final String groupId
      Plugin group ID.
    • artifactId

      public final String artifactId
      Plugin artifact ID.
    • version

      public final String version
      Plugin version.
    • goal

      public final String goal
      Mojo name.
    • executionId

      public final String executionId
      Optional execution ID, when the same mojo gets executed multiple times.
    • duration

      public final long duration
      How long did it take to execute this goal? in milli-seconds. (precision might not be 1ms)
    • digest

      public final String digest
      MD5 hash of the plugin jar.
  • Constructor Details

    • ExecutedMojo

      public ExecutedMojo(MojoInfo mojo, long duration)
  • Method Details

    • readResolve

      protected Object readResolve()
      Lots of ExecutedMojos tend to have the same groupId, artifactId, etc., so interning them help with memory consumption. TODO: better if XStream has a declarative way of marking fields as "target for intern".
    • getDurationString

      public String getDurationString()
      Returns duration in a human readable text.
    • getReadableExecutionId

      public String getReadableExecutionId()
    • getPluginLink

      public String getPluginLink(ExecutedMojo.Cache c)
      Returns a hyperlink for the plugin name if there's one. Otherwise null.
    • getGoalLink

      public String getGoalLink(ExecutedMojo.Cache c)