public abstract class LauncherCreator extends Object
| Constructor and Description |
|---|
LauncherCreator(org.apache.maven.plugin.AbstractMojo mojo,
File outputDirectory,
String mainClassName,
String applicationName,
String libraryDirectory,
Set<org.apache.maven.artifact.Artifact> transitiveArtifacts,
Set<File> resourceDirectories,
Properties parameterProperties,
String[] systemProperties,
String[] vmArguments,
String[] narClassifierTypes) |
| Modifier and Type | Method and Description |
|---|---|
protected void |
copyFile(File sourceFile,
File destinationDirectory)
Copy a file from its source to a destination directory.
|
protected void |
copyInterpolatedPluginResource(String resourceName,
File outputFile)
Copy a plugin resource to a file, interpolating with the configuration properties
|
protected void |
copyInterpolatedProjectResource(String resourceName,
File outputFile)
Copy a user project resource to a file, interpolating with the configuration properties
|
protected void |
copyPluginResource(String resourceName,
File destinationFile)
Copy a resource from the plugin's resources to a file.
|
protected void |
copyProjectResource(String resourceName,
File destinationFile)
Copy a resource from the user project to a file
|
protected void |
copyTransitiveArtifacts(File destinationDirectory)
Copy all compile-scoped jar-typed transitive artifacts into
a destination directory.
|
abstract void |
createLauncher()
Create a launcher specific to a given platform.
|
protected String |
getApplicationName() |
protected String |
getLibraryDirectory() |
protected String |
getMainClassName() |
protected org.apache.maven.plugin.AbstractMojo |
getMojo() |
protected File |
getOutputDirectory() |
protected Properties |
getParameterProperties() |
protected Set<File> |
getResourceDirectories() |
protected String[] |
getSystemProperties() |
protected Set<org.apache.maven.artifact.Artifact> |
getTransitiveArtifacts() |
protected Set<String> |
getTransitiveJarOrNarArtifactFileNames(Set<org.apache.maven.artifact.Artifact> transitiveArtifacts)
Find all the compile-scoped .jar or .nar artifacts in a set, and ensure
they're returned as .jars ('cos that's what they are).
|
protected String[] |
getVmArguments() |
protected void |
makeExecutable(File nonExecutableFile)
Make a file executable, in the terms of the specific platform.
|
public LauncherCreator(org.apache.maven.plugin.AbstractMojo mojo,
File outputDirectory,
String mainClassName,
String applicationName,
String libraryDirectory,
Set<org.apache.maven.artifact.Artifact> transitiveArtifacts,
Set<File> resourceDirectories,
Properties parameterProperties,
String[] systemProperties,
String[] vmArguments,
String[] narClassifierTypes)
mojo - the parent mojo classoutputDirectory - where to create the .app structuremainClassName - the main classapplicationName - the name of the applicationlibraryDirectory - where the libraries are storedtransitiveArtifacts - the set of transitive artifact dependenciesresourceDirectories - the project's resource directoriesparameterProperties - the plugin configuration parameters, as propertiessystemProperties - an array of name=value system propertiesvmArguments - an array of arguments to the VMnarClassifierTypes - an array of NAR classifier:typesprotected final org.apache.maven.plugin.AbstractMojo getMojo()
protected final Set<org.apache.maven.artifact.Artifact> getTransitiveArtifacts()
protected final File getOutputDirectory()
protected final String getMainClassName()
protected final String getApplicationName()
protected final String getLibraryDirectory()
protected final Set<File> getResourceDirectories()
protected final Properties getParameterProperties()
protected final String[] getSystemProperties()
protected final String[] getVmArguments()
public abstract void createLauncher()
throws IOException
IOException - on creation failureprotected final void copyPluginResource(String resourceName, File destinationFile) throws IOException
resourceName - the name of the resourcedestinationFile - the file to write it toIOException - on write failureprotected final void copyProjectResource(String resourceName, File destinationFile) throws IOException
resourceName - the name of the resource in the user projectdestinationFile - the file to write it toIOException - on write failureprotected Set<String> getTransitiveJarOrNarArtifactFileNames(Set<org.apache.maven.artifact.Artifact> transitiveArtifacts)
transitiveArtifacts - a set of artifactsprotected final void copyFile(File sourceFile, File destinationDirectory) throws IOException
sourceFile - the source filedestinationDirectory - the destination directory, which
must existIOException - on copy failureprotected final void copyTransitiveArtifacts(File destinationDirectory) throws IOException
destinationDirectory - the destination directory, which
must existIOException - on copy failureprotected final void copyInterpolatedProjectResource(String resourceName, File outputFile) throws IOException
resourceName - the name of the resource in the user projectoutputFile - the file to write it toIOException - on write failureprotected final void copyInterpolatedPluginResource(String resourceName, File outputFile) throws IOException
resourceName - the name of the plugin resourceoutputFile - the file to write it toIOException - on write failureprotected final void makeExecutable(File nonExecutableFile)
nonExecutableFile - some file that may not currently be executableCopyright © 2019 DevZendo.org. All rights reserved.