Class SiteDescriptorAttachMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.apache.maven.plugins.site.AbstractSiteMojo
-
- org.apache.maven.plugins.site.descriptor.AbstractSiteDescriptorMojo
-
- org.apache.maven.plugins.site.descriptor.SiteDescriptorAttachMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="attach-descriptor", defaultPhase=PACKAGE, threadSafe=true) public class SiteDescriptorAttachMojo extends AbstractSiteDescriptorMojoAdds the site descriptor (site.xml) to the list of files to be installed/deployed.For Maven-2.x this is enabled by default only when the project has
pompackaging since it will be used by modules inheriting, but this can be enabled for other projects packaging if needed.This default execution has been removed from the built-in lifecycle of Maven 3.x for
pom-projects. Users that actually use those projects to provide a common site descriptor for sub modules will need to explicitly define this goal execution to restore the intended behavior.- Since:
- 2.0
-
-
Field Summary
Fields Modifier and Type Field Description private java.io.Filebasedirprivate booleanpomPackagingOnlyAttach site descriptor only if packaging is pom.private org.apache.maven.project.MavenProjectHelperprojectHelperMaven ProjectHelper.-
Fields inherited from class org.apache.maven.plugins.site.descriptor.AbstractSiteDescriptorMojo
reactorProjects, remoteProjectRepositories, repoSession, siteDirectory
-
Fields inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
i18n, project, siteTool, skip
-
-
Constructor Summary
Constructors Constructor Description SiteDescriptorAttachMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()private static java.lang.StringgetClassifier(java.io.File descriptorFile)-
Methods inherited from class org.apache.maven.plugins.site.descriptor.AbstractSiteDescriptorMojo
prepareSiteModel
-
Methods inherited from class org.apache.maven.plugins.site.AbstractSiteMojo
getLocales
-
-
-
-
Field Detail
-
basedir
@Parameter(property="basedir", required=true, readonly=true) private java.io.File basedir
-
projectHelper
@Component private org.apache.maven.project.MavenProjectHelper projectHelper
Maven ProjectHelper.- Since:
- 2.1.1
-
pomPackagingOnly
@Parameter(defaultValue="true") private boolean pomPackagingOnly
Attach site descriptor only if packaging is pom.- Since:
- 3.0
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getClassifier
private static java.lang.String getClassifier(java.io.File descriptorFile) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
-