public class StartBrokerMojo extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
static String |
DEFAULT_CONNECTOR_PROPERTY_NAME_FORMAT
Default connector property name format.
|
protected org.apache.maven.project.MavenProject |
project
The maven project.
|
Constructor and Description |
---|
StartBrokerMojo() |
Modifier and Type | Method and Description |
---|---|
protected void |
addActiveMQSystemProperties()
Set system properties
|
void |
execute()
Perform the mojo operation, which starts the ActiveMQ broker unless configured to skip it.
|
MavenBrokerManager |
getBrokerManager()
Retrieve the manager used to create and retain the started broker.
|
String |
getConfigUri()
Retrieve the URI used to configure the broker on startup.
|
String |
getConnectorPropertyNameFormat()
Retrieve the format used to generate property names when registering connector URIs.
|
org.apache.maven.project.MavenProject |
getProject()
Retrieve the Maven project for this mojo.
|
Properties |
getSystemProperties()
Retrieve properties to add to the System properties on broker startup.
|
XBeanFileResolver |
getxBeanFileResolver()
Retrieve the XBeanFileResolver used to detect and transform XBean URIs.
|
boolean |
isFork()
Determine if the mojo is configured to fork a broker.
|
boolean |
isSkip()
Determine if the mojo is configured to skip the broker startup.
|
protected void |
registerTransportConnectorUris()
Register all of the broker's transport connector URIs in the Maven project as properties.
|
void |
setBrokerManager(MavenBrokerManager brokerManager)
Set the manager used to create and retain the started broker.
|
void |
setConfigUri(String configUri)
Set the URI used to configure the broker on startup.
|
void |
setConnectorPropertyNameFormat(String connectorPropertyNameFormat)
Set the format used to generate property names when registering connector URIs.
|
void |
setFork(boolean fork)
Configure the mojo to run the broker asynchronously (i.e.
|
void |
setProject(org.apache.maven.project.MavenProject project)
Set the Maven project for this mojo.
|
void |
setSkip(boolean skip)
Configure the mojo to skip or normally execute the broker startup.
|
void |
setSystemProperties(Properties systemProperties)
Set properties to add to the System properties on broker startup.
|
void |
setxBeanFileResolver(XBeanFileResolver xBeanFileResolver)
Set the XBeanFileResolver to use when detecting and transforming XBean URIs.
|
protected MavenBrokerManager |
useBrokerManager()
Use the configured broker manager, if defined; otherwise, use the default broker manager.
|
public static final String DEFAULT_CONNECTOR_PROPERTY_NAME_FORMAT
protected org.apache.maven.project.MavenProject project
public StartBrokerMojo()
public org.apache.maven.project.MavenProject getProject()
public void setProject(org.apache.maven.project.MavenProject project)
project
- the Maven project.public String getConfigUri()
public void setConfigUri(String configUri)
configUri
- the URI used to configure the broker.public boolean isFork()
public void setFork(boolean fork)
fork
- true => start the broker asynchronously; true => start the broker synchronously.public boolean isSkip()
public void setSkip(boolean skip)
skip
- true => the mojo will skip the broker startup; false => the mojo will start the broker normally.public Properties getSystemProperties()
public void setSystemProperties(Properties systemProperties)
systemProperties
- properties to add to the System properties.public String getConnectorPropertyNameFormat()
public void setConnectorPropertyNameFormat(String connectorPropertyNameFormat)
connectorPropertyNameFormat
- the new format to use when generating property names.public MavenBrokerManager getBrokerManager()
public void setBrokerManager(MavenBrokerManager brokerManager)
brokerManager
- the new manager to use.public XBeanFileResolver getxBeanFileResolver()
public void setxBeanFileResolver(XBeanFileResolver xBeanFileResolver)
xBeanFileResolver
- the XBeanFileResolver to use.public void execute() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void addActiveMQSystemProperties()
protected void registerTransportConnectorUris()
protected MavenBrokerManager useBrokerManager()
Copyright © 2005–2019 The Apache Software Foundation. All rights reserved.