Jboss Web on FreeBSD

Charles Mason charlie.mas at gmail.com
Thu May 10 09:25:50 UTC 2007


I was asked for the details on how I got I got it working off list. In
case anyone else is intrested I thought I would post a copy of the
details.

Well getting my "port" to an acceptable standard is a little
difficult, as I am fairly new to creating FreeBSD ports and the build
process for Jboss Web is anything but straight forward. The basic
steps are below;

1, Obtain the Jboss Web source, officially only available from an anon
svn checkout, although for the benefit of my port I tared it and put
it on a local http server.

2, Download the latest stable version of Jboss Application Server 4
and put it in the /jboss folder in the Jboss Web source tree.

3, Run ant on the Jboss Web root directory. This builds all the Java elements.

4, You need to compile the native libs. There is an shell script
called buildprep.sh  in src/share/native/build, which downloads APR
tar extracts it compiles it. It then checks out from an SVN the jboss
native code. I couldn't get this script to run on FreeBSD but I
managed to manually recreate what it does.

5, When the native libs are compiled you need to make a new dir called
native in output/jbossweb-1.0.1.GA/bin.

6, Copy the native libs to the new directory,
/output/jbossweb-1.0.1.GA/bin/native

7, Theres one problem with the default config which prevents Jboss Web
starting on FreeBSD (at least on my system). Edit

/output/jbossweb-1.0.1.GA/server/default/deploy/tc5-cluster.sar/META-INF/jboss-service.xml

You need to change max_bundle_size="64000" to max_bundle_size="8000".

8, Run output/jbossweb-1.0.1.GA/bin/run.sh and all should work.


To get a working rc.d script, I used the demonctl program which the
Jboss4 port uses. Hence why I hacked together my port in the first
place. After modifying the Makefile I was able to get the rc.d script
to work without any changes. Although I did have to add the native lib
path option as an arg in the hacked ports Makefile.

I really don't know enough about the ports system to automate steps 2
and 4. I guess I could make an shell script use wget or fetch to
download the source for step 2. However I think downloads for ports
are supposed to use the dist-files folder.

Also I notice there is a port of APR in the ports collection already,
so I really need to work out how to patch the buildprep script to use
that instead.

All of these tasks are some what at the limit of my current FreeBSD
knowledge. Hopefully I can learn how to solve these problems, although
it would be great if someone could point me in the right direction.

I hope that's enough info to get you started.

Charlie


More information about the freebsd-java mailing list