|
| 1 | +== Create a new devon4j project |
| 2 | + |
| 3 | +=== Create a new devon4j project in the Eclipse IDE |
| 4 | + |
| 5 | +==== Prerequisites |
| 6 | + |
| 7 | +In order to create a new application you must use the archetype provided by devon4j which uses the https://maven.apache.org/guides/introduction/introduction-to-archetypes.html[maven archetype functionality]. |
| 8 | + |
| 9 | +To create a new application, you should have installed devonfw-ide. Follow the https://devonfw.com/website/pages/docs/devonfw-ide-introduction.asciidoc.html[devonfw-ide] documentation to install the same. |
| 10 | + |
| 11 | +==== Create the project |
| 12 | + |
| 13 | +Firstly, create a new maven project. |
| 14 | +Then, choose the 'devon4j-template-server' archetype. |
| 15 | +Fill the _Group Id_, _Artifact Id_, _version_ and _package_ for your project. The _package_ name should be <%= name; %>. If you want to add an EAR generation mechanism to your project, you should fill the property _earProjectName_ with the value _Artifact Id_ + "-ear". For example, "sampleapp-ear". |
| 16 | + |
| 17 | +==== What is generated? |
| 18 | + |
| 19 | +The application template (archetype) generates a maven multi-module project. It has the following modules: |
| 20 | + |
| 21 | +- *api*: module with the API (REST service interfaces, transfer-objects, datatypes, etc.) to be imported by other apps as a maven dependency in order to invoke and consume the offered (micro)services. |
| 22 | + |
| 23 | +- *core*: maven module containing the core of the application. |
| 24 | + |
| 25 | +- *batch*: optional module for batch(es) |
| 26 | + |
| 27 | +- *server*: module that bundles the entire app (core with optional batch) as a WAR file. |
| 28 | + |
| 29 | +- *ear*: optional maven module is responsible to packaging the application as a EAR file. |
| 30 | + |
| 31 | +The toplevel pom.xml of the generated project has the following features: |
| 32 | + |
| 33 | +- Properties definition: Spring-boot version, Java version, etc. |
| 34 | + |
| 35 | +- Modules definition for the modules (described above) |
| 36 | + |
| 37 | +- Dependency management: define versions for dependencies of the technology stack that are recommended and work together in a compatible way. |
| 38 | + |
| 39 | +- Maven plugins with desired versions and configuration |
| 40 | + |
| 41 | +- Profiles for https://devonfw.com/website/pages/docs/devon4j.asciidoc_guides.html#guide-testing.asciidoc[test stages] |
| 42 | + |
0 commit comments