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.String
baseJdk
private boolean
bindServices
private java.lang.String
compression
(package private) java.util.List<java.lang.String>
excludedResources
private boolean
ignoreSigningInformation
private JarInclusionPolicy
jarInclusionPolicy
private Launcher
launcher
private org.apache.maven.execution.MavenSession
mavenSession
private java.util.List<java.io.File>
modulePath
private java.util.List<java.lang.String>
modules
private boolean
noHeaderFiles
private boolean
noManPages
private java.io.File
outputDirectory
protected org.apache.maven.project.MavenProject
project
private boolean
stripDebug
private org.apache.maven.toolchain.ToolchainManager
toolchainManager
-
Constructor Summary
Constructors Constructor Description CreateRuntimeImageMojo()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description void
execute()
private java.util.List<java.lang.String>
getExcludeResourcesPatterns()
private java.nio.file.Path
getJModsDir()
Returns the directory with the jmod files to be used for creating the image.private static java.lang.String
getNoProjectArtifactMessage(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.MojoExecutionException
org.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.MojoExecutionException
Returns the directory with the jmod files to be used for creating the image. IfbaseJdk
has 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()
-
-