Class AttachModulesMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
org.ovirt.maven.plugin.jbossmodules.AttachModulesMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
@Mojo(name="attach-modules",
defaultPhase=PACKAGE,
requiresDependencyCollection=COMPILE)
public class AttachModulesMojo
extends org.apache.maven.plugin.AbstractMojo
This mojo creates a
.zip
file containing the .jar
file of the project and the module.xml
files available in the src/main/modules
directory. This .zip
file is then attached to the project
using zip
as the type and a classifier composed by the optional category
parameter and the
modules
word.-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
Category of the module.private boolean
This is parameter is no longer used, index generation has been removed.private String
The name of the module.The list of modules to generate.private File
The temporary directory where modules will be stored.private String
The slot of the module.private org.apache.maven.project.MavenProject
The maven project.private org.apache.maven.project.MavenProjectHelper
The project helper.Fields inherited from interface org.apache.maven.plugin.Mojo
ROLE
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate void
createModule
(Module module) void
execute()
private String
Computes the name of the archive that contains the modules.private String
Computes the classifier of the archive that contains the modules.Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
project
@Parameter(defaultValue="${project}", readonly=true) private org.apache.maven.project.MavenProject projectThe maven project. -
projectHelper
@Component private org.apache.maven.project.MavenProjectHelper projectHelperThe project helper. -
moduleName
The name of the module. -
moduleSlot
The slot of the module. -
modules
The list of modules to generate. -
generateIndex
@Parameter(property="generateIndex", defaultValue="false") private boolean generateIndexThis is parameter is no longer used, index generation has been removed. -
category
Category of the module. If given the value is added as a prefix to the classifier and to the name of the artifact. For example, if the value iscommon
then the classifier will becommon-modules
and the name of the attached artifact will becommon-modules.zip
. -
modulesDir
The temporary directory where modules will be stored.
-
-
Constructor Details
-
AttachModulesMojo
public AttachModulesMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
makeArchiveName
Computes the name of the archive that contains the modules. It will be final name of the build, followed by the optional category and thenmodules.zip
, with dashes as separators where needed. -
makeClassifier
Computes the classifier of the archive that contains the modules. It will be the optional category followed by the wordmodules
, with a dash as separator if needed. -
createModule
- Throws:
org.apache.maven.plugin.MojoExecutionException
-