To get more customization and extension for Compiere, we may need to modify and re-compile Compiere. Source code .
Compiere directly supports ant compilation (automatically compile all child projects ). Therefore, the compilation steps are actually very simple and can be completed directly in the command line. Of course, you can also configure compilation in Eclipse IDE or JBuilder IDE.
With Compiere 252e SourceCodeFor example, let's take a look at how to compile Compiere in windows so that it can generate both Windows and Linux binary installation packages.
The complete steps are as follows:
- Download the Compiere 252e source code, and extract it to the D: \ Compiere-all directory. Go to the subdirectory utils_dev.
- Copy mydevenvtemplate. BAT to get mydevenv. bat.
- Modify the mydevenv. BAT file.
- Run run_build.bat.
In step 2, search for the following two rows in the mydevenv. BAT file to change them to the correct values:
@ Set java_home = c: \ j2sdk1.4.2 _ 06
@ Set compiere_source = c: \ Compiere-all
As the development and compilation environment configuration file, other command lines of mydevenv. Bat are generally annotated. In a real online environment, we recommend that you set the effective date-validity 365 and-validity 180 parameters of the keytool-genkey and keytool-selfcert commands to a large number of days (for example,-validity 730 ).
There are three compilation commands in the subdirectory utils_dev:
- Run_build.bat (fully compiled)
- Run_buildincremental.bat (incremental compilation)
- Run_clean.bat (clear compilation)
If the Compiere server has been installed on the local machine before a compilation, run_build.bat and run_buildincremental.bat will process two tasks at the end of the compilation process:
- Generate binary installation packages in Windows and Linux formats, namely. Zip and .tar.gz;
- Deploy the latest version to % compiere_home % (the system automatically runs run_setup.bat to update the server configuration so that WebStart can update the client ).
In Linux, the compilation process is similar to that in Windows (processing the corresponding. Sh file instead of the. BAT file.