Package org.graalvm.buildtools.maven
Class AbstractNativeMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- org.graalvm.buildtools.maven.AbstractNativeMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled
,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
AbstractNativeImageMojo
,AddReachabilityMetadataMojo
public abstract class AbstractNativeMojo extends org.apache.maven.plugin.AbstractMojo
-
-
Field Summary
Fields Modifier and Type Field Description protected org.codehaus.plexus.logging.Logger
logger
protected org.apache.maven.execution.MavenSession
mavenSession
protected org.graalvm.reachability.GraalVMReachabilityMetadataRepository
metadataRepository
protected MetadataRepositoryConfiguration
metadataRepositoryConfiguration
protected java.util.Set<org.graalvm.reachability.DirectoryConfiguration>
metadataRepositoryConfigurations
protected org.apache.maven.plugin.descriptor.PluginDescriptor
plugin
protected org.apache.maven.project.MavenProject
project
protected java.io.File
reachabilityMetadataOutputDirectory
protected org.eclipse.aether.RepositorySystem
repositorySystem
protected org.apache.maven.execution.MavenSession
session
-
Constructor Summary
Constructors Modifier Constructor Description protected
AbstractNativeMojo()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description protected void
configureMetadataRepository()
protected java.util.Optional<java.nio.file.Path>
downloadMetadata(java.net.URL url, java.nio.file.Path destination)
protected java.util.Optional<java.lang.String>
getMetadataVersion(org.apache.maven.artifact.Artifact dependency)
boolean
isArtifactExcludedFromMetadataRepository(org.apache.maven.artifact.Artifact dependency)
protected boolean
isMetadataRepositoryEnabled()
protected void
maybeAddDependencyMetadata(org.apache.maven.artifact.Artifact dependency, java.util.function.Consumer<java.io.File> excludeAction)
protected java.nio.file.Path
unzipLocalMetadata(java.nio.file.Path localPath, java.nio.file.Path destination)
-
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
-
-
-
Field Detail
-
plugin
@Parameter(defaultValue="${plugin}", readonly=true) protected org.apache.maven.plugin.descriptor.PluginDescriptor plugin
-
session
@Parameter(defaultValue="${session}", readonly=true) protected org.apache.maven.execution.MavenSession session
-
project
@Parameter(defaultValue="${project}", readonly=true, required=true) protected org.apache.maven.project.MavenProject project
-
reachabilityMetadataOutputDirectory
@Parameter(defaultValue="${project.build.directory}/graalvm-reachability-metadata", required=true) protected java.io.File reachabilityMetadataOutputDirectory
-
metadataRepositoryConfiguration
@Parameter(alias="metadataRepository") protected MetadataRepositoryConfiguration metadataRepositoryConfiguration
-
metadataRepositoryConfigurations
protected final java.util.Set<org.graalvm.reachability.DirectoryConfiguration> metadataRepositoryConfigurations
-
metadataRepository
protected org.graalvm.reachability.GraalVMReachabilityMetadataRepository metadataRepository
-
logger
@Component protected org.codehaus.plexus.logging.Logger logger
-
mavenSession
@Component protected org.apache.maven.execution.MavenSession mavenSession
-
repositorySystem
@Component protected org.eclipse.aether.RepositorySystem repositorySystem
-
-
Method Detail
-
isMetadataRepositoryEnabled
protected boolean isMetadataRepositoryEnabled()
-
configureMetadataRepository
protected void configureMetadataRepository()
-
isArtifactExcludedFromMetadataRepository
public boolean isArtifactExcludedFromMetadataRepository(org.apache.maven.artifact.Artifact dependency)
-
maybeAddDependencyMetadata
protected void maybeAddDependencyMetadata(org.apache.maven.artifact.Artifact dependency, java.util.function.Consumer<java.io.File> excludeAction)
-
getMetadataVersion
protected java.util.Optional<java.lang.String> getMetadataVersion(org.apache.maven.artifact.Artifact dependency)
-
downloadMetadata
protected java.util.Optional<java.nio.file.Path> downloadMetadata(java.net.URL url, java.nio.file.Path destination)
-
unzipLocalMetadata
protected java.nio.file.Path unzipLocalMetadata(java.nio.file.Path localPath, java.nio.file.Path destination)
-
-