[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 483: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/bbcode.php on line 112: preg_replace(): The /e modifier is no longer supported, use preg_replace_callback instead
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4505: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4507: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4508: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
[phpBB Debug] PHP Notice: in file /includes/functions.php on line 4509: Cannot modify header information - headers already sent by (output started at /includes/functions.php:3706)
From Flames To Fork, Comes Freedom • View topic - Advice on modifying Compiere source code

Advice on modifying Compiere source code

For those who ventured too far - just hope they know their way back :)

Moderator: neilg

Advice on modifying Compiere source code

Postby neilg » Mon Jun 20, 2005 4:49 am

Please see reply below for the instructions for 2.5.2D. Things are alot simpler and you hardly have to change any original compiere source code at all.

This post is based on 2.5.1g

For any customizations to Compiere.

(1) Never modify the Compiere code directly. Compiere's original source code is referred to as the 'Reference'. We build it completely as originally released.
If you modify the source directly you will probably live long enough to regret this decision because then you are stuck forever with that version of code, and Compiere is constantly improving
(2) Reference these .jars (CClient.jar, etc... all the Compiere runtime jars) from your project. This project is a brand new separate project and will be quite small, apart from the Compiere jar files.
(3) Your jar - build it as a standalone from Compiere's.
It must be a completely new jar. The advantage is that deploying is MUCH smaller.
Incorporate any 3rd party libraries into this one jar, as part of the build.xml.
(4) Modify the CLASSPATH everywhere and put your own jar first in the searchpath so that it overrides Compiere's.
(5) If you really have to (HAVE TO) modify Compiere code then make a copy of the class and put it into your project under the same package as the original. Because of the classpath, your modifications to this file will take precedance.
(6) You will need to make mods to the webstart deployment stuff to download the new jar (and possibly for the new classpath), it is documented in Compilo I think.
(7) You can incorporate the source as jars into your new project so that you can still drill down into the source code (read only). (Your project is completely separate to Compiere, you only reference the compiled source code.)

Advantages of doing it this way are many. This was advised to me by someone MUCH more experienced than I am at Java and in hindsite I can recommend it as being the only way to go.

However, the build file is quite complex. The build I wrote includes a target for building the customizations, and also one for building the 'reference'. We don't touch the original but put certain 'patches' into the new code. This allows modifications to certain files of the reference build, at build time (e.g. RUN_Compiere2.bat, where you have to change the classpath to include your new jar first).

Another option, if you are working on a CVS server which is remote or low-bandwidth, is to put all the Compiere jars, 3rd party libraries, builds etc into a separate project. You then reference these jars in your new project. This avoids the problem of the CVS server always trying to synchronize large jars and build files (which change every time and if you forget to add the built jar into the .cvsignore ... if you find a way to get rid of it on the CVS or ever ignore it afterwards, let me know).

Anyone interested I will write further and share the relevant code.

Just my experience up-to-date.

Neil
Last edited by neilg on Fri Sep 02, 2005 12:47 am, edited 4 times in total.
neilg
Regular
 
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm

Postby red1 » Mon Jun 20, 2005 7:57 am

The world is interested in them Neil, i will make sure of that. :)

We welcome any writings and contributions to be public here, to ensure the OS journey completes itself.

Your advice is true and i shall write them into the Compilo document (credited to u for this part).

Remember. Contributors are priceless. Its the Universal Law. If we do not stake the flags on the ground, others will.

red1
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Source code coming up soon

Postby neilg » Mon Jun 20, 2005 12:59 pm

neilg
Regular
 
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm

Postby red1 » Mon Jun 20, 2005 1:38 pm

red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby neilg » Thu Jun 23, 2005 5:08 pm

neilg
Regular
 
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm

Postby red1 » Thu Jun 23, 2005 7:47 pm

red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Postby neilg » Thu Jun 23, 2005 8:36 pm

neilg
Regular
 
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm

heres the build.xml

Postby neilg » Thu Jun 23, 2005 9:29 pm

neilg
Regular
 
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm

Postby red1 » Fri Jun 24, 2005 10:06 am

Neil,
It is OK. Such advertising is the honourable thing to do, as long as no money is passed in Open Space :wink:

Again, thanks a million.

red1
red1
Site Admin
 
Posts: 2759
Joined: Tue Jul 06, 2004 3:01 pm
Location: Kuala Lumpur, Malaysia

Update on this topic for 2.5.2D

Postby neilg » Thu Aug 25, 2005 1:23 am

neilg
Regular
 
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm

Reference build and SQLJ

Postby neilg » Thu Jan 19, 2006 1:40 pm

For some reason my build did not contain the SQLJ files (required for 252 +).

In the reference version of the source code (the one where we make minimal changes) I had to run the build file in the sqlj folder (from Eclipse as an ant build worked fine). This built sqlj.jar.

Refresh project then make a new ant build for the install folder build.xml(dont run it yet - use the external tools option in the toolbar). In the ant build properties set environment variable COMPIERE_VERSION_FILE to value (for example) 252d, under 'Environment'.

Run the build then refresh the install folder. You will have the new build which you can use as a client.

You might need to (re)create the SQLJ functions in oracle. There is a separate posting on Contributors Corner which mentions how to do this.
neilg
Regular
 
Posts: 141
Joined: Thu Jun 16, 2005 1:58 pm

Postby Noha » Thu Jul 20, 2006 12:30 am

Noha
 
Posts: 1
Joined: Thu Jul 20, 2006 12:26 am


Return to Strictly Technical

Who is online

Users browsing this forum: No registered users and 1 guest

cron