public abstract class AbstractVerifyMojo
extends org.apache.maven.plugin.AbstractMojo
| Modifier and Type | Field and Description |
|---|---|
protected static String |
AUTHOR
Admin author for creator/contentAuthor and author.
|
protected String |
commonsVersion
The Commons version to be used by this mojo.
|
protected String |
defaultLanguage
The language in which non-translated documents are written in.
|
protected String |
encoding
The encoding to use when generating the package summary file and when storing file names.
|
protected String[] |
excludes
List of files to exclude.
|
protected org.apache.maven.artifact.factory.ArtifactFactory |
factory
Used to look up Artifacts in the remote repository.
|
protected static String |
FILE_TAG
The name of the tag that marks a specific file in
link #PACKAGE_XML. |
protected static String |
FILES_TAG
The name of the tag that marks the list of files in
link #PACKAGE_XML. |
protected boolean |
force
If true then don't check if the packaging is XAR before running mojos.
|
protected boolean |
formatLicense
If true then add license header to XML files.
|
protected String[] |
includes
List of files to include.
|
protected org.apache.maven.project.MavenProjectBuilder |
mavenProjectBuilder
Project builder -- builds a model from a pom.xml.
|
protected static String |
PACKAGE_XML
The name of the XAR descriptor file.
|
protected org.apache.maven.project.MavenProject |
project
The maven project.
|
protected List<org.apache.maven.artifact.repository.ArtifactRepository> |
remoteRepos
List of Remote Repositories used by the resolver.
|
protected org.apache.maven.artifact.resolver.ArtifactResolver |
resolver
Used to look up Artifacts in the remote repository.
|
protected static String |
VERSION
First version.
|
| Constructor and Description |
|---|
AbstractVerifyMojo() |
| Modifier and Type | Method and Description |
|---|---|
protected void |
executeLicenseGoal(String goal)
Executes a mojo of the Maven License plugin (used for adding or checking for license headers.
|
protected XWikiDocument |
getDocFromXML(File file)
Load a XWiki document from its XML representation.
|
protected String[] |
getExcludes() |
protected String[] |
getIncludes() |
org.apache.maven.project.MavenProject |
getProject() |
protected File |
getResourcesDirectory() |
protected Collection<File> |
getXARXMLFiles() |
protected String |
getXWikiCommonsVersion() |
protected String |
guessDefaultLanguage(File file,
Collection<File> xwikiXmlFiles)
Guess the
<defaultLanguage> value to use for the passed file using the following algorithm:
If there's no other translation of the file then consider default language to be empty to signify that
it's a technical document. |
protected Set<org.apache.maven.artifact.Artifact> |
resolveArtifactDependencies(org.apache.maven.artifact.Artifact artifact)
This method resolves all transitive dependencies of an artifact.
|
protected Set<org.apache.maven.artifact.Artifact> |
resolveDependencyArtifacts(org.apache.maven.project.MavenProject pomProject) |
protected void |
unpack(File file,
File location,
String logName,
boolean overwrite,
String[] includes,
String[] excludes)
Unpacks the XAR file (exclude the package.xml file if it exists).
|
protected void |
unpackXARToOutputDirectory(org.apache.maven.artifact.Artifact artifact,
String[] includes,
String[] excludes)
Unpacks A XAR artifacts into the build output directory, along with the project's XAR files.
|
getLog, getPluginContext, setLog, setPluginContextprotected static final String AUTHOR
protected static final String VERSION
protected boolean force
protected String defaultLanguage
protected boolean formatLicense
protected String commonsVersion
protected static final String PACKAGE_XML
protected static final String FILES_TAG
link #PACKAGE_XML.protected static final String FILE_TAG
link #PACKAGE_XML.protected String[] includes
protected String[] excludes
protected org.apache.maven.project.MavenProject project
protected String encoding
protected List<org.apache.maven.artifact.repository.ArtifactRepository> remoteRepos
protected org.apache.maven.project.MavenProjectBuilder mavenProjectBuilder
protected org.apache.maven.artifact.factory.ArtifactFactory factory
protected org.apache.maven.artifact.resolver.ArtifactResolver resolver
protected Collection<File> getXARXMLFiles() throws org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoFailureExceptionprotected String guessDefaultLanguage(File file, Collection<File> xwikiXmlFiles)
<defaultLanguage> value to use for the passed file using the following algorithm:
defaultLanguageprotected String getXWikiCommonsVersion()
commons.version property if defined, defaulting to the current project version if not
definedprotected void executeLicenseGoal(String goal) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected String[] getIncludes()
protected String[] getExcludes()
protected void unpack(File file, File location, String logName, boolean overwrite, String[] includes, String[] excludes) throws org.apache.maven.plugin.MojoExecutionException
file - the file to be unpacked.location - the location where to put the unpacket files.logName - the name use with ConsoleLogger.overwrite - indicate if extracted files has to overwrite existing ones.org.apache.maven.plugin.MojoExecutionException - error when unpacking the file.protected void unpackXARToOutputDirectory(org.apache.maven.artifact.Artifact artifact,
String[] includes,
String[] excludes)
throws org.apache.maven.plugin.MojoExecutionException
artifact - the XAR artifact to unpack.org.apache.maven.plugin.MojoExecutionException - in case of unpack errorpublic org.apache.maven.project.MavenProject getProject()
protected Set<org.apache.maven.artifact.Artifact> resolveArtifactDependencies(org.apache.maven.artifact.Artifact artifact) throws org.apache.maven.artifact.resolver.ArtifactResolutionException, org.apache.maven.artifact.resolver.ArtifactNotFoundException, org.apache.maven.project.ProjectBuildingException, org.apache.maven.project.artifact.InvalidDependencyVersionException
artifact - the artifact used to retrieve dependenciesorg.apache.maven.artifact.resolver.ArtifactResolutionException - errororg.apache.maven.artifact.resolver.ArtifactNotFoundException - errororg.apache.maven.project.ProjectBuildingException - errororg.apache.maven.project.artifact.InvalidDependencyVersionException - errorprotected Set<org.apache.maven.artifact.Artifact> resolveDependencyArtifacts(org.apache.maven.project.MavenProject pomProject) throws org.apache.maven.artifact.resolver.ArtifactResolutionException, org.apache.maven.artifact.resolver.ArtifactNotFoundException, org.apache.maven.project.artifact.InvalidDependencyVersionException
pomProject - the projectorg.apache.maven.artifact.resolver.ArtifactResolutionException - errororg.apache.maven.artifact.resolver.ArtifactNotFoundException - errororg.apache.maven.project.artifact.InvalidDependencyVersionException - errorprotected XWikiDocument getDocFromXML(File file)
file - the file to parse.protected File getResourcesDirectory()
Copyright © 2004–2014 XWiki. All rights reserved.