|
||||||||||
| 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 | |
|---|---|
static String |
JAR_SUFFIX
|
protected 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,
String mainClass)
Tests if the given fully qualified name exists in the given artifact. |
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(File sourceFile,
File targetDirectory)
Conditionally copy the file into the target directory. |
protected boolean |
copyJarAsUnprocessedToDirectoryIfNecessary(File sourceFile,
File targetDirectory)
Conditionally copy the jar file into the target directory. |
protected void |
copyResources(File resourcesDir,
File workDirectory)
|
protected URL |
findDefaultJnlpExtensionTemplateURL()
|
protected 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 String |
getCodebase()
Returns the code base to inject in the generated jnlp. |
String |
getEncoding()
|
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 |
getModifiedJnlpArtifacts()
Returns the collection of artifacts that have been modified since the last time this mojo was run. |
protected Pack200Tool |
getPack200Tool()
|
abstract org.apache.maven.project.MavenProject |
getProject()
|
protected List |
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 URL |
getWebstartJarURL()
|
protected String |
getWebstartJarURLForVelocity()
|
protected File |
getWorkDirectory()
Returns the working directory. |
protected boolean |
isAttachArchive()
Returns the flag indicates whether or not archive must be deployed. |
protected boolean |
isCanUnsign()
|
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)
|
protected boolean |
isMakeArchive()
Returns the flag indicates whether or not archive must be build. |
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()
|
protected void |
signOrRenameJars()
If sign is enabled, sign the jars, otherwise rename them into final jars |
protected boolean |
unsignAlreadySignedJars()
|
protected void |
verboseLog(String msg)
Log as info when verbose or info is enabled, as debug otherwise. |
| 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 |
|---|
public static final String JAR_SUFFIX
protected String libPath
| Constructor Detail |
|---|
public AbstractBaseJnlpMojo()
AbstractBaseJnlpMojo.
| Method Detail |
|---|
public abstract org.apache.maven.project.MavenProject getProject()
public String getLibPath()
null.
null if not configured.public boolean isPack200()
protected void makeWorkingDirIfNecessary()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected File getWorkDirectory()
protected File getLibDirectory()
protected File getResourcesDirectory()
protected 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 List getRemoteRepositories()
protected SignConfig getSign()
protected String getCodebase()
protected boolean isGzip()
protected boolean isVerbose()
protected boolean isVerifyjar()
protected boolean isExcludeTransitive()
protected boolean isMakeArchive()
protected boolean isAttachArchive()
protected boolean isCanUnsign()
protected List getModifiedJnlpArtifacts()
public String getEncoding()
protected void checkPack200()
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionException - if can not foind pack200 tool or jdk is before 5.0
protected void copyResources(File resourcesDir,
File workDirectory)
throws IOException
IOException
protected boolean copyFileToDirectoryIfNecessary(File sourceFile,
File targetDirectory)
throws IOException
sourceFile name.
sourceFile - source file to copytargetDirectory - location of the target directory where to copy file
true when the file was copied, false otherwise.
IllegalArgumentException - if sourceFile is null or
sourceFile.getName() is null
IOException - if an error occurs attempting to copy the file.
protected boolean copyJarAsUnprocessedToDirectoryIfNecessary(File sourceFile,
File targetDirectory)
throws 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'
sourceFile - source file to copytargetDirectory - location of the target directory where to copy file
true when the file was copied, false otherwise.
IllegalArgumentException - if sourceFile is null or
sourceFile.getName() is null
IOException - 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 URL findDefaultJnlpTemplateURL()
protected URL findDefaultJnlpExtensionTemplateURL()
protected URL getWebstartJarURL()
protected String getWebstartJarURLForVelocity()
protected boolean isJarSigned(File jarFile)
throws org.apache.maven.plugin.MojoExecutionException
org.apache.maven.plugin.MojoExecutionExceptionprotected void packJars()
protected boolean artifactContainsClass(org.apache.maven.artifact.Artifact artifact,
String mainClass)
throws MalformedURLException
artifact - artifact to testmainClass - the fully qualified name to find in artifact
true if given artifact contains the given fqn, false otherwise
MalformedURLException - if artifact file url is mal formedprotected boolean unsignAlreadySignedJars()
protected Pack200Tool getPack200Tool()
protected void verboseLog(String msg)
msg - the message to display
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||