public abstract class AbstractHpiMojo extends AbstractJenkinsMojo
Modifier and Type | Field and Description |
---|---|
protected org.codehaus.plexus.archiver.manager.ArchiverManager |
archiverManager
To look up Archiver/UnArchiver implementations
|
protected java.lang.String |
globalMaskClasses
Like the maskClasses parameter, but it applies at the boundary between core and
all the plugins.
|
protected org.apache.maven.artifact.repository.ArtifactRepository |
localRepository |
protected java.lang.String |
maskClasses
[ws|tab|CR|LF]+ separated list of package prefixes that your plugin doesn't want to see
from the core.
|
protected java.lang.String |
outputDirectory
The directory for the generated WAR.
|
protected java.lang.String |
pluginName
Name of the plugin that Jenkins uses for display purpose.
|
protected org.apache.maven.project.MavenProjectBuilder |
projectBuilder |
protected java.io.File |
warSourceDirectory
Single directory for extra files to include in the WAR.
|
jenkinsCoreId, project
Constructor and Description |
---|
AbstractHpiMojo() |
Modifier and Type | Method and Description |
---|---|
void |
buildExplodedWebapp(java.io.File webappDirectory) |
void |
buildWebapp(org.apache.maven.project.MavenProject project,
java.io.File webappDirectory)
Builds the webapp for the specified project.
|
void |
copyResources(java.io.File sourceDirectory,
java.io.File webappDirectory)
Copies webapp webResources from the specified directory.
|
void |
copyResources(org.apache.maven.model.Resource resource,
java.io.File webappDirectory,
java.util.Properties filterProperties)
Copies webapp webResources from the specified directory.
|
java.io.File |
getClassesDirectory() |
java.io.File |
getContainerConfigXML() |
protected java.lang.String[] |
getDependentWarExcludes()
Returns a string array of the excludes to be used
when adding dependent wars as an overlay onto this war.
|
protected java.lang.String[] |
getDependentWarIncludes()
Returns a string array of the includes to be used
when adding dependent wars as an overlay onto this war.
|
java.util.Set<MavenArtifact> |
getDirectDependencyArtfacts()
Returns all just the direct dependencies.
|
protected java.lang.String[] |
getExcludes()
Returns a string array of the excludes to be used
when assembling/copying the war.
|
protected java.lang.String[] |
getIncludes()
Returns a string array of the includes to be used
when assembling/copying the war.
|
java.util.Set<MavenArtifact> |
getProjectArtfacts()
Returns all the transitive dependencies.
|
java.io.File |
getWebappDirectory() |
protected java.lang.Boolean |
isSupportDynamicLoading()
Is the dynamic loading supported?
False, if the answer is known to be "No".
|
protected void |
setAttributes(org.codehaus.plexus.archiver.jar.Manifest.Section mainSection) |
void |
setClassesDirectory(java.io.File classesDirectory) |
void |
setContainerConfigXML(java.io.File containerConfigXML) |
void |
setWarSourceDirectory(java.io.File warSourceDirectory) |
void |
setWebappDirectory(java.io.File webappDirectory) |
protected MavenArtifact |
wrap(org.apache.maven.artifact.Artifact a) |
protected java.util.Set<MavenArtifact> |
wrap(java.lang.Iterable<org.apache.maven.artifact.Artifact> artifacts) |
findJenkinsVersion
getLog, getPluginContext, setLog, setPluginContext
protected java.lang.String outputDirectory
protected java.lang.String pluginName
protected java.io.File warSourceDirectory
protected org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
protected java.lang.String maskClasses
Tokens in this list is prefix-matched against the fully-qualified class name, so add "." to the end of each package name, like "com.foo. com.bar."
protected java.lang.String globalMaskClasses
This mechanism is intended for those plugins that bring JavaEE APIs (such as the database plugin, which brings in the JPA API.) Other plugins that depend on the database plugin can still see the JPA API through the container classloader, so to make them all resolve to the JPA API in the database plugin, the database plugin needs to rely on this mechanism.
protected org.apache.maven.project.MavenProjectBuilder projectBuilder
protected org.apache.maven.artifact.repository.ArtifactRepository localRepository
public java.io.File getClassesDirectory()
public void setClassesDirectory(java.io.File classesDirectory)
public java.io.File getWebappDirectory()
public void setWebappDirectory(java.io.File webappDirectory)
public void setWarSourceDirectory(java.io.File warSourceDirectory)
public java.io.File getContainerConfigXML()
public void setContainerConfigXML(java.io.File containerConfigXML)
protected java.lang.String[] getExcludes()
protected java.lang.String[] getIncludes()
protected java.lang.String[] getDependentWarExcludes()
protected java.lang.String[] getDependentWarIncludes()
public void buildExplodedWebapp(java.io.File webappDirectory) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public void copyResources(org.apache.maven.model.Resource resource, java.io.File webappDirectory, java.util.Properties filterProperties) throws java.io.IOException
resource
- the resource to copywebappDirectory
- the target directoryfilterProperties
- java.io.IOException
- if an error occurred while copying webResourcespublic void copyResources(java.io.File sourceDirectory, java.io.File webappDirectory) throws java.io.IOException
sourceDirectory
- the source directorywebappDirectory
- the target directoryjava.io.IOException
- if an error occurred while copying webResourcespublic java.util.Set<MavenArtifact> getProjectArtfacts()
public java.util.Set<MavenArtifact> getDirectDependencyArtfacts()
protected java.util.Set<MavenArtifact> wrap(java.lang.Iterable<org.apache.maven.artifact.Artifact> artifacts)
protected MavenArtifact wrap(org.apache.maven.artifact.Artifact a)
public void buildWebapp(org.apache.maven.project.MavenProject project, java.io.File webappDirectory) throws org.apache.maven.plugin.MojoExecutionException, java.io.IOException
project
- the maven projectwebappDirectory
- java.io.IOException
- if an error occurred while building the webapporg.apache.maven.plugin.MojoExecutionException
protected void setAttributes(org.codehaus.plexus.archiver.jar.Manifest.Section mainSection) throws org.apache.maven.plugin.MojoExecutionException, org.codehaus.plexus.archiver.jar.ManifestException, java.io.IOException
org.apache.maven.plugin.MojoExecutionException
org.codehaus.plexus.archiver.jar.ManifestException
java.io.IOException
protected java.lang.Boolean isSupportDynamicLoading() throws java.io.IOException
java.io.IOException
Copyright © 2013. All Rights Reserved.