@Component(role=PrototypeHelper.class, hint="default") public class DefaultPrototypeHelper extends Object implements PrototypeHelper
| Modifier and Type | Field and Description |
|---|---|
protected org.apache.maven.archetype.Archetype |
archetype |
protected org.codehaus.plexus.archiver.manager.ArchiverManager |
archiverManager |
protected org.apache.maven.artifact.repository.ArtifactRepositoryFactory |
artifactRepositoryFactory |
protected org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout |
defaultArtifactRepositoryLayout |
protected org.codehaus.plexus.components.interactivity.Prompter |
prompter |
static String |
ROLE_HINT |
ROLE| Constructor and Description |
|---|
DefaultPrototypeHelper() |
| Modifier and Type | Method and Description |
|---|---|
protected int |
executeCommandLine(String... args) |
void |
extractTempPom()
Puts temporary pom in the system temp directory.
|
void |
filterTempPom(String groupId,
String artifactId,
String packaging,
String version)
Executes the
install-file goal with the new pom against the artifact file. |
org.apache.maven.plugin.AbstractMojo |
getCaller() |
protected String |
getTempPomPath()
Temporary POM location
|
void |
installArtifact(File artifact,
File sources,
File mavenHome,
String groupId,
String artifactId,
String version,
String repositoryId)
Executes the
install-file goal with the new pom against the artifact file. |
protected void |
logUnpack(File file,
File location,
String includes,
String excludes) |
protected void |
pack(File file,
File location,
String includes,
String excludes)
Packs a jar
|
File |
repack(File file,
String artifactId)
Handles repacking of the war as a jar file with classes, etc...
|
void |
setCaller(org.apache.maven.plugin.AbstractMojo caller) |
protected void |
unpack(File file,
File location,
String includes,
String excludes)
Unpacks the archive file.
|
protected File |
zipSourcesIfRequired(File sources) |
public static final String ROLE_HINT
@Requirement protected org.apache.maven.archetype.Archetype archetype
@Requirement protected org.codehaus.plexus.components.interactivity.Prompter prompter
@Requirement protected org.apache.maven.artifact.repository.ArtifactRepositoryFactory artifactRepositoryFactory
@Requirement(role=org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout.class,
hint="default")
protected org.apache.maven.artifact.repository.layout.ArtifactRepositoryLayout defaultArtifactRepositoryLayout
@Requirement protected org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
protected int executeCommandLine(String... args) throws org.apache.commons.exec.ExecuteException, IOException
org.apache.commons.exec.ExecuteExceptionIOExceptionpublic File repack(File file, String artifactId) throws org.apache.maven.plugin.MojoExecutionException
repack in interface PrototypeHelperfile - is the war file to repackageFile instance of the repacked jarorg.apache.maven.plugin.MojoExecutionExceptionprotected void unpack(File file, File location, String includes, String excludes) throws org.apache.maven.plugin.MojoExecutionException
file - File to be unpacked.location - Location where to put the unpacked files.includes - Comma separated list of file patterns to include i.e. **/.xml,
**/*.propertiesexcludes - Comma separated list of file patterns to exclude i.e. **/*.xml,
**/*.propertiesorg.apache.maven.plugin.MojoExecutionExceptionprotected void pack(File file, File location, String includes, String excludes) throws org.apache.maven.plugin.MojoExecutionException
file - Destination file.location - Directory source.includes - Comma separated list of file patterns to include i.e. **/.xml,
**/*.propertiesexcludes - Comma separated list of file patterns to exclude i.e. **/*.xml,
**/*.propertiesorg.apache.maven.plugin.MojoExecutionExceptionpublic void installArtifact(File artifact, File sources, File mavenHome, String groupId, String artifactId, String version, String repositoryId) throws org.apache.maven.plugin.MojoExecutionException
install-file goal with the new pom against the artifact file.installArtifact in interface PrototypeHelperartifact - File instance to installorg.apache.maven.plugin.MojoExecutionExceptionpublic void filterTempPom(String groupId, String artifactId, String packaging, String version) throws org.apache.maven.plugin.MojoExecutionException
install-file goal with the new pom against the artifact file.org.apache.maven.plugin.MojoExecutionExceptionprotected String getTempPomPath()
public void extractTempPom()
throws org.apache.maven.plugin.MojoExecutionException
extractTempPom in interface PrototypeHelperorg.apache.maven.plugin.MojoExecutionExceptionpublic void setCaller(org.apache.maven.plugin.AbstractMojo caller)
setCaller in interface PrototypeHelperpublic org.apache.maven.plugin.AbstractMojo getCaller()
getCaller in interface PrototypeHelperCopyright © 2013 Kualigan. All Rights Reserved.