|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.maven.plugin.AbstractMojo
org.codehaus.mojo.webstart.AbstractBaseJnlpMojo
public abstract class AbstractBaseJnlpMojo
The superclass for all JNLP generating MOJOs.
Field Summary | |
---|---|
protected org.codehaus.plexus.archiver.manager.ArchiverManager |
archiverManager
To look up Archiver/UnArchiver implementations |
protected java.lang.String |
libPath
The path where the libraries are placed within the jnlp structure. |
Fields inherited from interface org.apache.maven.plugin.Mojo |
---|
ROLE |
Constructor Summary | |
---|---|
AbstractBaseJnlpMojo()
Creates a new AbstractBaseJnlpMojo . |
Method Summary | |
---|---|
protected boolean |
artifactContainsClass(org.apache.maven.artifact.Artifact artifact,
java.lang.String mainClass)
TODO finish comment |
protected void |
checkPack200()
Confirms that if Pack200 is enabled, the MOJO is being executed in at least a Java 1.5 JVM. |
protected boolean |
copyFileToDirectoryIfNecessary(java.io.File sourceFile,
java.io.File targetDirectory)
Conditionally copy the file into the target directory. |
protected boolean |
copyJarAsUnprocessedToDirectoryIfNecessary(java.io.File sourceFile,
java.io.File targetDirectory)
Conditionally copy the jar file into the target directory. |
protected void |
copyResources(java.io.File resourcesDir,
java.io.File workDirectory)
|
protected java.net.URL |
findDefaultJnlpTemplateURL()
|
protected org.apache.maven.artifact.factory.ArtifactFactory |
getArtifactFactory()
Returns the ArtifactFactory that can be used to create artifacts that need to be retrieved from maven artifact repositories. |
protected org.apache.maven.artifact.resolver.ArtifactResolver |
getArtifactResolver()
Returns the ArtifactResolver that can be used to retrieve artifacts from maven artifact repositories. |
protected java.io.File |
getLibDirectory()
Returns the library directory. |
java.lang.String |
getLibPath()
Returns the library path. |
protected org.apache.maven.artifact.repository.ArtifactRepository |
getLocalRepository()
Returns the local artifact repository. |
protected java.util.List |
getModifiedJnlpArtifacts()
Returns the collection of artifacts that have been modified since the last time this mojo was run. |
abstract org.apache.maven.project.MavenProject |
getProject()
|
protected java.util.List |
getRemoteRepositories()
Returns the collection of remote artifact repositories for the current Maven project. |
protected java.io.File |
getResourcesDirectory()
Returns the location of the directory containing non-jar resources that are to be included in the JNLP bundle. |
protected org.codehaus.mojo.webstart.SignConfig |
getSign()
Returns jar signing configuration element. |
protected java.io.File |
getTemplateDirectory()
Returns the file handle to the directory containing the Velocity templates for the JNLP files to be generated. |
protected java.net.URL |
getWebstartJarURL()
|
protected java.lang.String |
getWebstartJarURLForVelocity()
|
protected java.io.File |
getWorkDirectory()
Returns the working directory. |
protected boolean |
isExcludeTransitive()
Returns the flag that indicates whether or not all transitive dependencies will be excluded from the generated JNLP bundle. |
protected boolean |
isGzip()
Returns the flag that indicates whether or not a gzip should be created for each jar resource. |
boolean |
isPack200()
Returns the flag that indicates whether or not jar resources will be compressed using pack200. |
protected boolean |
isVerbose()
Returns the flag that indicates whether or not to provide verbose output. |
protected boolean |
isVerifyjar()
Returns the flag that indicates whether or not jars should be verified after signing. |
protected void |
makeWorkingDirIfNecessary()
|
protected void |
packJars()
This is to try to workaround an issue with setting setLastModified. |
protected int |
removeExistingSignatures(java.io.File workDirectory,
java.io.FileFilter updatedJarFileFilter)
Removes the signature of the files in the specified directory which satisfy the specified filter. |
protected void |
signOrRenameJars()
If sign is enabled, sign the jars, otherwise rename them into final jars |
protected boolean |
unsignAlreadySignedJars()
|
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 |
Methods inherited from interface org.apache.maven.plugin.Mojo |
---|
execute |
Field Detail |
---|
protected java.lang.String libPath
protected org.codehaus.plexus.archiver.manager.ArchiverManager archiverManager
Constructor Detail |
---|
public AbstractBaseJnlpMojo()
AbstractBaseJnlpMojo
.
Method Detail |
---|
protected void makeWorkingDirIfNecessary() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
public abstract org.apache.maven.project.MavenProject getProject()
protected java.io.File getWorkDirectory()
protected java.io.File getLibDirectory()
public java.lang.String getLibPath()
null
.
null
if not configured.protected java.io.File getResourcesDirectory()
protected java.io.File getTemplateDirectory()
protected org.apache.maven.artifact.factory.ArtifactFactory getArtifactFactory()
protected org.apache.maven.artifact.resolver.ArtifactResolver getArtifactResolver()
protected org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
protected java.util.List getRemoteRepositories()
public boolean isPack200()
protected org.codehaus.mojo.webstart.SignConfig getSign()
protected boolean isGzip()
protected boolean isVerbose()
protected boolean isVerifyjar()
protected boolean isExcludeTransitive()
protected java.util.List getModifiedJnlpArtifacts()
protected void checkPack200() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void copyResources(java.io.File resourcesDir, java.io.File workDirectory) throws java.io.IOException
java.io.IOException
protected boolean copyFileToDirectoryIfNecessary(java.io.File sourceFile, java.io.File targetDirectory) throws java.io.IOException
sourceFile
name.
true
when the file was copied, false
otherwise.
java.lang.IllegalArgumentException
- if sourceFile is null
or
sourceFile.getName()
is null
java.io.IOException
- if an error occurs attempting to copy the file.protected boolean copyJarAsUnprocessedToDirectoryIfNecessary(java.io.File sourceFile, java.io.File targetDirectory) throws java.io.IOException
sourceFile
name.E
The unsigned target file name is taken from the sourceFile
name prefixed with UNPROCESSED_PREFIX.
TODO this is confusing if the sourceFile is already signed. By unsigned we really mean 'unsignedbyus'
true
when the file was copied, false
otherwise.
java.lang.IllegalArgumentException
- if sourceFile is null
or
sourceFile.getName()
is null
java.io.IOException
- if an error occurs attempting to copy the file.protected void signOrRenameJars() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException
org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoFailureException
protected java.net.URL findDefaultJnlpTemplateURL()
protected java.net.URL getWebstartJarURL()
protected java.lang.String getWebstartJarURLForVelocity()
protected int removeExistingSignatures(java.io.File workDirectory, java.io.FileFilter updatedJarFileFilter) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected void packJars()
protected boolean artifactContainsClass(org.apache.maven.artifact.Artifact artifact, java.lang.String mainClass) throws java.net.MalformedURLException
artifact
- mainClass
-
java.net.MalformedURLException
protected boolean unsignAlreadySignedJars()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |