public abstract class AbstractBaseJnlpMojo
extends org.apache.maven.plugin.AbstractMojo
Modifier and Type | Field and Description |
---|---|
static String |
JAR_SUFFIX
Suffix extension of a jar file.
|
protected String |
libPath
The path where the libraries are placed within the jnlp structure.
|
Constructor and Description |
---|
AbstractBaseJnlpMojo()
Creates a new
AbstractBaseJnlpMojo . |
Modifier and Type | Method and Description |
---|---|
protected void |
checkDependencyFilenameStrategy() |
protected boolean |
copyJarAsUnprocessedToDirectoryIfNecessary(File sourceFile,
File targetDirectory,
String targetFilename)
Conditionally copy the jar file into the target directory.
|
protected URL |
findDefaultTemplateURL(JnlpFileType fileType) |
protected ArtifactUtil |
getArtifactUtil() |
protected String |
getCodebase()
Returns the code base to inject in the generated jnlp.
|
protected DependencyFilenameStrategy |
getDependencyFilenameStrategy() |
protected String |
getEncoding() |
protected IOUtil |
getIoUtil() |
protected File |
getLibDirectory()
Returns the library directory.
|
String |
getLibPath()
Returns the library path.
|
protected org.apache.maven.artifact.repository.ArtifactRepository |
getLocalRepository()
Returns the local artifact repository.
|
protected List<String> |
getModifiedJnlpArtifacts()
Returns the collection of artifacts that have been modified
since the last time this mojo was run.
|
List<String> |
getPack200PassFiles()
Returns the files to be passed without pack200 compression.
|
protected Pack200Tool |
getPack200Tool() |
abstract org.apache.maven.project.MavenProject |
getProject() |
protected List<org.apache.maven.artifact.repository.ArtifactRepository> |
getRemoteRepositories()
Returns the collection of remote artifact repositories for the current
Maven project.
|
protected File |
getResourcesDirectory()
Returns the location of the directory containing
non-jar resources that are to be included in the JNLP bundle.
|
protected SignConfig |
getSign()
Returns jar signing configuration element.
|
protected File |
getTemplateDirectory()
Returns the file handle to the directory containing the Velocity templates for the JNLP
files to be generated.
|
protected String |
getWebstartJarURLForVelocity() |
protected 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.
|
protected boolean |
isJarSigned(File jarFile) |
boolean |
isPack200()
Returns the flag that indicates whether or not jar resources
will be compressed using pack200.
|
protected boolean |
isUseUniqueVersions() |
protected boolean |
isVerbose()
Returns the flag that indicates whether or not to provide verbose output.
|
protected void |
pack200Jars(File directory,
FileFilter filter) |
protected void |
signOrRenameJars()
If sign is enabled, sign the jars, otherwise rename them into final jars
|
protected void |
verboseLog(String msg)
Log as info when verbose or info is enabled, as debug otherwise.
|
getLog, getPluginContext, setLog, setPluginContext
public static final String JAR_SUFFIX
@Parameter(property="jnlp.libPath", defaultValue="") protected String libPath
public AbstractBaseJnlpMojo()
AbstractBaseJnlpMojo
.public abstract org.apache.maven.project.MavenProject getProject()
public String getLibPath()
null
.null
if not configured.public boolean isPack200()
public List<String> getPack200PassFiles()
protected File getWorkDirectory()
protected File getLibDirectory()
protected File getResourcesDirectory()
protected File getTemplateDirectory()
protected org.apache.maven.artifact.repository.ArtifactRepository getLocalRepository()
protected List<org.apache.maven.artifact.repository.ArtifactRepository> getRemoteRepositories()
protected SignConfig getSign()
protected String getCodebase()
protected boolean isGzip()
protected boolean isVerbose()
protected boolean isExcludeTransitive()
protected List<String> getModifiedJnlpArtifacts()
protected String getEncoding()
protected DependencyFilenameStrategy getDependencyFilenameStrategy()
protected boolean isUseUniqueVersions()
protected void checkDependencyFilenameStrategy() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected boolean copyJarAsUnprocessedToDirectoryIfNecessary(File sourceFile, File targetDirectory, String targetFilename) throws org.apache.maven.plugin.MojoExecutionException
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'sourceFile
- source file to copytargetDirectory
- location of the target directory where to copy filetargetFilename
- [optional] to change the target filename to use (if null
will
use the sourceFile name).true
when the file was copied, false
otherwise.IllegalArgumentException
- if sourceFile is null
or
sourceFile.getName()
is null
org.apache.maven.plugin.MojoExecutionException
- if an error occurs attempting to copy the file.protected void signOrRenameJars() throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
- if can not sign or rename jarsprotected void pack200Jars(File directory, FileFilter filter) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected URL findDefaultTemplateURL(JnlpFileType fileType)
protected String getWebstartJarURLForVelocity()
protected boolean isJarSigned(File jarFile) throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException
protected ArtifactUtil getArtifactUtil()
protected IOUtil getIoUtil()
protected Pack200Tool getPack200Tool()
protected void verboseLog(String msg)
msg
- the message to displayCopyright © 2005–2016 MojoHaus. All rights reserved.