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.AbstractMojoThis mojo creates a.zipfile containing the.jarfile of the project and themodule.xmlfiles available in thesrc/main/modulesdirectory. This.zipfile is then attached to the project usingzipas the type and a classifier composed by the optionalcategoryparameter and themodulesword.
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringcategoryCategory of the module.private booleangenerateIndexThis is parameter is no longer used, index generation has been removed.private java.lang.StringmoduleNameThe name of the module.private java.util.List<Module>modulesThe list of modules to generate.private java.io.FilemodulesDirThe temporary directory where modules will be stored.private java.lang.StringmoduleSlotThe slot of the module.private org.apache.maven.project.MavenProjectprojectThe maven project.private org.apache.maven.project.MavenProjectHelperprojectHelperThe project helper.
-
Constructor Summary
Constructors Constructor Description AttachModulesMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description private voidcreateModule(Module module)voidexecute()private java.lang.StringmakeArchiveName()Computes the name of the archive that contains the modules.private java.lang.StringmakeClassifier()Computes the classifier of the archive that contains the modules.
-
-
-
Field Detail
-
project
@Parameter(defaultValue="${project}", readonly=true) private org.apache.maven.project.MavenProject projectThe maven project.
-
projectHelper
@Component private org.apache.maven.project.MavenProjectHelper projectHelper
The project helper.
-
moduleName
@Parameter(property="moduleName", required=false) private java.lang.String moduleNameThe name of the module.
-
moduleSlot
@Parameter(property="moduleSlot", required=false, defaultValue="main") private java.lang.String moduleSlotThe slot of the module.
-
modules
@Parameter(property="modules") private java.util.List<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
@Parameter(property="category", defaultValue="") private java.lang.String categoryCategory 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 iscommonthen the classifier will becommon-modulesand the name of the attached artifact will becommon-modules.zip.
-
modulesDir
private java.io.File modulesDir
The temporary directory where modules will be stored.
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
makeArchiveName
private java.lang.String 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
private java.lang.String 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
private void createModule(Module module) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-