JarFiles

Aus FreiBier
Wechseln zu: Navigation, Suche

This page is about organization of *.jar files in ADempiere.

In the Eclipse project of ADempiere (non-OSGI) every jarfile used somewhere in the code has to be in the Eclipse project's classpath.

So when I did my customizations following the instructions of Create your ADempiere customization environment from Carlos Ruiz I used a method of "commons-io.jar" without thinking about it. When starting my application via Java Web Start it did not work. This is because "commons-io" is part of zkui, not the Java Client.

What can I do?

First I wanted to file a bug for this to the adempiere community but the I thought about it for a second. There is no way to solve this in a good way with one monolithic Eclipse project. That is where OSGI comes in. :-) So I have to review this after the change to OSGI and let the developers do their work unitl then and not harrass them with bug trackers about the old project structure.

The solution for me is to think about using which functions when (Hey! You really should do this all the time, shouldn't you?).

One can declare his work as package (for example "freibier") by creating a directory "/packages/freibier/lib" and copying his jar files there. You can even copy your main contribution jar there. It's your choice whether your project dir or the customization.jar is the right place for your code. TEchnically it is equal loaded.

This is my IRC chat about this:

 Jan 22 17:08:47 <tbayen__>	I have a question: When I use third-party jars in my customization, how do I get them into the WebStart?
 Jan 22 17:09:05 <CarlosRuiz>	my way is to put the on a folder
 Jan 22 17:09:10 <CarlosRuiz>	packages/project/lib
 Jan 22 17:09:25 <CarlosRuiz>	I mean with project you replace with the project library
 Jan 22 17:09:27 <CarlosRuiz>	for example
 Jan 22 17:09:32 <CarlosRuiz>	packages/jasper/lib
 Jan 22 17:09:37 <CarlosRuiz>	we put there some updates to the jasper
 Jan 22 17:09:41 <CarlosRuiz>	or packages/postgresql/lib
 Jan 22 17:09:58 <CarlosRuiz>	then the build process take care of integrating all the packages in the proper place
 Jan 22 17:10:58 <tbayen__>	So I put it into ADEMPIERE_HOME/packages/freibier/lib and everything goes?
 Jan 22 17:11:11 <tbayen__>	after starting RUN_silentsetup.sh
 Jan 22 17:11:23 <CarlosRuiz>	yep
 Jan 22 17:43:25 <tbayen__>	CarlosRuiz, when there is a different directories for my packages jars, why do I do my own code into "customization" and not into "packages/freibier/freibier.jar". This seems more sensible.
 Jan 22 17:45:29 <red1>	let me think for a moment
 Jan 22 17:46:01 <red1>	you can do as u wish (the later packages)
 Jan 22 17:46:23 <red1>	if you have lots of changes then its package
 Jan 22 17:46:36 <red1>	if yours is more core.. then its customization
 Jan 22 17:46:45 <red1>	there re only 3 places to put
 Jan 22 17:46:54 <red1>	patches, customization, packages
 Jan 22 17:46:54 <CarlosRuiz>	as my idea of that - packages must not overwrite core classes  - if you need to do that better use customization.jar and keep an eye on that
 Jan 22 17:46:55 <tbayen__>	OK, that sound meaningful to me.
Meine Werkzeuge
Namensräume

Varianten
Aktionen
Navigation
Werkzeuge