• No results found

Module 11 Setting up Customization Environment

N/A
N/A
Protected

Academic year: 2021

Share "Module 11 Setting up Customization Environment"

Copied!
18
0
0

Loading.... (view fulltext now)

Full text

(1)

Module 11

Setting up Customization

Environment

By Kitti Upariphutthiphong

Technical Consultant,

ecosoft™

[email protected]

(2)

Module Objectives

Downloading ADempiere Source Code

Setup Development Environment

(3)

Module 8.1

Revision Control

By Kitti Upariphutthiphong

Technical Consultant,

ecosoft™

[email protected]

(4)
(5)

SVN

Steps

Checkout files from Central

Make changes locally

Commit file back to Central

Pro

Easy to understand at first

Con

Not store change history in local

Merge always fail to merge

(6)

HG Mercurial

Steps

Pull changeset from Central to local

repository

Update changes to local

Make changes locally

Commit changeset to local repo

Push changes back to Central

Pro

More loosely couple

Store history as changeset

Easy to branch and merge

Con

Harder to understand at first, but easier

once understand

(7)

Mercurial in real development environment

Setting up a bunch of repositories that pull from each other.

As each feature goes through testing and integration, it gets pulled up

higher and higher in the tree until eventually the new code is in the main

shipping repository where customers can get it:

(8)

ADempiere Development Environment

Dev 1

Development

DB

Test Server

APP + DB

Production Server

APP + DB

2Pack •1001_xxx.zip •1002_yyy.zip •1003_zzz.zip •Etc… 2Pack •1001_xxx.zip •1002_yyy.zip •1003_zzz.zip •Etc…

Dev 2

2Pack •1001_xxx.zip •1002_yyy.zip •1003_zzz.zip •Etc…

ADempiere

SourceForge

HG Repository

Local Clone of AD

Source Code

i.e., 360LTS

Project

Source Code

(9)

Setup Development Environment

2. Patch Project

1. Customization Project

3. ADempiere Project

Customization Project

Overwrite

Patch Project

Overwrite

(10)

Deploying new features / customization

Adempeiere Precedence of JAR

1.

Customization.jar

2.

Patches.jar

3.

<Package>.jar (i.e., LiberoHR.jar, LiberoManu.jar, etc…)

4.

Adempiere.jar

Deploying as a new JAR

From eclipse Export the Development Project as JAR file

Copy and Paste to Adempiere

1. As customization.jar in C:\Adempiere\lib

2. As <Package>.jar in C:\Adempiere\Packages\<Package>\<Package>.jar

Execute Run_Setup.bat or RUN_SilentSetup.bat to include the new classes into the

system runtime

(11)
(12)

Scenario

Make customization to the login window so that the

dropdown list show only Thai and English language

(13)

Setup Workspace

Open program Eclipse

Open Workspace C:\Training360LTS

Create new Java Project MyCustomization

From Menu, select File | New | Java Project

Project Name: MyCustomizationClick Finish

Setup project dependency for

MyCustomization

– Right click on MyCustomization project folder

Select Property

On Property dialog, set Java Build path and select 2 projects, Adempiere360lts and patches_360

– Click on Order and Export tab, move patches_360 to higher priority than adempiere360lts (patches.jar overwrite ADempiere.jar)

– Click OK to close the dialog.

Create Run Configurations

With MyCustomization project selected, click on Run Configuration button, it will launch a dialog

(14)

Setup Workspace

On Main tab

Name: MyConfiguraton

Project: MyCustomization

Main class: org.compiere.Adempiere

On Arguments tab fill VM Argument as follow,

org.compiere.Adempiere act as entry point when run the

code.

MyFirstProject.properties is the adempiere.properties

Click Apply and close this dialog.

– We are now ready to run Adempeire from eclipse.

Test run ADempiere

Click on Run button for MyConfiguration

– ADempiere will start as normal. You will still see that the Language field in login page is now listing all available language.

Next step we will modify the code so that

it list only Thai and English.

-DPropertyFile=${workspace_loc}/MyFirstProject.properties -Dorg.adempiere.server.embedded=true

-Xms128M -Xmx256M

(15)

Modify Source Code

Modify Source Code

– The Source Code that control the list of Languages is located at org.compiere.util.Language.java

Create base/src folder in MyCustomizatoin project.

Right click on base/src folder and create new package org.compiere.util

– Copy Language.java from adempiere360lts project and past it here.

– Look for method Language and modify the source code so that it only keep English (UK) and Thai language

– Save the file. It will compile automatically. That’s all we have to change.

(16)

Running the source code in Debug Mode

Running in Debug mode is as simple as in the Run Configuration Mode

As sample, setup break point in the main function of org.compiere.Adempiere class

Run Debug Configuration instead,

and system will launch in debug mode.

Use ADempiere as normal, system will break at specified Breakpoint

(17)

Test Your Knowledge

1.

How to deploy JAR files in Production environment?

2.

How to Debug Account Engine on Eclipse?

3.

What is the precedence order of JAR in ADempiere?

4.

What is migration script? And how it can be created?

(18)

References

Related documents

By design, we decided to keep the document structure in HTML, event handling in JavaScript and the presentation layout in CSS, while Time Style Sheets (TSS), a CSS

I forhold til dette projekts formål, at undersøge hvordan transformativ læring kan opstå som følge af coaching, er det særligt interessant at betragte gruppen som

To determine the design buckling resistance moment of a laterally unrestrained beam, the reduction factor for lateral torsional buckling must be determined1. The following

Required Standard Services Service Management Instance Management Registration MetaData Delegation Relationships Query Static Query Dynamic Events.. Required

Step 3: Click “default” button to restore default setting; click “apply” button to save the setting; click “exit” button to.. exit

Next create the standby database in the usual way using an OS copy or an RMAN “Duplicate database for standby” (see “Creating a Physical Standby Database (Doc ID 1475344.1)” )

Integrating QlikView into Web Sites using QlikView Workbench 10 Displaying QlikView inside other web sites 10 Integrating web content and custom visualizations into QlikView

ﺦﺴﻧةﺎﻨﻘﻟﺍ ﻲﻓ ﺽﺮﻌﻨﻴﻤﻀﺘﻗﺎﻴﺴﻟﺎ!ﻧﻵﺍ ﻝﻭﺎﺤﻧ ؟ ﻥﻵﺍ ﻰﺘﺣ ﺔﻴﻗﺮﺑ ﻚﻳﺪﻟ ﻦﻜﻳ Telegram Yandex.Translate in Enacademic (RSS) ﺔﻠﻣﺎﻛ ﺔﺻﻼﺧ :ﺔﻴﺑﺮﻌﻟﺍ feedspot