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:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ExecutedMojo.Cache
Used during the HTML rendering to cache the index.
-
Field Summary
Fields Modifier and Type Field Description String
artifactId
Plugin artifact ID.String
digest
MD5 hash of the plugin jar.long
duration
How long did it take to execute this goal? in milli-seconds.String
executionId
Optional execution ID, when the same mojo gets executed multiple times.String
goal
Mojo name.String
groupId
Plugin group ID.String
version
Plugin version.
-
Constructor Summary
Constructors Constructor Description ExecutedMojo(MojoInfo mojo, long duration)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description String
getDurationString()
Returns duration in a human readable text.String
getGoalLink(ExecutedMojo.Cache c)
String
getPluginLink(ExecutedMojo.Cache c)
Returns a hyperlink for the plugin name if there's one.String
getReadableExecutionId()
protected Object
readResolve()
Lots ofExecutedMojo
s tend to have the same groupId, artifactId, etc., so interning them help with memory consumption.
-
-
-
Field Detail
-
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 Detail
-
ExecutedMojo
public ExecutedMojo(MojoInfo mojo, long duration)
-
-
Method Detail
-
readResolve
protected Object readResolve()
Lots ofExecutedMojo
s 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)
-
-