Compiere build on a GNU/Linux development box

Doc v 0.2a - 22032003


COMPIERE BUILD
This approax doesn't handle the same way of window's .bat files.
Instead it's just an step by step guide.

For this build box we have sources under /ora/compiere-all
CVS Setup & Checkout.
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/compiere login
cvs -d:pserver:anonymous@cvs.sourceforge.net:/cvsroot/compiere checkout compiere-all


Next step is to download and install (really only download and extract).
Ant plus XDoclet plus Jakarta-ORO plus NetRexx 2

Export general variables.
export JAVA_HOME=/usr/local/bin/j2sdk1.4.1_01
export COMPIERE_SOURCE=/ora/compiere-all
export PATH=$PATH:$JAVA_HOME/bin

Export variables for Key Generation and Signing (necessary for WebStart client build).
export KEYTOOL_PASS=compiere
export KEYTOOL_DNAME="CN=teixi.net, OU=Teixi, O=Jaume, L=Banyoles, ST=Girona, C=ES"
export KEYSTORE_DIR=$COMPIERE_SOURCE/keystore
export KEYSTORE=$KEYSTORE_DIR/myKeystore

create dir for keystore
mkdir $KEYSTORE_DIR
cd $COMPIERE_SOURCE/utils_dev

Create own key plus sign, export and check.
keytool -genkey -keyalg rsa -alias compiere -dname "$KEYTOOL_DNAME" -keypass $KEYTOOL_PASS -validity 365 -keystore $KEYSTORE -storepass $KEYTOOL_PASS
keytool -selfcert -alias compiere -dname "$KEYTOOL_DNAME" -keypass $KEYTOOL_PASS -validity 365 -keystore $KEYSTORE -storepass $KEYTOOL_PASS
keytool -export -keystore $KEYSTORE -alias compiere -storepass $KEYTOOL_PASS -file $KEYSTORE_DIR/compiere.cer
keytool -list -keystore $KEYSTORE -storepass $KEYTOOL_PASS
keytool -printcert -file $KEYSTORE_DIR/compiere.cer

Check existance of necessary files.
ls $JAVA_HOME/lib/tools.jar
ls $COMPIERE_SOURCE/jboss/server/compiere/lib/NetComponents-1.3.8.jar
ls $COMPIERE_SOURCE/jboss/server/compiere/lib/ant.jar
ls $COMPIERE_SOURCE/jboss/server/compiere/lib/optional.jar
ls $COMPIERE_SOURCE/jboss/lib/jaxp.jar
ls $COMPIERE_SOURCE/jboss/lib/crimson.jar

Check for key alias
keytool -list -alias compiere -keyStore $KEYSTORE -storepass $KEYTOOL_PASS

Export necessary environment variables. They depend of course on your environment.
export ANT_HOME=/usr/local/bin/jakarta-ant-1.5.1
export ANT_PROPERTIES="-Dpassword=$KEYTOOL_PASS -DMailLogger.mailhost=puigsuris -DMailLogger.from=CompiAnt@teixi.net -DMailLogger.failure.to=teixi@teixi.net -DMailLogger.success.to=teixi@teixi.net"
export COMPIERE_ROOT=/ora/compiere-all
export COMPIERE_INSTALL=$COMPIERE_ROOT/install
export COMPIERE_HOME=$COMPIERE_INSTALL/Compiere2
export COMPIERE_VERSION=2.4.4a
export COMPIERE_VERSION_FILE=244a
export COMPIERE_VENDOR=teixi.net
export XDOCLET_HOME=/usr/local/bin/xdoclet-1.1.2
export CLASSPATH=$CLASSPATH:$JAVA_HOME/lib/tools.jar:$COMPIERE_SOURCE/jboss/server/compiere/lib/NetComponents-1.3.8.jar
export CLASSPATH=$CLASSPATH:$COMPIERE_SOURCE/jboss/server/compiere/lib/ant.jar:$COMPIERE_SOURCE/jboss/server/compiere/lib/optional.jar
export CLASSPATH=$CLASSPATH:$COMPIERE_SOURCE/jboss/lib/jaxp.jar:$COMPIERE_SOURCE/jboss/lib/crimson.jar
export CLASSPATH=$CLASSPATH:$JAVA_HOME/jre/lib/rt.jar
export CLASSPATH=$CLASSPATH:/usr/local/bin/NetRexx/lib/NetRexxC.jar
export CLASSPATH=$CLASSPATH:/usr/local/bin/jakarta-oro-2.0.7/jakarta-oro-2.0.7.jar
export COMPIERE_ENV=Y

Do a cleanup and build.
java -Dant.home=$ANT_HOME $ANT_PROPERTIES org.apache.tools.ant.Main clean
java -Dant.home=$ANT_HOME $ANT_PROPERTIES org.apache.tools.ant.Main -logger org.apache.tools.ant.listener.MailLogger build

and at the end you should get:
[checksum] Calculating MD5 checksum for /ora/compiere-all/install/build/Compiere_244a.tar.gz
[checksum] Calculating MD5 checksum for /ora/compiere-all/install/build/Compiere_244a.zip

BUILD SUCCESSFUL
Total time: 2 minutes 12 seconds

That's all folks ;-)

Now you can extract over your current Compiere2 directory.
tar xvzf Compiere_244a.tar.gz
chmod 755 -R Compiere2


Then do a database migration

REFERENCES
Compiere Official Build Instructions & CVS Setup
http://www.compiere.org/technology/build.html
http://sourceforge.net/cvs/?group_id=29057

Ant http://jakarta.apache.org/ant/

XDoclet http://xdoclet.sf.net

jPDFPrinter http://www.qoppa.com/

Jakarta-ORO http://jakarta.apache.org/oro/

NetRexx 2 http://www2.hursley.ibm.com/netrexx/


You can also check Install Guide
Copyleft by Jaume Teixi
Original Doument February 12th, 2003
teixi.net
Brought to you courtesy of teixi.net