|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
com.xpn.xwiki.tool.xar.UnXarMojo
public class UnXarMojo
Expand a XAR file.
| Field Summary | |
|---|---|
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 PACKAGE_XML. |
protected static String |
FILES_TAG
The name of the tag that marks the list of files in PACKAGE_XML. |
protected static String |
HOOK_CLOSE
Close hook. |
protected static String |
HOOK_OPEN
Open hook. |
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 file in the package when to find general informations. |
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. |
| Fields inherited from interface org.apache.maven.plugin.Mojo |
|---|
ROLE |
| Constructor Summary | |
|---|---|
UnXarMojo()
|
|
| Method Summary | |
|---|---|
void |
execute()
|
protected String[] |
getExcludes()
|
protected String[] |
getIncludes()
|
org.apache.maven.project.MavenProject |
getProject()
|
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)
Unpacks the XAR file (exclude the package.xml file if it exists). |
protected void |
unpackDependentXars(org.apache.maven.artifact.Artifact artifact)
Unpack xar dependencies of the provided artifact. |
protected void |
unpackXarToOutputDirectory(org.apache.maven.artifact.Artifact artifact)
Unpacks A XAR artifacts into the build output directory, along with the project's XAR files. |
| Methods inherited from class org.apache.maven.plugin.AbstractMojo |
|---|
getLog, getPluginContext, setLog, setPluginContext |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected static final String HOOK_OPEN
protected static final String HOOK_CLOSE
protected static final String PACKAGE_XML
protected static final String FILES_TAG
protected static final String FILE_TAG
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
| Constructor Detail |
|---|
public UnXarMojo()
| Method Detail |
|---|
public void execute()
throws org.apache.maven.plugin.MojoExecutionException,
org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected void unpackDependentXars(org.apache.maven.artifact.Artifact artifact)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - error when unpack dependencies.protected String[] getIncludes()
protected String[] getExcludes()
protected void unpack(File file,
File location,
String logName,
boolean overwrite)
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)
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 dependencies
org.apache.maven.artifact.resolver.ArtifactResolutionException - error
org.apache.maven.artifact.resolver.ArtifactNotFoundException - error
org.apache.maven.project.ProjectBuildingException - error
org.apache.maven.project.artifact.InvalidDependencyVersionException - error
protected 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 project
org.apache.maven.artifact.resolver.ArtifactResolutionException - error
org.apache.maven.artifact.resolver.ArtifactNotFoundException - error
org.apache.maven.project.artifact.InvalidDependencyVersionException - error
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||