@Named
@Singleton
public class JenkinsMavenEventSpy
extends org.apache.maven.eventspy.AbstractEventSpy
EventSpy to capture build details consumed by the Jenkins Pipeline Maven Plugin
and the withMaven(){...} pipeline step.| Modifier and Type | Field and Description |
|---|---|
static String |
DISABLE_MAVEN_EVENT_SPY_ENVIRONMENT_VARIABLE_NAME |
static String |
DISABLE_MAVEN_EVENT_SPY_PROPERTY_NAME |
protected boolean |
disabled |
| Constructor and Description |
|---|
JenkinsMavenEventSpy() |
JenkinsMavenEventSpy(MavenEventReporter reporter) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
List<MavenEventHandler> |
getHandlers() |
MavenEventReporter |
getReporter() |
void |
init(org.apache.maven.eventspy.EventSpy.Context context) |
protected boolean |
isEventSpyDisabled()
Visible for testing
|
void |
onEvent(Object event) |
void |
setHandlers(List<MavenEventHandler> handlers) |
void |
setHandlers(MavenEventHandler... handlers) |
public static final String DISABLE_MAVEN_EVENT_SPY_PROPERTY_NAME
public static final String DISABLE_MAVEN_EVENT_SPY_ENVIRONMENT_VARIABLE_NAME
protected final boolean disabled
public JenkinsMavenEventSpy()
throws IOException
IOExceptionpublic JenkinsMavenEventSpy(MavenEventReporter reporter) throws IOException
IOExceptionpublic void init(org.apache.maven.eventspy.EventSpy.Context context)
throws Exception
init in interface org.apache.maven.eventspy.EventSpyinit in class org.apache.maven.eventspy.AbstractEventSpyExceptionpublic void onEvent(Object event) throws Exception
onEvent in interface org.apache.maven.eventspy.EventSpyonEvent in class org.apache.maven.eventspy.AbstractEventSpyExceptionpublic void close()
close in interface org.apache.maven.eventspy.EventSpyclose in class org.apache.maven.eventspy.AbstractEventSpyprotected boolean isEventSpyDisabled()
public MavenEventReporter getReporter()
public List<MavenEventHandler> getHandlers()
public void setHandlers(List<MavenEventHandler> handlers)
public void setHandlers(MavenEventHandler... handlers)
Copyright © 2016–2018. All rights reserved.