Building Funambol from CVS

 

del.icio.us 标记:

 

As I had some problems to find build howtos to build Funambol last week, I gathered the information people gave me on the Sync4J mailing list in to an article. Follow these instructions to build the Funambol 3.0 bundle for Unix or Linux.

Gathering the dependencies

In order to build the Funambol bundle, you will need several other softwares or components. There are listed below with a link to their download page and some comments if necessary.

  • Netbeans platform: no problem with netbeans, the latest version will do the trick
  • JavaCC: I tested using the 3.2 version, but newer version might work too
  • HSQLDB: no problem too, the latest version will be good
  • Java J2SE: download both JDK for build and JRE for inclusion in the bundle
  • JUnit: last version is ok
  • J2EE: there is a problem in the funambol ant scripts starting from J2EE 1.4, a fix is proposed in this tutorial. Using this fix, latest version can be used.
  • Tomcat: for inclusion in the bundle. Works fine using 5.0.30, but earlier version might work
  • Ant: the latest version works fine

Now that you downloaded all the dependencies, you will install them. To simplify this tutorial, I assume that everything will happen in the same directory and that neither Java, ant nor J2EE are installed. You may adapt the next steps to your existing installation if you want.

  • Extract Netbeans platform in
  • Extract JavaCC in
  • Extract JUnit in
  • Extract Ant in
  • Run JDK installation in using a command like
sh jre-1_5_0_07-linux-i586.bin
  • Run J2EE installation with the following steps and install it in /SUNWappserver
chmod u+x java_ee_sdk-5-linux.bin
./java_ee_sdk-5-linux.bin

The other archives should be left as is because they will only be included in the Bundle by the Funambol build scripts.

Getting the sources

Now that you have the dependencies, you will have to checkout the latest Funambol 3.0 sources from the CVS and configure them to find the dependencies.

Checkout the sources from CVS

In order to get the sources, go into the directory using the cd command and then execute the following commands:

cvs -d:pserver:anonymous@cvs.forge.objectweb.org:/cvsroot/sync4j login
cvs -z3 -d:pserver:anonymous@cvs.forge.objectweb.org:/cvsroot/sync4j co 3x

When a password is asked during the login command, simply press enter. Now you should have a new 3x directory in your containing the Funambol 3.0 sources.

Configure

Now, you will have to change some values in Funambol properties files. First of all, edit the /3x/forge/build.properties file and change the following values:

  • javacc.home= /javacc-3.2
  • sunj2eesdk-rootdir= /SUNWappserver
  • tomcat.pkg= /jakarta-tomcat-5.0.30.zip
  • jre.pkg= /jre-1_5_0_07-linux-i586.bin
  • hsqldb.pkg= /hsqldb_1_8_0_4.zip

As you might have remarked in the preceeding value, I used the latest versions of the JRE and HSQLDB. You will have to adapt these values to the names of the files you have downloaded. You should also change some other values:

  • jre.name=jre1.5.0_07
  • tomcat.name=jakarta-tomcat-5.0.30
  • hsqldb.name=hsqldb

To obtain these values, just temporarily extract Tomcat, the JRE and HSQLDB the generated directories names will be your values.

To complete this configuration, set the following value in /3x/admin-suite/build.properties :

  • nbplatform.default.netbeans.dest.dir= /netbeans
Build

Last but not least, you will have to run to scripts to build the Funambol 3.0 bundle. For this, follow the next steps:

export CLASSPATH=
 
 
  
  /junit4.1/junit-4.1.jar
  
  
export PATH= /apache-ant-1.6.5/bin: /jdk1.5.0_07/bin:$PATH
export JAVA_HOME= /jdk1.5.0_07

Then go to the /3x/forge directory and run the following command to build the unix bundle. To get the list of all the targets available for the build, simply run ant without any target.

ant forge-bundle-unix

Now you can get the generated bundle in the /3x/output directory.

Bug for J2EE 1.4 and 1.5

In these versions of the J2EE, the jar used to build the pimweb module (j2ee.jar) is empty. Its content is now in javaee.jar. Thus you will have to edit the /3x/modules/pimweb/build/build.xml file and change the line

 
 

into

 
 

For a better issue description and patch, please refer to the sync4j objectweb forge project.

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值