Install ADempiere OSGI in Eclipse

Aus FreiBier
Version vom 26. August 2013, 15:23 Uhr von Tbayen (Diskussion | Beiträge)

(Unterschied) ← Nächstältere Version | Aktuelle Version (Unterschied) | Nächstjüngere Version → (Unterschied)
Wechseln zu: Navigation, Suche

The old information about my first try to install OSGi ADempiere ist still in the Sourceforge Project Wiki:

https://sourceforge.net/p/freibier/wiki/InstallationOSGI/

Some hints I found while trying to install iDempiere:

Use this to create a script to start all needed migration scripts:

 ls | egrep '^digit:{3}.*\.sql$' | sort | tail -n +`ls | egrep '^digit:{3}.*\.sql$' | sort | grep -n \`cat ../../../org.adempiere.server-feature/data/seed/LAST_SCRIPT_APPLIED_ON_THIS_SEED | tail -n 1\` | cut -d ':' -f1` | tail -n +2 | perl -pe 's/(.*)/psql -h efg -d idempiere -U adempiere -f $1/' >needed_migrations.sh
 sh needed_migrations.sh
 cat ../../processes_post_migration/postgresql/*.sql | psql -h localhost -d idempiere -U adempiere


In a freshly install postgres server you will get many errors like this one (first in 857):

 FEHLER:  Funktion uuid_generate_v4() existiert nicht

Before running the migration scripts you need to install the extension module uuid-ossp. In debian install the package postgresql-contrib. Then do the following in the iDempiere database:

PostgreSQL 8.4:

 # first four lines seems necessary only under Linux:
 psql -h localhost -d idempiere -U postgres -c "UPDATE pg_language SET lanpltrusted = true WHERE lanname LIKE 'c';"
 cp /usr/share/postgresql/8.4/contrib/uuid-ossp.sql .
 joe uuid-ossp.sql       # set search_path=adempiere setzen
 psql -h localhost -d idempiere -U adempiere -f uuid-ossp.sql

PostgreSQL 9.2:

 CREATE EXTENSION "uuid-ossp";
 ALTER EXTENSION uuid-ossp OWNER TO adempiere;


Upgrade with mercurial

Here is a list of some helpful mercurial commands. See more at http://hgbook.red-bean.com/read/a-tour-of-mercurial-the-basics.html

You can make a backup clone of the source tree with

 hg clone idempiere idempiere-backup

You can upgrade the actual respository with:

 hg pull https://bitbucket.org/idempiere/idempiere

You can see which revision the actual repository has with:

 hg log -l 1

And you can see which files changed between two revisions (M: Modified, A: Added, R: Removed) with:

 hg status --rev 7718:2b371e59a63c --rev 8097:a2092d7b985a

after upgrading

After upgrading eventually you have to re-materialize your Eclipse workspace with buckminster again (http://www.globalqss.com/wiki/index.php/IDempiere/Setting_up_Eclipse). This is needed if the updated code created new plugin projects or uses new or updated jar dependencies.

If you wnat to know which migration scripts you have to run you can find out your actual state with

 psql -h idempiereserver -p 5432 -U adempiere -d idempiere -c 'SELECT name FROM ad_migrationscript ORDER BY name DESC LIMIT 1'

Then you go to

 cd migration/i1.0a-release/postgresql/

and start the newer scripts one by one with

 psql -h idempiereserver -p 5432 -U adempiere -d idempiere <XXXXXXXXXXXX_scriptname.sql

Then (do not forget!) you go to

 cd migration/processes_post_migration/postgresql
 cat `ls *.sql` | psql -h idempiereserver -p 5432 -U adempiere -d idempiere
Meine Werkzeuge
Namensräume

Varianten
Aktionen
Navigation
Werkzeuge