-
Notifications
You must be signed in to change notification settings - Fork 93
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #473 from hpehl/WFLY-18428
WFLY-18428: Add get started page
- Loading branch information
Showing
7 changed files
with
127 additions
and
13 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
--- | ||
layout: base | ||
--- | ||
|
||
<div class="grid-wrapper getstarted-page"> | ||
<div class="grid__item width-12-12 width-12-12-mobile"> | ||
<h1 class="text-caps">{{page.title}} {{page.docversion}}</h1> | ||
</div> | ||
<div class="grid__item width-12-12 width-12-12-mobile"> | ||
<div> | ||
{{ content }} | ||
</div> | ||
</div> | ||
<div class="grid__item width-12-12 width-12-12-mobile"> | ||
<div>< <a href="{{ site.baseurl }}/">Home</a></div> | ||
</div> | ||
</div> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
.getstarted-page { | ||
padding-bottom: 3rem; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,92 @@ | ||
--- | ||
layout: getstarted | ||
title: Get Started with WildFly | ||
permalink: /get-started/ | ||
--- | ||
:page-liquid: | ||
|
||
== Build and run a Jakarta EE application with WildFly in a few minutes. | ||
|
||
=== Step 0. Install Java & Maven | ||
|
||
You need Java (at least version `11`, and preferably `17`) and Maven installed on your machine to create a Maven project that contains the source code of the Jakarta EE application. | ||
|
||
You can verify they are installed by executing the commands: | ||
|
||
[source,bash] | ||
---- | ||
java -version | ||
mvn -version | ||
---- | ||
|
||
=== Step 1. Create the Application | ||
|
||
You can create the Jakarta EE application as a Maven project by executing the commands: | ||
|
||
[source,bash] | ||
---- | ||
mvn archetype:generate \ | ||
-DarchetypeGroupId=org.wildfly.archetype \ | ||
-DarchetypeArtifactId=wildfly-getting-started-archetype | ||
---- | ||
|
||
The `getting-started` project that is generated contains a simple "Hello World" application that | ||
exposes a HTTP endpoint with the Jakarta-RS API. | ||
|
||
The Maven project is configured to "provision" (install and configure) | ||
the WildFly that hosts your application. | ||
|
||
=== Step 2. Build the Application | ||
|
||
You can build the application by executing the commands: | ||
|
||
[source,bash] | ||
---- | ||
cd getting-started | ||
mvn package verify | ||
---- | ||
|
||
This Maven command compiles the Jakarta EE application, provisions WildFly, deploys the application into WildFly and | ||
runs integration tests against it. | ||
When this command is finished, you have a fully functional, tested application running on WildFly. | ||
|
||
=== Step 3. Run the Application | ||
|
||
The `target/server` contains a fully functional WildFly server with your application. You start it by executing the command: | ||
|
||
[source,bash] | ||
---- | ||
./target/server/bin/standalone.sh | ||
---- | ||
|
||
The application is accessible at http://localhost:8080/. | ||
|
||
To stop the application, type `Ctrl + C` in the terminal where you started WildFly. | ||
|
||
=== Step 4. Continuous Development | ||
|
||
You can develop your application and see the updates in the running application immediately by using the `wildfly:dev` goal from the root | ||
of your project: | ||
|
||
[source,bash] | ||
---- | ||
mvn clean wildfly:dev | ||
---- | ||
|
||
The application is accessible at http://localhost:8080 and will be continuously updated when its code changes. | ||
|
||
Open your favorite code editor and change the `hello` method in the `GettingStartedService.java` file: | ||
|
||
[source,java] | ||
---- | ||
public String hello(String name) { | ||
return String.format("Hello '%s'.", name.toUpperCase()); | ||
} | ||
---- | ||
|
||
Save the file and the application will be recompiled and updated in WildFly. If you access the application at http://localhost:8080, | ||
it will now return the name in upper case. | ||
|
||
== Next Steps | ||
|
||
To learn more about WildFly, you can read its https://docs.wildfly.org[documentation,window=_blank]. |