Package io.quarkus.maven
Class QuarkusBootstrapMojo
- java.lang.Object
-
- org.apache.maven.plugin.AbstractMojo
-
- io.quarkus.maven.QuarkusBootstrapMojo
-
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
- Direct Known Subclasses:
BuildMojo,GenerateCodeMojo,RunMojo,TrackConfigChangesMojo
public abstract class QuarkusBootstrapMojo extends org.apache.maven.plugin.AbstractMojo
-
-
Field Summary
Fields Modifier and Type Field Description protected QuarkusBootstrapProviderbootstrapProvider
-
Constructor Summary
Constructors Constructor Description QuarkusBootstrapMojo()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected StringappArtifactCoords()protected FilebaseDir()protected abstract booleanbeforeExecute()This callback allows to evaluate whether this mojo should be executed, skipped or fail.protected io.quarkus.bootstrap.app.CuratedApplicationbootstrapApplication()protected io.quarkus.bootstrap.app.CuratedApplicationbootstrapApplication(io.quarkus.runtime.LaunchMode mode)protected StringbootstrapId()protected FilebuildDir()protected abstract voiddoExecute()Main mojo execution codevoidexecute()protected StringfinalName()protected List<io.quarkus.maven.dependency.Dependency>forcedDependencies(io.quarkus.runtime.LaunchMode mode)Allows implementations to provide extra dependencies that should be enforced on the application.protected PropertiesgetBuildSystemProperties(boolean quarkusOnly)protected String[]ignoredEntries()protected Map<String,String>manifestEntries()protected List<ManifestSection>manifestSections()protected org.apache.maven.project.MavenProjectmavenProject()org.apache.maven.execution.MavenSessionmavenSession()protected io.quarkus.maven.dependency.ArtifactKeyprojectId()protected Map<String,String>properties()protected List<org.eclipse.aether.repository.RemoteRepository>remoteRepositories()protected org.eclipse.aether.impl.RemoteRepositoryManagerremoteRepositoryManager()Deprecated, for removal: This API element is subject to removal in a future version.protected org.eclipse.aether.RepositorySystemrepositorySystem()Deprecated, for removal: This API element is subject to removal in a future version.protected org.eclipse.aether.RepositorySystemSessionrepositorySystemSession()voidsetLog(org.apache.maven.plugin.logging.Log log)protected booleansetPackageTypeSystemPropertyIfNativeProfileEnabled()Essentially what this does is to enable the native package type even if a different package type is set in application properties.
-
-
-
Field Detail
-
bootstrapProvider
@Component protected QuarkusBootstrapProvider bootstrapProvider
-
-
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
-
setLog
public void setLog(org.apache.maven.plugin.logging.Log log)
- Specified by:
setLogin interfaceorg.apache.maven.plugin.Mojo- Overrides:
setLogin classorg.apache.maven.plugin.AbstractMojo
-
beforeExecute
protected abstract boolean beforeExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionThis callback allows to evaluate whether this mojo should be executed, skipped or fail.- Returns:
- false if the execution of the mojo should be skipped, true if the mojo should be executed
- Throws:
org.apache.maven.plugin.MojoExecutionException- in case of a failureorg.apache.maven.plugin.MojoFailureException- in case of a failure
-
doExecute
protected abstract void doExecute() throws org.apache.maven.plugin.MojoExecutionException, org.apache.maven.plugin.MojoFailureExceptionMain mojo execution code- Throws:
org.apache.maven.plugin.MojoExecutionException- in case of a failureorg.apache.maven.plugin.MojoFailureException- in case of a failure
-
appArtifactCoords
protected String appArtifactCoords()
-
forcedDependencies
protected List<io.quarkus.maven.dependency.Dependency> forcedDependencies(io.quarkus.runtime.LaunchMode mode)
Allows implementations to provide extra dependencies that should be enforced on the application. Originally requested by Camel K.- Parameters:
mode- launch mode the application is being bootstrapped in- Returns:
- list of extra dependencies that should be enforced on the application
-
repositorySystem
@Deprecated(forRemoval=true) protected org.eclipse.aether.RepositorySystem repositorySystem()
Deprecated, for removal: This API element is subject to removal in a future version.
-
remoteRepositoryManager
@Deprecated(forRemoval=true) protected org.eclipse.aether.impl.RemoteRepositoryManager remoteRepositoryManager()
Deprecated, for removal: This API element is subject to removal in a future version.
-
repositorySystemSession
protected org.eclipse.aether.RepositorySystemSession repositorySystemSession()
-
remoteRepositories
protected List<org.eclipse.aether.repository.RemoteRepository> remoteRepositories()
-
mavenProject
protected org.apache.maven.project.MavenProject mavenProject()
-
mavenSession
public org.apache.maven.execution.MavenSession mavenSession()
-
buildDir
protected File buildDir()
-
baseDir
protected File baseDir()
-
finalName
protected String finalName()
-
manifestSections
protected List<ManifestSection> manifestSections()
-
ignoredEntries
protected String[] ignoredEntries()
-
bootstrapId
protected String bootstrapId()
-
projectId
protected io.quarkus.maven.dependency.ArtifactKey projectId()
-
bootstrapApplication
protected io.quarkus.bootstrap.app.CuratedApplication bootstrapApplication() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
bootstrapApplication
protected io.quarkus.bootstrap.app.CuratedApplication bootstrapApplication(io.quarkus.runtime.LaunchMode mode) throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-
getBuildSystemProperties
protected Properties getBuildSystemProperties(boolean quarkusOnly) throws org.apache.maven.plugin.MojoExecutionException
- Throws:
org.apache.maven.plugin.MojoExecutionException
-
setPackageTypeSystemPropertyIfNativeProfileEnabled
protected boolean setPackageTypeSystemPropertyIfNativeProfileEnabled()
Essentially what this does is to enable the native package type even if a different package type is set in application properties. This is done to preserve what users expect to happen when they execute "mvn package -Dnative" even if quarkus.package.type has been set in application.properties- Returns:
- true if the package type system property was set, otherwise - false
-
-