Michael Phoenix wrote:
As Ken has suggested I am trying to study the glassfish
code to get a better idea of how JSFT is supposed to work.
Ok, I have observer status for the glassfish project and am looking at
the instructions at this url:
https://glassfish.dev.java.net/public/BuildGlassFish.html#configuration
First of all, it says you have to have the latest updates of Java 5,
which is currently release 11. My understanding is that if I have the
java update icon in my control panel and I have it set for automatic
updates, then I should have all the latest updates, even if I haven't
actually downloaded release 11. Have I got that right or do I need to
explicitly download the latest release?
As long as you have the updated version of the JDK (not JRE), then
you're fine.
When I typed "javac -version" on the command line, it gave me a long
usage message with this at the top:
javac 1.5.0_08
I'm not using the latest and things work fine for me.
Also, I am a bit confused by the following section:
GlassFish build steps:
The first step is to checkout the
module dependencies and common
files used in the build system and edit the properties file.
% mkdir workspace
% cd workspace
% cvs -d :pserver:<userid>@cvs.dev.java.net:/cvs checkout glassfish/bootstrap
This will checkout project.xml, maven.xml, project.properties,
and
common files referenced from project.xml.
Create
workspace/glassfish/bootstrap/build.properties or for re-usable
GlassFish workspace, one-time process is to create
${HOME}/build.properties
(Unix) or %HOMEPATH%\build.properties (Windows) and set
following variables: (you can get %HOMEPATH% value by running the
command: echo %HOMEPATH% or run "set" and find HOMEPATH variable
(windows))
What part is confusing above? Your home directory? If you open a
command prompt. That starts you in your home directory. You can type
type: notepad build.properties
Note that I am running Win XP and have downloaded Maven.
As instructed under the java.net cvs
setup, I have setup wincvs and have a main directory for CVS projects.
Can I use Wincvs with Maven or do I have to use command-line cvs?
I'm not sure. You can probably do either one for checking out file...
but maven does a lot more than checking out files and you will need to
use maven to do the building.
Should the workspace directory be under that or does it
need to be at the root of my directory.
Windows is not a developer friendly environment. Spaces in path names,
or path names that are too long confuse the operating system in certain
situations. For your own sake, I'd put it in the root directory just
to avoid the chance of problems. But to answer your question: I don't
know. :)
The above instructions aren't specific about this. Also,
it is not clear on how to create build.properties. Is it just a blank
text file or what? What is the advantage of putting it in the HOMEPATH?
Yes, it's a plain text file (actually it's a Java .properties file, I
think). You need to specify the properties listed described in the
document. At least these (you may need more):
glassfish.os.name=WINNT
glassfish.cvs.username=<your java.net id>
The reason for this being in your home directory is so that it can be
found. The build scripts know how to look here for this file. It's
not done in the build directory b/c you may delete your build directory
and you also don't want to modify files and accidentally check them in
breaking everyone else's build environment.
Then ther is step 2:
- Bootstrap the
server image (a collection of scripts and
jar files used
to run glassfish). Developer can
select the option of "bootstrap" which downloads the pre-built server
and builds only subset of the modules. Other option "bootstrap-all" is
to create the server from scratch, and build all the modules to verify
the intermodule or binary dependencies version change.
bootstrap-all option: Building all the modules from
the
source.
% maven bootstrap-all
bootstrap option: Build your own module using pre-built
server
% maven bootstrap
This step is optional if you have already installed a promoted build of
GlassFish. To use the promoted
build you will need to set the property in
glassfish/project.properties.
glassfish.image.version=<<build version>>
This will cause the build system to
"point" to that installation. This property can also be added to
${HOME}/build.properties
When is says "
This step is optional if you have already installed a promoted build of
GlassFish." is it referring to everything under step 2? What is a
"promoted build"? I currently have a version of Sun AppServer PE9
running, does that qualify? How do I find the "build version" used to
set the version property? Are there any "gotchas" with building
glassfish if you have Sun AppServer installed?
Promoted builds are published on the GlassFish download page. I
recommend you do not take this approach. Just do a "bootstrap-all".
If you have a different version of GlassFish or SJS AS installed (or
even tomcat) disable these servers when working with GlassFish. They
all try to use port 8080 and, of course, only 1 can so you might run
into problems. So use only 1 server at any given time.
Sorry for the slow response. I hope this helps. As soon as you do the
checkout step you should be able to find the GlassFish admin GUI source
at:
<root>/glassfish/admin-gui/admin-gui/src
The "docroot" directory contains the web portion of the app (.jsf
files, images, etc.).
The "java" directory contains our JSFT handlers and other java code for
the app.
Also, once you finish the "build" step, the deployed GlassFish admin
GUI app will be at:
<server-root>/lib/install/applications/admingui/adminGUI_war
You won't see the .jsf files in the deployed app b/c they are in the
WEB-INF/lib/admin-jsf.jar file. You can extract these files to the
docroot if you'd like.
You may also want to set the JSFT DEBUG flag to true so you can modify
pages.
Good luck!
Ken
Thanks in advance for your help.