How To Create Maven Project In Cmd
Infrastructure and Management
- Red Hat Enterprise Linux
- Red Hat Virtualization
- Red Hat Identity Management
- Red Hat Directory Server
- Red Hat Certificate System
- Red Hat Satellite
- Red Hat Subscription Management
- Red Hat Update Infrastructure
- Red Hat Insights
- Red Hat Ansible Automation Platform
Cloud Computing
- Red Hat OpenShift
- Red Hat CloudForms
- Red Hat OpenStack Platform
- Red Hat OpenShift Container Platform
- Red Hat OpenShift Data Science
- Red Hat OpenShift Online
- Red Hat OpenShift Dedicated
- Red Hat Advanced Cluster Security for Kubernetes
- Red Hat Advanced Cluster Management for Kubernetes
- Red Hat Quay
- Red Hat CodeReady Workspaces
- Red Hat OpenShift Service on AWS
Storage
- Red Hat Gluster Storage
- Red Hat Hyperconverged Infrastructure
- Red Hat Ceph Storage
- Red Hat Openshift Container Storage
Runtimes
- Red Hat Runtimes
- Red Hat JBoss Enterprise Application Platform
- Red Hat Data Grid
- Red Hat JBoss Web Server
- Red Hat Single Sign On
- Red Hat support for Spring Boot
- Red Hat build of Node.js
- Red Hat build of Thorntail
- Red Hat build of Eclipse Vert.x
- Red Hat build of OpenJDK
- Red Hat build of Quarkus
- Red Hat CodeReady Studio
Integration and Automation
- Red Hat Process Automation
- Red Hat Process Automation Manager
- Red Hat Decision Manager
Show Table of Contents
Chapter 3. Creating a Quarkus project on the command line
You can use the Quarkus Maven plug-in on the command line to create a Quarkus project by providing attributes and values on the command line or by using the plug-in in interactive mode. The resulting project will contain the following elements:
- The Maven structure
- An associated unit test
- A landing page that is accessible on
http://localhost:8080
after you start the application - Example
Dockerfile
file insrc/main/docker
- The application configuration file
Procedure
-
In a command terminal, enter the following command to verify that Maven is using JDK 11 and that the Maven version is 3.6.2 or higher:
mvn --version
- If the preceding command does not return JDK 11, add the path to JDK 11 to the PATH environment variable and enter the preceding command again.
-
To use the Quarkus Maven plug-in to create a new project, use one of the following methods:
-
Enter the following command:
mvn io.quarkus:quarkus-maven-plugin:1.3.4.Final-redhat-00004:create \ -DprojectGroupId= PROJECT_GROUP_ID \ -DprojectArtifactId= PROJECT_ARTIFACT_ID \ -DplatformGroupId=com.redhat.quarkus \ -DplatformArtifactId=quarkus-universe-bom \ -DplatformVersion=1.3.4.Final-redhat-00004 \ -DclassName=" CLASSNAME "
In this command, replace the following values:
-
PROJECT_GROUP_ID
: A unique identifier of your project -
PROJECT_ARTIFACT_ID
: The name of your project and your project directory -
CLASSNAME
: The fully qualified name of the generated resource, for exampleorg.acme.quarkus.sample.HelloResource
-
-
Create the project in interactive mode:
mvn io.quarkus:quarkus-maven-plugin:1.3.4.Final-redhat-00004:create
When prompted, enter the required attribute values.
Alternatively, you can create your project using the default values for the project attributes by entering the following command:
mvn io.quarkus:quarkus-maven-plugin:1.3.4.Final-redhat-00004:create -B
The following table lists the attributes that you can define with the
create
command:Attribute Default Value Description projectGroupId
org.acme.sample
A unique identifier of your project.
projectArtifactId
none
The name of your project and your project directory. If you do not specify the
projectArtifactId
, the Maven plug-in starts the interactive mode. If the directory already exists, the generation fails.projectVersion
1.0-SNAPSHOT
The version of your project.
platformGroupId
io.quarkus
The group id of your platform. All the existing platforms are provided by
io.quarkus
. However, you can change the default value.platformArtifactId
quarkus-universe-bom
The artifact id of your platform BOM. To use the locally built Quarkus add
quarkus-universe-bom
to yourpom.xml
file.platformVersion
The latest platform version
The version of the platform you want to use for your project. You can provide a version range and the Maven plug-in uses the latest version.
className
None
The fully qualified name of the generated resource. After the application is created, the REST endpoint is exposed at the following URL:
http://localhost:8080/$path
If you use the default
path
, the URL ishttp://localhost:8080/hello
.path
/hello
The resource path, only if you set the
className
.extensions
[]
The list of extensions you want to add to your project separated by comma.
-
By default, the Quarkus Maven plug-in uses the latest quarkus-universe-bom
file. This BOM aggregates extensions so you can reference them from your applications to align the dependency versions. If you are offline, the Quarkus Maven plug-in uses the latest locally available version of the quarkus-universe-bom
. If Maven finds the quarkus-universe-bom
version 2.0 or earlier, it will use the platform based on the quarkus-universe-bom
.
How To Create Maven Project In Cmd
Source: https://access.redhat.com/documentation/en-us/red_hat_build_of_quarkus/1.3/html/developing_and_compiling_your_quarkus_applications_with_apache_maven/proc-creating-a-quarkus-project-on-the-command-line_quarkus-maven
Posted by: hatchhadmingesen.blogspot.com
0 Response to "How To Create Maven Project In Cmd"
Post a Comment