PageRenderTime 23ms CodeModel.GetById 22ms RepoModel.GetById 0ms app.codeStats 0ms

/README.md

https://gitlab.com/avinashmx/WildFly
Markdown | 160 lines | 85 code | 75 blank | 0 comment | 0 complexity | e3f8d966b761b9df576b5ccc1443f53b MD5 | raw file
  1. WildFly Quickstarts
  2. ====================
  3. Summary: The quickstarts demonstrate Java EE 7 and a few additional technologies from the JBoss stack. They provide small, specific, working examples that can be used as a reference for your own project.
  4. Introduction
  5. ------------
  6. These quickstarts run on JBoss WildFly. This version uses the correct dependencies and ensures you test and compile against your runtime environment.
  7. Be sure to read this entire document before you attempt to work with the quickstarts. It contains the following information:
  8. * [Available Quickstarts](#available-quickstarts): List of the available quickstarts and details about each one.
  9. * [Suggested Approach to the Quickstarts](#suggested-approach-to-the-quickstarts): A suggested approach on how to work with the quickstarts.
  10. * [System Requirements](#system-requirements): List of software required to run the quickstarts.
  11. * [Configure Maven](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_MAVEN.md): How to configure the Maven repository for use by the quickstarts.
  12. * [Run the Quickstarts](#run-the-quickstarts): General instructions for building, deploying, and running the quickstarts.
  13. * [Run the Arquillian Tests](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/RUN_ARQUILLIAN_TESTS.md#run-the-arquillian-tests): How to run the Arquillian tests provided by some of the quickstarts.
  14. * [Optional Components](#optional-components): How to install and configure optional components required by some of the quickstarts.
  15. * [Contributing Guide](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONTRIBUTING.md#jboss-developer-contributing-guide): This document contains information targeted for developers who want to contribute to JBoss developer projects.
  16. Use of WILDFLY_HOME and JBOSS_HOME Variables
  17. ---------------------------------
  18. The quickstart README files use the *replaceable* value `WILDFLY_HOME` to denote the path to the WildFly installation. When you encounter this value in a README file, be sure to replace it with the actual path to your WildFly installation. The installation path is described in detail here: [Use of WILDFLY_HOME and JBOSS_HOME Variables](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/USE_OF_EAP7_HOME.md#use-of-eap_home-and-jboss_home-variables).
  19. Available Quickstarts
  20. ---------------------
  21. All available quickstarts can be found here: <http://www.jboss.org/developer-materials/#!formats=jbossdeveloper_quickstart>. You can filter by the quickstart name, the product, and the technologies demonstrated by the quickstart. You can also limit the results based on skill level and date published. The resulting page provides a brief description of each matching quickstart, the skill level, and the technologies used. Click on the quickstart to see more detailed information about how to run it. Some quickstarts require deployment of other quickstarts. This information is noted in the `Prerequisites` section of the quickstart README file.
  22. _Note_: Some of these quickstarts use the H2 database included with WildFly. It is a lightweight, relational example datasource that is used for examples only. It is not robust or scalable, is not supported, and should NOT be used in a production environment!
  23. [TOC-quickstart]
  24. Suggested Approach to the Quickstarts
  25. -------------------------------------
  26. We suggest you approach the quickstarts as follows:
  27. * Regardless of your level of expertise, we suggest you start with the **helloworld** quickstart. It is the simplest example and is an easy way to prove your server is configured and started correctly.
  28. * If you are a beginner or new to JBoss, start with the quickstarts labeled **Beginner**, then try those marked as **Intermediate**. When you are comfortable with those, move on to the **Advanced** quickstarts.
  29. * Some quickstarts are based upon other quickstarts but have expanded capabilities and functionality. If a prerequisite quickstart is listed, be sure to deploy and test it before looking at the expanded version.
  30. System Requirements
  31. -------------------
  32. The applications these projects produce are designed to be run on Red Hat JBoss Enterprise Application Platform 7 or later.
  33. All you need to build these projects is Java 8.0 (Java SDK 1.8) or later and Maven 3.1.1 or later. See [Configure Maven for WildFly 10](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_MAVEN_JBOSS_EAP7.md#configure-maven-to-build-and-deploy-the-quickstarts) to make sure you are configured correctly for testing the quickstarts.
  34. To run these quickstarts with the provided build scripts, you need the the WildFly distribution ZIP. For information on how to install and run JBoss, see the [Red Hat JBoss Enterprise Application Platform Documentation](https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/) _Getting Started Guide_ located on the Customer Portal.
  35. You can also use [JBoss Developer Studio or Eclipse](#use-jboss-developer-studio-or-eclipse-to-run-the-quickstarts) to run the quickstarts.
  36. Run the Quickstarts
  37. -------------------
  38. The root folder of each individual quickstart contains a README file with specific details on how to build and run the example. In most cases you do the following:
  39. * [Start the WildFly Server](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/START_JBOSS_EAP.md#start-the-jboss-eap-server)
  40. * [Build and deploy the quickstarts](#build-and-deploy-the-quickstarts)
  41. ### Build and Deploy the Quickstarts
  42. See the README file in each individual quickstart folder for specific details and information on how to run and access the example.
  43. #### Build the Quickstart Archive
  44. In most cases, you can use the following steps to build the application to test for compile errors or to view the contents of the archive. See the specific quickstart README file for complete details.
  45. 1. Open a command prompt and navigate to the root directory of the quickstart you want to build.
  46. 2. Use this command if you only want to build the archive, but not deploy it:
  47. mvn clean install
  48. #### Build and Deploy the Quickstart Archive
  49. In most cases, you can use the following steps to build and deploy the application. See the specific quickstart README file for complete details.
  50. 1. Make sure you start the WildFly server as described in the quickstart README file.
  51. 2. Open a command prompt and navigate to the root directory of the quickstart you want to run.
  52. 3. Use this command to build and deploy the archive:
  53. mvn clean install wildfly:deploy
  54. #### Undeploy an Archive
  55. The command to undeploy the quickstart is simply:
  56. mvn wildfly:undeploy
  57. ### Verify the Quickstarts Build with One Command
  58. -------------------------------------------------
  59. You can verify the quickstarts build using one command. However, quickstarts that have complex dependencies must be skipped. For example, the `resteasy-jaxrs-client` quickstart is a RESTEasy client that depends on the deployment of the _helloworld-rs_ quickstart. As noted above, the root `pom.xml` file defines a `complex-dependencies` profile to exclude these quickstarts from the root build process.
  60. To build the quickstarts:
  61. 1. Do not start the WildFly server.
  62. 2. Open a command prompt and navigate to the root directory of the quickstarts.
  63. 3. Use this command to build the quickstarts that do not have complex dependencies:
  64. mvn clean install '-Pdefault,!complex-dependencies'
  65. _Note_: If you see a `java.lang.OutOfMemoryError: PermGen space` error when you run this command, increase the memory by typing the following command for your operating system, then try the above command again.
  66. For Linux: export MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"
  67. For Windows: SET MAVEN_OPTS="-Xmx512m -XX:MaxPermSize=128m"
  68. ### Undeploy the Deployed Quickstarts with One Command
  69. ------------------------------------------------------
  70. To undeploy the quickstarts from the root of the quickstart folder, you must pass the argument `-fae` (fail at end) on the command line. This allows the command to continue past quickstarts that fail due to complex dependencies and quickstarts that only have Arquillian tests and do not deploy archives to the server.
  71. You can undeploy quickstarts using the following procedure:
  72. 1. Start the WildFly server.
  73. 2. Open a command prompt and navigate to the root directory of the quickstarts.
  74. 3. Use this command to undeploy any deployed quickstarts:
  75. mvn wildfly:undeploy -fae
  76. To undeploy any quickstarts that fail due to complex dependencies, follow the undeploy procedure described in the quickstart's README file.
  77. Use JBoss Developer Studio or Eclipse to Run the Quickstarts
  78. ------------------------------------------------------------
  79. You can also deploy the quickstarts from Eclipse using JBoss tools. For more information on how to set up Maven and the JBoss tools, see the [Red Hat JBoss Enterprise Application Platform Documentation](https://access.redhat.com/documentation/en-US/JBoss_Enterprise_Application_Platform/) _Getting Started Guide_ and _Development Guide_ or [Get Started with JBoss Developer Studio](http://www.jboss.org/products/devstudio/get-started/ "Get Started with JBoss Developer Studio").
  80. Optional Components
  81. -------------------
  82. The following components are needed for only a small subset of the quickstarts. Do not install or configure them unless the quickstart requires it.
  83. * [Create Users Required by the Quickstarts](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CREATE_USERS.md#create-users-required-by-the-quickstarts): Add a Management or Application user for the quickstarts that run in a secured mode.
  84. * [Configure the PostgreSQL Database for Use with the Quickstarts](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_POSTGRESQL_EAP7.md#configure-the-postgresql-database-for-use-with-the-quickstarts): The PostgreSQL database is used for the distributed transaction quickstarts.
  85. * [Configure Byteman for Use with the Quickstarts](https://github.com/jboss-developer/jboss-developer-shared-resources/blob/master/guides/CONFIGURE_BYTEMAN.md#configure-byteman-for-use-with-the-quickstarts): This tool is used to demonstrate crash recovery for distributed transaction quickstarts.