dev@jsftemplating.java.net

Re: getting back into jsft - question on testing code changes to glassfish

From: Ken Paulsen <Ken.Paulsen_at_Sun.COM>
Date: Sat, 02 Jun 2007 17:05:20 -0700


Michael Phoenix wrote:
Ken,

I'm a little confused on a couple of your points. What is "maven -o"? I never mentioned it in my email, the instructions tell us to use "maven build". What I really wanted to know was if just doing the maven build for the module I'm changing is sufficient or if the whole project needs to be rebuilt.
You don't need to do the whole project.  It is safest if you do a "clean" first to remove class files that may not be used anymore, and to get rid of .map files generated by the previous build.

So yes, this should work:

    maven build

You can also do:

    maven clean build

"maven -o" is the same as maven, with the -o flag.  You can get more info on this by doing "maven -h"... which will tell you it is running the command in "offline" mode.  That ensures it doesn't try to download anything which will slow the build down.  You don't need to do this.
Your last paragraph has me totally perplexed. Put the "docroot" directory in what source? Where are the jar files you mentioned supposed to be copied to? What does "deploying your source" have to do with any of this?
When you built GlassFish, you have a directory:

    .../glassfish/admin-gui/src/docroot

This is the "docroot" directory I am talking about.  This directory is part of the source code of the application.  You will see it doesn't have any jar files in ".../glasfish/admin-gui/src/docroot/WEB-INF/lib/*".  You need to have them there if you want to deploy the "docroot" directory on GlassFish.  If you do this, then every file in this directory is directly accessed when you visit: http://localhost:8080/docroot/<file> (where "docroot" in the url is the "contextroot" which is configured to point to .../glassfish/admin-gui/src/docroot).

Deploying this directory can be done via the admin console (http://localhost:4848).  Goto Web Applications, and click the deploy button.

The jar files you need to copy will exist in a directory like .../publish/glassfish/lib/install/applications/admingui/adminGUI_war/WEB-INF/lib/*.

When I say "deploy your source" I mean deploy the directory containing the source files for this web app (in this case ".../glassfish/admin-gui/src/docroot").

Ken

Mike

On 6/2/07, Ken Paulsen <Ken.Paulsen@sun.com> wrote:

After that you can do a maven -o build like you mentioned, you may also want to do a "clean" to start fresh.  After a build you'll have to restart the server.... however, if you just change .jsf files (after the debug flag is turned on), then you can see the changes immediately.  However, if these files are in a jar file (they are by default), then you won't be able to change them.  You can look at the deployed version of the files in AS_HOME/lib/install/applications/admingui/adminGUI_war/.

Optionally, you can deploy the "docroot" directory in the source.... but you need to copy in a few jar files (see the lib/install/applications/.../WEB-INF/lib/*.jar to see what jar files should be there.  The advantage of deploying your src directory is that you can modify the changes in the source and see them in the browser instantly (for .jsf-type changes).  Also, I think a simple "ant clean build" will rebuild the admin gui when setup this way vs. using maven.

Ken