Documenti di Didattica
Documenti di Professioni
Documenti di Cultura
From AdempiereWiki
Contents
1 Tutorial by CarlosRuiz_globalqss
2 Introduction:
3 How to setup up your environment
3.1 Create the tag project (adempiere320)
3.2 Create the project source directory
3.3 Compile and export your customizations
3.4 Apply the customizations to your ADempiere installation
3.5 Test your customization
3.6 Solving Dependencies
4 Setup example within Eclipse
4.1 Eclipse setup
4.2 Project customization setup
4.3 Running / Debugging within eclipse
5 See Also
Tutorial by CarlosRuiz_globalqss
This tutorial will show you how to make a customization project by making a customization.jar with your changes and deploy them in the
ADempiere binary
Introduction:
Sometimes you realise that ADempiere does not perfectly suit your needs and you need to make some changes to parts of the sourcecode.
Some customizations are not possible to achieve through ADempiere’s brilliant Application Dictionary and you have to modify the source
code for that. The recommended way of doing customizations is to do it in a separate project. There you can do your customized classes and
create customization.jar archive. For additional information you can also refer to: http://en.wikiversity.org
/wiki/Adempiere_Technical_Training#Project_Customization_M anagement_Hints
I am going to walk you through an sample customization using ADempiere 3.2. It is mostly applicable to any version thereafter.
For this particular example I am going to modify the file ALoginRes_bg.java located in client/src in package org.compiere.apps. To do that do
the following in custom_termo_adempiere320 project:
Now you should see the string “Rolia” instead of the Bulgarian translation for Role next to the drop-down allowing you to choose a Role.
Solving Dependencies
When you try to compile your customization source files you may run into missing dependency problems. You should resolve those by right
clicking on your customization project and choosing properties to bring up the properties window of the project. Choose Java Build Path and
add the missing references in the Libraries tab or the Projects tab. For any dependent classes located in the main project adding the main
project(ADempiere 3.2 in our case) to the Projects tab should be sufficient.
working set adempiere320 (I use working sets to work with projects of different versions)
project adempiere320 (from tags/adempiere320) this project can be considered read-only, never touched
project patches_321 (from branches/patches_321) this project have the officially released patches for 320
project Localization_Colombia (from contributions/Localizations/Colombia) this project have the customized classes for LCO
project QSS (from QSS private repository) this project have the customized classes for our private QSS installation
working set adempiere330
working set adempieretrunk
To construct patches.jar you can package the bin directory of patches_321 project.
To construct customization.jar you can package the bin directory of Localization_Colombia + QSS projects.
On the project QSS you define the runner for the project:
Please note that the search button may not be able to find the class org.compiere.Adempiere. In that case you just have to type it manually.
On the arguments section you can tell eclipse the properties to use - you can use one property file for each project:
Normally the classpath of the runner doesn't need modifications, just showing it here for documentation purposes:
References: http://en.wikiversity.org/wiki/Adempiere_Technical_Training#Project_Customization_M anagement_Hints
Enjoy !
See Also
M odelValidator