Building GlassFish on FreeBSD, too...........
By user12608895 on Aug 02, 2006
cvs client binary
Apache ANT 1.6.5
Apache Maven 1.0.2
JDK1.5 (1.5.0_06 or higher)
You also linux version of jdk 1.4.0 rpm bits for building JDK 1.5 .
ii) Get the FreeBSD port version of JDK 1.5 - http://www.freebsdfoundation.org/downloads/java.shtml
Assume the target system have enough disk space and memory and the system is also configure to use the FreeBSD port collection from /usr/ports .
Start building Java EE 5 on FreeBSD
1) Install and add all those require and avaliable utilities software tools.
ii) For installation of Apache Maven -
make install clean
iii) For installation of Apache ANT -
make install clean
iv) For installation of ported NSS -
make install clean
v) For installation of ported NSPR -
make install clean
2) Environment setting after step 1 is done :
export JAVA_HOME MAVEN_HOME ANT_HOME CVSROOT PATH
(Remember to check the GlassFish Build FAQ wiki if you run into problems.)
- The first step is to checkout the module dependencies and common files used in the build system and edit the properties file.
Next checkout the sources.
% cd glassfish/bootstrap
% maven checkout (There are different tag to choose from note 4.)
- Bootstrap the server image (a collection of image and jar
used to run glassfish).
- Build the checked out source code.
- Configure the GlassFish Server runtime. This step will
create the asadmin
script, run create-domain, etc which are needed to run
the GlassFish server.
- Starting up the server using the asadmin command in <glassfish.root>/publish/bin directory.
- Start accessing the newly compile build GlassFish (Java
% mkdir workspaceThis will checkout project.xml, maven.xml, project.properties, and common files referenced from project.xml.
% cd workspace
% cvs -d :pserver:<userid>@cvs.dev.java.net:/cvs checkout glassfish/bootstrap
Edit glassfish/bootstrap/project.properties for the following properties name value:
glassfish.os.name=Darwin (since Darwin and FreeBSD have the same family root (ancestor "BSD"), and please see FAQ 1.)
glassfish.cvs.username=hyau (use the same login name that you have for http://glassfish.dev.java.net)
% maven bootstrap-all
% maven bootstrap (only if you have build before)
% maven build
% maven configure-runtime (Please read the note 2 before running this command.)
From any browser:
Require jdk 1.4.2_08 for build jdk 1.5 - j2sdk-1_4_2_08-linux-i586.bin(older version)
Require jdk bin source file - jdk-1_5_0-bin-scsl.zip
Require jdk scsl source file - jdk-1_5_0-src-scsl.zip
1) cd /usr/ports/java/jdk15
2) make install clean
- vi asadmin.template
- add -Dderby.storage.fileSyncTransactionLog="true" to the template
( optional: this step may go away in the future or if you are using any native security utilities)
cp /usr/local/bin/pk12util <glassfish.root>/publish/lib/
cp /usr/local/bin/modutil <glassfish.root>/publish/lib/
cp /usr/local/lib/libns\*.\* <glassfish.root>/publish/lib/
cp /usr/local/bin/certutil <glassfish.root>/publish/imq/bin/
cp /usr/local/bin/ssltrap <glassfish.root>/publish/imq/bin/
cp /usr/local/lib/libns\*.\* <glassfish.root>/publish/imq/lib/
5) May require jdk 1.4 installed before using /usr/ports to install "maven" and "ant"
- It is not require to set any JAVA_HOME, when installing FreeBSD Ports' of "maven" or "ant".
- Or else you could download the maven 1.0.2 and ant 1.6.5 directly from their own web site respectively.
Answer: Yes, you will see build failed and the following error message. Sun does not have native official ported for GlassFish for FreeBSD.
GlassFish have build only on MacOS, Linux, SunOS, SunOS,_X86 Windows.
Attempting to download imq-4.0-20060303.jar.
WARNING: Failed to download imq-4.0-20060303.jar.
Attempting to download appserv-native-9.0-b40.jar.
WARNING: Failed to download appserv-native-9.0-b40.jar.
Attempting to download nss-util-3_3_11_BETA2.jar.
WARNING: Failed to download nss-util-3_3_11_BETA2.jar.
Attempting to download NSsecurity-JES5_20050929.jar.
WARNING: Failed to download NSsecurity-JES5_20050929.jar.
The build cannot continue because of the following unsatisfied dependencies:
Total time: 21 seconds
Finished at: Mon Apr 24 13:37:28 PDT 2006
Temporary workaround for this issue you have to set " glassfish.os.name=Darwin" for now.
( until the native code ready or the removal of those native code.)
Question 2: It seems https is not working fine or keytool (java utility tool) is not working?
Answer: Yes, I have report to the FreeBSD Java user group about this issue, it is on glassfish issue.
Question 3: How to clean the build?
Answer: You could use the "maven clobber"
Question 4: If a simple way to install and build Glassfish on FreeBSD?
Answer: Yes, I am trying to work on the porting and at the same time studying on the porters-handbook. ;-)
If you want to help, please me.
Question 5: How to view glassfish source?
Answer: Source code - CVS - https://glassfish.dev.java.net/source/browse/glassfish/
FishEye for GlassFish - http://fisheye5.cenqua.com/viewrep/glassfish
Question 6: Which cvs tag source tree I have build on which version of FreeBSD?
Answer: I have try build on Glassfish build 43 on FreeBSD 6.0 and SJSAS90_FCS_BRANCH (5/13/2006)on FreeBSD 6.1.
(At least, these are the source tag and OS version that I have build Glassfish successfully.)
Question 7: What should I do if there is a JVM crash when using the "Ported Java" from FreeBSD Foundation Java? to
Answer: I will suggest you to join and send you questions to "freebsd-java" email alias from suggestion.
Question 8: What if I could not build from glassfish source and other glassfish related issues?
Answer: I will suggest you to join and send you enquiry to GlassFish Forum or get more GlassFish TechTips and Blog information.
And as always, you should bookmark these url from latest OpenJavaEE / GlassFish new and information.
GlassFish Community Building an Open Source Java EE 5 Application Server - https://glassfish.dev.java.net/
A blog about Open Source Java EE (J2EE)/GlassFish - http://blogs.sun.com/roller/page/theaquarium
Reference URL :
All copyrights and trademarks have their own respective owner.