Setup Development Environment in Eclipse

Version: 1.1 | Release Date: 18/10/2019

Requirements

  1. Please make sure you have installed the User acceptance testing (UAT) program . You can think of UAT program as another completely independent M18 platform for user testing, and our development environment relies on it.
  2. You may need to contact Multiable staff to install the User acceptance testing (UAT) program.
  3. Copy UAT WildFly to your development PC.
  4. Since your machine is going to run UAT WildFly, we recommend that you have at least 4G of memory.
  5. JDK version 1.8 or higher
  6. In this document, the app name is assumed to be opcq.

Configuration Guide

1. Install JRE

Make sure JRE installed with version 1.8 or higher

2. Add Server Runtime

  1. Runtime = WildFly Application Server 9.x
  2. Home Directory = The WildFly you copied from User acceptance testing (UAT) | runtime
  3. Create a server Adapter use this runtime | server

3. Create App Structure

  1. git clone App Skeleton from Github M18

    git clone https://github.com/m18ce01/M18-App-Skeleton.git opcq
    
  2. opcq folder structure should looks like

s1

4. Import Projects from Folder

Use [File -> Import Projects from Folder] of Eclipse to import p-ear p-ejb p-jsf p-share one by one

s2

s3

5. Configuring App Properties

  • the default App name is paml, we need to rename it as opcq

    change paml_ejb.jar => opcq_ejb.jar

    change paml_share.jar=> opcq_share.jar

s4

s5

6. Copy compile environment

s6

Your WildFly Home\standalone\deployments\caw_ear.ear directory should have more Jars than the one shown above (depending on how many apps you have installed)

*_ejb.jar means all Jars whose names end in _ejb.jar

  • copy WildFly Home\standalone\deployments\caw_ear.ear\*_ejb.jar to caw_ear\lib\ejb

  • copy WildFly Home\standalone\deployments\caw_ear.ear\lib\*_share.jar to caw_ear\lib\share

  • copy WildFly Home\standalone\deployments\caw_ear.ear\jsf.war\WEB-INF\lib\*_jsf.jar to caw_ear\lib\jsf

7. Config p-ejb build path

add all jars which under caw_ear\lib\ejb and caw_ear\lib\share to Libraries

b3

8. Config p-jsf build path

add all jars which under caw_ear\lib\jsf and caw_ear\lib\share to Libraries

b2

9. Config p-share build path

add all jars which under caw_ear\lib\share to Libraries

b1

10. Extend WildFly 9.x Runtime Classpath Entries

The M18 platform introduces several Jar packages through the WildFly Module. Adding these Jar packages will greatly facilitate your development process.

b5

b6

Add these three to classpath entry

WildFly Home\modules\system\layes\caw

WildFly Home\modules\system\layes\em

WildFly Home\modules\system\layes\base

b7

b4

11. Run the program

add caw_ear project to Eclipse Server and start

s7

12. Build the App by Ant

modify \opcq\p-other\ant\build_output.xml, change appname => opcq

s8

s9

You should get jars under \opcq\p-other\jar like this

s10

13. deploy the App

  • copy opcq_ejb.jar to WildFly Home\standalone\deployments\caw_ear.ear\

  • copy opcq_share.jar to WildFly Home\standalone\deployments\caw_ear.ear\lib\

  • copy opcq_jsf.jar to WildFly Home\standalone\deployments\caw_ear.ear\jsf.war\WEB-INF\lib\

You can also build the app into a specific format and install it via USU.