Package io.quarkus.maven
Class CreateExtensionMojo
java.lang.Object
org.apache.maven.plugin.AbstractMojo
io.quarkus.maven.CreateExtensionMojo
- All Implemented Interfaces:
org.apache.maven.plugin.ContextEnabled,org.apache.maven.plugin.Mojo
@Mojo(name="create-extension",
requiresProject=false)
public class CreateExtensionMojo
extends org.apache.maven.plugin.AbstractMojo
Creates the base of a
Quarkus Extension in different layout depending on the options and
environment.
It will:
When using
Create in the quarkus-parent project directory (or the extensions parent dir)
It will:
- generate the new Quarkus extension in the extensions parent as a module (parent, runtime and deployment), with unit test and devmode test on option.
- On option, generate the new integration test in the integration tests parent as a module.
- add the dependencies to the bom/application/pom.xml.
Creating a Quarkiverse extension
When using
-DgroupId=io.quarkiverse.[featureId], the new extension will use the Quarkiverse layout.
Creating a standalone extension
- generate the new Quarkus extension in the current directory (parent, runtime and deployment), with unit test and devmode test on option.
- On option, generate the new integration test module in the current directory.
-
Field Summary
FieldsModifier and TypeFieldDescription(package private) StringUsed to detect legacy command usage and display an error(package private) FileDirectory where the changes should be performed.(package private) StringTheextensionDescriptionof the runtime module.(package private) StringextensionIdof this extension (REQUIRED).(package private) StringTheextensionNameof the runtime module.(package private) StringThegroupIdfor the newly created Maven modules (REQUIRED - INHERITED IN QUARKUS-CORE).(package private) StringA prefix common to all extension artifactIds in the current source tree.(package private) StringA prefix common to all extension names in the current source tree.(package private) StringBase package under which classes should be created in Runtime and Deployment modules.protected org.apache.maven.project.MavenProject(package private) StringTheartifactIdof the Quarkus platform BOM.(package private) StringThegroupIdof the Quarkus platform BOM.(package private) StringTheversionof the Quarkus platform BOM.(package private) StringQuarkus version the newly created extension should depend on (REQUIRED - INHERITED IN QUARKUS-CORE).(package private) org.eclipse.aether.impl.RemoteRepositoryManager(package private) List<org.eclipse.aether.repository.RemoteRepository> (package private) org.eclipse.aether.RepositorySystemSession(package private) org.eclipse.aether.RepositorySystem(package private) StringTheversionfor the newly created Maven modules.(package private) booleanIndicates whether to generate an extension codestart(package private) booleanIndicates whether to generate a devmode test for the extension(package private) booleanIndicates whether to generate an integration tests for the extension(package private) booleanIndicates whether to generate any tests for the extension (same as-DwithoutUnitTest -DwithoutIntegrationTest -DwithoutDevModeTest)(package private) booleanIndicates whether to generate a unit test class for the extensionFields inherited from interface org.apache.maven.plugin.Mojo
ROLE -
Constructor Summary
Constructors -
Method Summary
Methods inherited from class org.apache.maven.plugin.AbstractMojo
getLog, getPluginContext, setLog, setPluginContext
-
Field Details
-
basedir
Directory where the changes should be performed.
Default: the current directory of the current Java process. -
extensionId
extensionIdof this extension (REQUIRED).
It will be used to generate the different extension modules artifactIds ([namespaceId][extensionId]-parent), runtime ([namespaceId][extensionId]) and deployment ([namespaceId][extensionId]-deployment). -
groupId
ThegroupIdfor the newly created Maven modules (REQUIRED - INHERITED IN QUARKUS-CORE). -
quarkusVersion
Quarkus version the newly created extension should depend on (REQUIRED - INHERITED IN QUARKUS-CORE). -
namespaceId
A prefix common to all extension artifactIds in the current source tree.
Default: "quarkus-" in quarkus Quarkus Core and Quarkiverse else "" -
version
Theversionfor the newly created Maven modules.
Default: automatic in Quarkus Core elseCreateExtension.DEFAULT_VERSION -
extensionName
TheextensionNameof the runtime module. TheextensionNames of the extension parent and deployment modules will be based on thisnametoo.
Default: the formattedextensionId -
extensionDescription
TheextensionDescriptionof the runtime module.
This description is used on https://code.quarkus.io/. -
namespaceName
A prefix common to all extension names in the current source tree.
Default: "quarkus-" in Quarkus Core and Quarkiverse else "" -
packageName
Base package under which classes should be created in Runtime and Deployment modules.
Default: auto-generated out ofgroupId,namespaceIdandextensionId -
quarkusBomGroupId
ThegroupIdof the Quarkus platform BOM.
Default:CreateExtension.DEFAULT_BOM_GROUP_ID -
quarkusBomArtifactId
TheartifactIdof the Quarkus platform BOM.
Default:CreateExtension.DEFAULT_BOM_ARTIFACT_ID -
quarkusBomVersion
Theversionof the Quarkus platform BOM.
Default:CreateExtension.DEFAULT_BOM_VERSION -
withCodestart
@Parameter(property="withCodestart") boolean withCodestartIndicates whether to generate an extension codestart -
withoutUnitTest
@Parameter(property="withoutUnitTest") boolean withoutUnitTestIndicates whether to generate a unit test class for the extension -
withoutIntegrationTests
@Parameter(property="withoutIntegrationTests") boolean withoutIntegrationTestsIndicates whether to generate an integration tests for the extension -
withoutDevModeTest
@Parameter(property="withoutDevModeTest") boolean withoutDevModeTestIndicates whether to generate a devmode test for the extension -
withoutTests
@Parameter(property="withoutTests") boolean withoutTestsIndicates whether to generate any tests for the extension (same as-DwithoutUnitTest -DwithoutIntegrationTest -DwithoutDevModeTest) -
artifactId
Used to detect legacy command usage and display an error -
project
@Parameter(defaultValue="${project}") protected org.apache.maven.project.MavenProject project -
repos
@Parameter(defaultValue="${project.remoteProjectRepositories}", readonly=true, required=true) List<org.eclipse.aether.repository.RemoteRepository> repos -
repoSession
@Parameter(defaultValue="${repositorySystemSession}", readonly=true) org.eclipse.aether.RepositorySystemSession repoSession -
repoSystem
@Component org.eclipse.aether.RepositorySystem repoSystem -
remoteRepoManager
@Component org.eclipse.aether.impl.RemoteRepositoryManager remoteRepoManager
-
-
Constructor Details
-
CreateExtensionMojo
public CreateExtensionMojo()
-
-
Method Details
-
execute
public void execute() throws org.apache.maven.plugin.MojoExecutionException- Throws:
org.apache.maven.plugin.MojoExecutionException
-