Package org.moditect.mavenplugin.image
Class CreateRuntimeImageMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.moditect.mavenplugin.image.CreateRuntimeImageMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="create-runtime-image", defaultPhase=PACKAGE, requiresDependencyResolution=COMPILE_PLUS_RUNTIME, threadSafe=true) public class CreateRuntimeImageMojo extends org.apache.maven.plugin.AbstractMojo
-
-
Field Summary
Fields Modifier and Type Field Description private java.lang.StringbaseJdkprivate booleanbindServicesprivate java.lang.Stringcompression(package private) java.util.List<java.lang.String>excludedResourcesprivate booleanignoreSigningInformationprivate JarInclusionPolicyjarInclusionPolicyprivate Launcherlauncherprivate org.apache.maven.execution.MavenSessionmavenSessionprivate java.util.List<java.io.File>modulePathprivate java.util.List<java.lang.String>modulesprivate booleannoHeaderFilesprivate booleannoManPagesprivate java.io.FileoutputDirectoryprotected org.apache.maven.project.MavenProjectprojectprivate booleanstripDebugprivate org.apache.maven.toolchain.ToolchainManagertoolchainManager
-
Constructor Summary
Constructors Constructor Description CreateRuntimeImageMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidexecute()private java.util.List<java.lang.String>getExcludeResourcesPatterns()private java.nio.file.PathgetJModsDir()Returns the directory with the jmod files to be used for creating the image.private static java.lang.StringgetNoProjectArtifactMessage(org.apache.maven.artifact.Artifact primaryProjectArtifact)private java.util.Map<java.lang.String,java.lang.String>getToolChainRequirements(java.lang.String baseJdk)
-
-
-
Field Detail
-
project
@Parameter(defaultValue="${project}", readonly=true) protected org.apache.maven.project.MavenProject project
-
toolchainManager
@Component private org.apache.maven.toolchain.ToolchainManager toolchainManager
-
mavenSession
@Parameter(defaultValue="${session}", readonly=true) private org.apache.maven.execution.MavenSession mavenSession
-
baseJdk
@Parameter private java.lang.String baseJdk
-
modulePath
@Parameter(defaultValue="[]") private java.util.List<java.io.File> modulePath
-
outputDirectory
@Parameter(property="outputDirectory", defaultValue="${project.build.directory}/image") private java.io.File outputDirectory
-
modules
@Parameter(required=true) private java.util.List<java.lang.String> modules
-
jarInclusionPolicy
@Parameter private JarInclusionPolicy jarInclusionPolicy
-
launcher
@Parameter private Launcher launcher
-
compression
@Parameter private java.lang.String compression
-
stripDebug
@Parameter(defaultValue="false") private boolean stripDebug
-
excludedResources
@Parameter java.util.List<java.lang.String> excludedResources
-
ignoreSigningInformation
@Parameter(property="ignoreSigningInformation", defaultValue="false") private boolean ignoreSigningInformation
-
noHeaderFiles
@Parameter(defaultValue="false") private boolean noHeaderFiles
-
noManPages
@Parameter(defaultValue="false") private boolean noManPages
-
bindServices
@Parameter(defaultValue="false") private boolean bindServices
-
-
Method Detail
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureException- Throws:
org.apache.maven.plugin.MojoExecutionExceptionorg.apache.maven.plugin.MojoFailureException
-
getNoProjectArtifactMessage
private static java.lang.String getNoProjectArtifactMessage(org.apache.maven.artifact.Artifact primaryProjectArtifact)
-
getJModsDir
private java.nio.file.Path getJModsDir() throws org.apache.maven.plugin.MojoExecutionExceptionReturns the directory with the jmod files to be used for creating the image. IfbaseJdkhas been given, the jmod files from the JDK identified that way will be used; otherwise the jmod files from the JDK running the current build will be used.- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getToolChainRequirements
private java.util.Map<java.lang.String,java.lang.String> getToolChainRequirements(java.lang.String baseJdk) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getExcludeResourcesPatterns
private java.util.List<java.lang.String> getExcludeResourcesPatterns()
-
-