Class PackageServerMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled, org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
ApplicationImageMojo
Additional deployments can also be resolved from the dependencies. Use the <included-dependencies/>,
<excluded-dependencies/>, <included-dependency-scope/> and/or <excluded-dependency-scope/>
to deploy additional artifacts to the packaged server.
Note the <included-dependencies/>, <excluded-dependencies/>, included-dependency-scope and
<excluded-ependency-scope/> configuration properties are chained together and all checks must pass to be
included as additional deployments.
- Since:
- 3.0
- Author:
- jfdenise
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected org.jboss.galleon.universe.maven.repo.MavenRepoManagerstatic final StringDeprecated, for removal: This API element is subject to removal in a future version.protected booleanPackage the provisioned server into a WildFly Bootable JAR.protected StringWhenbootable-jaris set to true, use this parameter to name the generated jar file.static final StringDeprecated, for removal: This API element is subject to removal in a future version.protected StringThe path to the directory where to provision the server.protected StringDeprecated.protected booleanSkip deploying the deployments after the server is provisioned (falseby default).Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprotected org.jboss.galleon.api.config.GalleonProvisioningConfigbuildGalleonConfig(org.jboss.galleon.api.GalleonBuilder pm) voidcopyExtraContent(Path target) protected voidvoidexecute()protected org.jboss.galleon.api.config.GalleonProvisioningConfigprotected Pathprotected StringReturn the file name of the deployment to put in the server deployment directoryprotected StringgetGoal()protected StringgetProvisionedConfigurationFileName(String layersConfigurationFileName) protected voidserverProvisioned(Path jbossHome) Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
JAR
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
BOOTABLE_JAR_NAME_RADICAL
Deprecated, for removal: This API element is subject to removal in a future version.- See Also:
-
runtimeName
@Deprecated(since="4.1.O") @Parameter(property="wildfly.deployment.runtime.name", alias="runtime-name") protected String runtimeNameDeprecated.use thenameproperty instead to change the name of the deployment.The runtime name for the deployment.When the deployment is copied to the server, it is renamed with the
runtime-name. If bothnameandruntime-nameare specified,runtime-nameis used. -
skipDeployment
@Parameter(defaultValue="false", property="wildfly.package.deployment.skip") protected boolean skipDeploymentSkip deploying the deployments after the server is provisioned (falseby default). -
bootableJar
@Parameter(alias="bootable-jar", required=false, property="wildfly.bootable.jar") protected boolean bootableJarPackage the provisioned server into a WildFly Bootable JAR. In order to produce a hollow jar (a jar that doesn't contain a deployment) set the { @code skipDeployment } parameter.Note that the produced fat JAR is ignored when running the
dev,startorrungoals.- Since:
- 5.0
-
bootableJarName
@Parameter(alias="bootable-jar-name", property="wildfly.bootable.jar.name", defaultValue="${project.artifactId}-bootable.jar") protected String bootableJarNameWhenbootable-jaris set to true, use this parameter to name the generated jar file.Note that since 5.1 the default name changed from
server-bootable.jarto${project.artifactId}-bootable.jar.- Since:
- 5.0
-
provisioningDir
@Parameter(alias="provisioning-dir", property="wildfly.provisioning.dir", defaultValue="server") protected String provisioningDirThe path to the directory where to provision the server. Can be an absolute path or a path relative to the buildDir. By default the server is provisioned into thetarget/serverdirectory. -
artifactResolver
protected org.jboss.galleon.universe.maven.repo.MavenRepoManager artifactResolver
-
-
Constructor Details
-
PackageServerMojo
public PackageServerMojo()
-
-
Method Details
-
getDefaultConfig
protected org.jboss.galleon.api.config.GalleonProvisioningConfig getDefaultConfig() throws org.jboss.galleon.ProvisioningException- Throws:
org.jboss.galleon.ProvisioningException
-
buildGalleonConfig
protected org.jboss.galleon.api.config.GalleonProvisioningConfig buildGalleonConfig(org.jboss.galleon.api.GalleonBuilder pm) throws org.apache.maven.plugin.MojoExecutionException, org.jboss.galleon.ProvisioningException - Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.jboss.galleon.ProvisioningException
-
getGoal
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Specified by:
executein interfaceorg.apache.maven.plugin.Mojo- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
serverProvisioned
protected void serverProvisioned(Path jbossHome) throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException - Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
getDeploymentTargetName
Return the file name of the deployment to put in the server deployment directory- Throws:
org.apache.maven.plugin.MojoExecutionException
-
copyExtraContent
public void copyExtraContent(Path target) throws org.apache.maven.plugin.MojoExecutionException, IOException - Throws:
org.apache.maven.plugin.MojoExecutionExceptionIOException
-
getDeploymentContent
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getProvisionedConfigurationFileName
-
enrichRepositories
protected void enrichRepositories() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
nameproperty instead to change the name of the deployment.